/* ==========================================================================
   مستشفى الأنهار التخصصي | Al-Anhar Specialized Hospital
   ملف التنسيقات الرئيسي الموحد - style.css
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@300;400;500;700;800;900&display=swap');

:root {
    --primary-navy: #0a2a5e;
    --secondary-blue: #1e4a8a;
    --accent-green: #2ecc71;
    --bg-light: #f8f9fa;
    --text-main: #333333;
    --white: #ffffff;
    --border-color: #e2e8f0;
    --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 8px 20px rgba(10, 42, 94, 0.08);
    --shadow-lg: 0 12px 28px rgba(10, 42, 94, 0.15);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --transition-fast: 0.25s ease;
    --font-main: 'Tajawal', -apple-system, BlinkMacSystemFont, sans-serif;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-light);
    color: var(--text-main);
    direction: rtl;
    text-align: right;
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.25rem;
}

.section-padding {
    padding: 4rem 0;
}

/* --- الهيدر وشريط التنقل --- */
.header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: var(--white);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-fast);
}

.header.scrolled {
    box-shadow: var(--shadow-md);
}

.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--primary-navy);
}

.brand-logo {
    height: 52px;
    width: auto;
    object-fit: contain;
}

.brand span {
    display: flex;
    flex-direction: column;
}

.brand strong {
    font-size: 1.25rem;
    font-weight: 800;
    line-height: 1.2;
}

.brand small {
    font-size: 0.85rem;
    color: var(--secondary-blue);
    font-weight: 700;
}

.nav-links {
    display: flex;
    align-items: center;
    list-style: none;
    gap: 0.85rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 600;
    font-size: 0.92rem;
    padding: 0.5rem 0.65rem;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.nav-links a:hover,
.nav-links a.nav-active {
    color: var(--primary-navy);
    background-color: rgba(10, 42, 94, 0.06);
}

.nav-badge {
    background-color: var(--accent-green);
    color: var(--white);
    font-size: 0.68rem;
    padding: 0.15rem 0.4rem;
    border-radius: 10px;
    font-weight: 700;
}

.btn-nav-highlight {
    background-color: var(--primary-navy) !important;
    color: var(--white) !important;
    border-radius: var(--radius-sm) !important;
}

.btn-nav-highlight:hover {
    background-color: var(--secondary-blue) !important;
}

/* القائمة المتنقلة للموبايل */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 22px;
    background: transparent;
    border: none;
    cursor: pointer;
}

.menu-toggle span {
    width: 100%;
    height: 3px;
    background-color: var(--primary-navy);
    border-radius: 2px;
    transition: all var(--transition-fast);
}

/* --- واجهة الهيرو (Hero Section) --- */
.hero {
    background: linear-gradient(135deg, var(--primary-navy) 0%, var(--secondary-blue) 100%);
    color: var(--white);
    padding: 5rem 0;
    position: relative;
}

.hero-content {
    max-width: 800px;
}

.hero-badge {
    display: inline-block;
    background-color: rgba(46, 204, 113, 0.2);
    color: var(--accent-green);
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    border: 1px solid var(--accent-green);
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 900;
    line-height: 1.3;
    margin-bottom: 1.25rem;
}

.hero-subtitle {
    font-size: 1.15rem;
    opacity: 0.92;
    margin-bottom: 2rem;
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.85rem 1.75rem;
    font-size: 1rem;
    font-weight: 700;
    border-radius: var(--radius-sm);
    text-decoration: none;
    transition: all var(--transition-fast);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background-color: var(--accent-green);
    color: var(--white);
}

.btn-primary:hover {
    background-color: #27ae60;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(46, 204, 113, 0.3);
}

.btn-outline {
    background-color: transparent;
    color: var(--white);
    border: 2px solid var(--white);
}

.btn-outline:hover {
    background-color: var(--white);
    color: var(--primary-navy);
}

/* --- قسم لماذا تختارنا --- */
.section-header h2 {
    font-size: 2rem;
    color: var(--primary-navy);
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.section-header p {
    color: #666666;
    font-size: 1.05rem;
}

.text-center { text-align: center; }
.text-white { color: var(--white) !important; }
.text-white h2 { color: var(--white) !important; }
.text-white p { color: rgba(255, 255, 255, 0.85) !important; }

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-top: 2.5rem;
}

.feature-card {
    background-color: var(--white);
    padding: 2rem 1.5rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    text-align: center;
    transition: all var(--transition-fast);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--secondary-blue);
}

.feature-icon {
    width: 64px;
    height: 64px;
    background-color: rgba(10, 42, 94, 0.05);
    color: var(--primary-navy);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
}

.feature-card h3 {
    font-size: 1.2rem;
    color: var(--primary-navy);
    margin-bottom: 0.5rem;
}

.feature-card p {
    color: #666;
    font-size: 0.95rem;
}

/* --- قسم خدمات 24/7 الجديد --- */
.services-247 {
    background: linear-gradient(135deg, #0a2a5e 0%, #1e4a8a 100%);
    color: var(--white);
}

.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background-color: rgba(255, 255, 255, 0.1);
    padding: 0.35rem 0.9rem;
    border-radius: 20px;
    margin-bottom: 1rem;
}

.pulse-dot {
    width: 10px;
    height: 10px;
    background-color: var(--accent-green);
    border-radius: 50%;
    box-shadow: 0 0 0 rgba(46, 204, 113, 0.7);
    animation: pulse 1.8s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(46, 204, 113, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(46, 204, 113, 0); }
    100% { box-shadow: 0 0 0 0 rgba(46, 204, 113, 0); }
}

.status-text {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--accent-green);
}

.services-grid-247 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2.5rem;
}

.card-247 {
    background-color: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 2rem 1.5rem;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.card-247:hover {
    background-color: rgba(255, 255, 255, 0.12);
    transform: translateY(-4px);
}

.card-icon-247 {
    margin-bottom: 1rem;
}

.card-247 h3 {
    font-size: 1.25rem;
    color: var(--white);
    margin-bottom: 0.6rem;
}

.card-247 p {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* --- قسم حجز المواعيد --- */
.appointment-wrapper {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    align-items: start;
}

.appointment-form-container {
    background-color: var(--white);
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
    margin-top: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.form-group label {
    font-weight: 700;
    font-size: 0.92rem;
    color: var(--primary-navy);
}

.required { color: #e74c3c; }

.form-control {
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.95rem;
    outline: none;
    transition: border-color var(--transition-fast);
}

.form-control:focus {
    border-color: var(--secondary-blue);
    box-shadow: 0 0 0 3px rgba(30, 74, 138, 0.1);
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.btn-whatsapp-submit {
    background-color: #25D366;
    color: var(--white);
    flex: 1;
    min-width: 200px;
}

.btn-whatsapp-submit:hover {
    background-color: #1ebd56;
}

.btn-email-submit {
    background-color: var(--primary-navy);
    color: var(--white);
    flex: 1;
    min-width: 200px;
}

.btn-email-submit:hover {
    background-color: var(--secondary-blue);
}

.appointment-info-card {
    background-color: var(--white);
    padding: 2rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.appointment-info-card h3 {
    color: var(--primary-navy);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.contact-info-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    margin-top: 1rem;
    font-size: 0.95rem;
}

.contact-info-list a {
    color: var(--secondary-blue);
    text-decoration: none;
    font-weight: 700;
}

/* --- كروت الاختصارات (Teasers) --- */
.bg-subtle { background-color: rgba(10, 42, 94, 0.02); }

.teasers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.teaser-card {
    background-color: var(--white);
    padding: 1.75rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.teaser-card h3 {
    color: var(--primary-navy);
    margin-bottom: 0.5rem;
}

.teaser-card p {
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.link-arrow {
    color: var(--secondary-blue);
    font-weight: 700;
    text-decoration: none;
}

/* --- قسم الاتصال والخريطة --- */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

.contact-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.contact-card {
    background-color: var(--white);
    padding: 1.25rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.contact-card-icon {
    font-size: 1.5rem;
}

.contact-card h4 {
    font-size: 0.95rem;
    color: var(--primary-navy);
}

.contact-card p, .contact-card a {
    font-size: 0.88rem;
    color: #555;
    text-decoration: none;
}

.map-container {
    border-radius: var(--radius-md);
    overflow: hidden;
    min-height: 280px;
    border: 1px solid var(--border-color);
}

/* --- صفحة الوحدات (units.html) والتنسيق الجراحي --- */
.units-callout {
    background: linear-gradient(135deg, rgba(10, 42, 94, 0.05) 0%, rgba(46, 204, 113, 0.08) 100%);
    border: 2px solid var(--secondary-blue);
    border-radius: var(--radius-md);
    padding: 2rem;
    margin-bottom: 2.5rem;
    text-align: center;
}

.units-callout h3 {
    color: var(--primary-navy);
    font-size: 1.35rem;
    margin-bottom: 0.75rem;
    font-weight: 800;
}

.units-callout p {
    color: var(--text-main);
    font-size: 1.05rem;
    max-width: 900px;
    margin: 0 auto 1.25rem;
}

/* التبويبات السباعية (Seven Tabs) */
.tabs-navigation {
    display: flex;
    gap: 0.5rem;
    border-bottom: 2px solid var(--border-color);
    overflow-x: auto;
    padding-bottom: 0.5rem;
    margin-bottom: 2rem;
    scrollbar-width: thin;
}

.tab-btn {
    padding: 0.85rem 1.25rem;
    background: transparent;
    border: none;
    font-family: inherit;
    font-size: 0.98rem;
    font-weight: 700;
    color: #666;
    cursor: pointer;
    white-space: nowrap;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.tab-btn:hover {
    color: var(--primary-navy);
    background-color: rgba(10, 42, 94, 0.05);
}

.tab-btn.active {
    color: var(--white);
    background-color: var(--primary-navy);
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

.units-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.25rem;
}

.unit-item-card {
    background-color: var(--white);
    padding: 1.5rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.unit-item-card h4 {
    color: var(--primary-navy);
    font-size: 1.05rem;
}

/* --- الفوتر (Footer) --- */
.footer {
    background-color: var(--primary-navy);
    color: var(--white);
    padding: 3rem 0 1.5rem;
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.footer-logo {
    height: 60px;
    width: auto;
    background: var(--white);
    padding: 4px;
    border-radius: 8px;
}

.footer-social {
    display: flex;
    gap: 1.25rem;
}

.footer-social a {
    color: var(--white);
    text-decoration: none;
    font-size: 0.95rem;
    opacity: 0.85;
}

.footer-social a:hover { opacity: 1; }

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.88rem;
    opacity: 0.85;
}

.designer-credit {
    color: var(--accent-green);
    font-weight: 700;
}

.back-to-top {
    color: var(--white);
    text-decoration: none;
    font-weight: 700;
}

/* --- التجاوب مع مختلف الشاشات (Responsive) --- */
@media (max-width: 992px) {
    .appointment-wrapper, .contact-grid { grid-template-columns: 1fr; }
    .hero-title { font-size: 2rem; }
}

@media (max-width: 768px) {
    .menu-toggle { display: flex; }
    .nav-links {
        position: absolute;
        top: 80px;
        right: 0;
        left: 0;
        background-color: var(--white);
        flex-direction: column;
        padding: 1.5rem;
        gap: 0.5rem;
        box-shadow: var(--shadow-md);
        display: none;
    }
    .nav-links.active { display: flex; }
    .form-grid, .contact-cards { grid-template-columns: 1fr; }
    .appointment-form-container { padding: 1.5rem; }
    .hero-buttons { flex-direction: column; }
    .btn { width: 100%; }
/* ==================== منع التمرير الأفقي - تثبيت الصفحة ==================== */

html, body {
    overflow-x: hidden !important;
    max-width: 100% !important;
    width: 100% !important;
    position: relative;
}

/* إصلاح عنصر الجزيئات في الـ Hero (السبب الرئيسي) */
.hero {
    overflow: hidden !important;
}

.hero::before {
    width: 150% !important;
    height: 150% !important;
    left: -25% !important;
    top: -25% !important;
    animation: none !important;
}

/* إصلاح تأثير reveal-left */
.reveal-left {
    transform: translateX(0) !important;
    opacity: 1 !important;
}

/* منع أي عنصر من تجاوز حدود الشاشة */
section,
.container,
.hero-container {
    max-width: 100% !important;
    overflow-x: hidden;
}

/* منع الصور من تجاوز الحدود */
img {
    max-width: 100% !important;
    height: auto;
}
}
/* ==================== إصلاحات الهاتف ومنع حركة الصفحة ==================== */

/* 1. منع التمرير الأفقي نهائياً */
html, body {
    overflow-x: hidden !important;
    max-width: 100% !important;
    width: 100% !important;
    position: relative;
}

/* 2. إصلاح تأثير reveal-left الذي يدفع الصفحة لليمين */
.reveal-left {
    transform: translateX(0) !important;
    opacity: 1 !important;
}

/* 3. منع الجزيئات الطائرة في الـ Hero من تجاوز حدود الشاشة */
.hero {
    overflow: hidden !important;
    width: 100% !important;
    max-width: 100vw !important;
}

.hero::before {
    width: 100% !important;
    height: 100% !important;
    left: 0 !important;
    top: 0 !important;
    animation: none !important; /* إيقاف حركة الجزيئات */
}

/* 4. إصلاح جميع العناصر داخل الصفحة */
section, .container, .hero-container, main {
    max-width: 100% !important;
    overflow-x: hidden;
    box-sizing: border-box;
}

/* 5. منع الصور من تجاوز حدود الشاشة */
img {
    max-width: 100% !important;
    height: auto !important;
}

/* ==================== إصلاحات خاصة بالهاتف (Responsive) ==================== */

@media (max-width: 768px) {
    /* تصغير حجم العناوين لتناسب شاشة الهاتف */
    .hero-title {
        font-size: 1.5rem !important;
        line-height: 1.4 !important;
    }

    .hero-subtitle {
        font-size: 0.95rem !important;
        padding: 0 10px;
    }

    /* إصلاح قسم القيم والرؤية (صورة ونص) ليكون عمودياً */
    .values-block, 
    .values-block.reverse {
        flex-direction: column !important;
        gap: 1.5rem !important;
        margin-bottom: 3rem !important;
    }

    .values-image-card img {
        height: 220px !important;
    }

    /* إصلاح قسم الخدمات 24 ساعة */
    .services-grid-247 {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }

    /* إصلاح نموذج الحجز */
    .appointment-wrapper {
        grid-template-columns: 1fr !important;
    }
    
    .form-grid {
        grid-template-columns: 1fr !important;
    }

    /* إصلاح قسم اتصل بنا والخريطة */
    .contact-grid {
        grid-template-columns: 1fr !important;
    }

    .map-container iframe {
        min-height: 300px !important;
    }

    /* إصلاح قسم "لماذا نحن" */
    .features-grid {
        grid-template-columns: 1fr !important;
    }
}