    /* Google Fonts */
    @import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;500;600;700&family=Tajawal:wght@300;400;500;700&display=swap');

:root {
    --primary: #0A3D62;
    /* Deep Clinical Navy */
    --primary-light: #EBF4FA;
    /* Soft Blue bg */
    --secondary: #3B9D7A;
    /* Health Green */
    --secondary-dark: #2F7C61;
    --text-main: #334155;
    /* Slate grey text */
    --text-muted: #64748B;
    /* Lighter slate */
    --bg-main: #FFFFFF;
    --bg-light: #F4F6F9;
    /* Off-white */
    --border-color: #E2E8F0;

    --transition: all 0.2s ease-in-out;
    --container-width: 1140px;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.03);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --radius-sm: 4px;
    --radius-md: 8px;
}

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

body {
    font-family: 'Open Sans', Arial, sans-serif;
    color: var(--text-main);
    background-color: var(--bg-main);
    line-height: 1.6;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

[dir="rtl"] body, 
[dir="rtl"] .hero-text-box h1, 
[dir="rtl"] .section-title, 
[dir="rtl"] .btn,
[dir="rtl"] .nav-links a,
[dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3, [dir="rtl"] h4, [dir="rtl"] h5, [dir="rtl"] h6 {
    font-family: 'Cairo', 'Tajawal', sans-serif !important;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Roboto', sans-serif;
    font-weight: 700;
    color: var(--primary);
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

.section-padding {
    padding: 80px 0;
}

.bg-light {
    background-color: var(--bg-light);
}

.text-center {
    text-align: center;
}

.border-top {
    border-top: 1px solid var(--border-color);
}

.mb-4 {
    margin-bottom: 1.5rem;
}

.icon-sm {
    width: 16px;
    height: 16px;
}

/* Helpers */
.section-badge {
    display: inline-block;
    color: var(--secondary);
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.section-title {
    font-size: 2rem;
    margin-bottom: 20px;
}

.section-desc {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto 40px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 24px;
    font-family: 'Roboto', sans-serif;
    font-weight: 500;
    border-radius: var(--radius-sm);
    cursor: pointer;
    border: 2px solid transparent;
}

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

.btn-primary:hover {
    background-color: #072e4a;
}

.btn-outline-dark {
    border-color: #CBD5E1;
    background-color: transparent;
    color: var(--text-main);
}

.btn-outline-dark:hover {
    border-color: var(--text-main);
    background-color: #F8FAFC;
}

.btn-outline-white {
    border-color: rgba(255, 255, 255, 0.5);
    background-color: transparent;
    color: #ffffff;
}

.btn-outline-white:hover {
    border-color: #ffffff;
    background-color: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

/* --- Top Bar --- */
.top-bar {
    background-color: rgba(10, 61, 98, 0.8);
    /* Darker and more solid for information */
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    color: white;
    font-size: 0.85rem;
    padding: 12px 0;
    position: relative;
    z-index: 1001;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.top-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-info,
.top-contact {
    display: flex;
    gap: 20px;
}

.top-info span,
.top-contact a {
    display: flex;
    align-items: center;
    gap: 6px;
}

.top-contact a:hover {
    text-decoration: underline;
}

.custom-lang-select {
    background: transparent;
    border: none;
    color: white;
    font-family: 'Open Sans', sans-serif;
    font-size: 0.85rem;
    outline: none;
    cursor: pointer;
    padding: 2px 5px;
    border-radius: 4px;
}

.custom-lang-select:hover {
    color: #4ADE80;
}

.custom-lang-select option {
    color: #333;
}

/* --- Google Translate Styling --- */
.goog-te-banner-frame {
    display: none !important;
}

body {
    top: 0 !important;
}

#google_translate_element {
    display: none !important;
}

/* --- Navbar --- */
.navbar {
    background-color: #000000 !important;
    /* Deeper glass tint */
    backdrop-filter: blur(35px) !important;
    -webkit-backdrop-filter: blur(35px) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2) !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 1000 !important;
    transition: var(--transition) !important;
}

.navbar.scrolled {
    background-color: #000000 !important;
    backdrop-filter: blur(45px) !important;
    -webkit-backdrop-filter: blur(45px) !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6) !important;
    padding: 8px 0 !important;
}

/* --- Hero Page Liquid Glass Navbar --- */
.navbar.hero-nav {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.0)) !important;
    backdrop-filter: blur(25px) !important;
    -webkit-backdrop-filter: blur(25px) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-top: 2px solid rgba(255, 255, 255, 0.5) !important;
    border-left: 2px solid rgba(255, 255, 255, 0.3) !important;
    border-right: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
    border-radius: 60px !important;
    box-shadow:
        0 15px 35px rgba(0, 0, 0, 0.1),
        inset 0 4px 10px rgba(255, 255, 255, 0.2),
        inset 0 -2px 5px rgba(255, 255, 255, 0.1) !important;
    top: 20px !important;
    max-width: 1100px !important;
    margin: 20px auto 0 !important;
}

@media (max-width: 1140px) {
    .navbar.hero-nav {
        margin: 20px 10px 0 !important;
        max-width: calc(100% - 20px) !important;
    }
}

@media (max-width: 768px) {
    .navbar.hero-nav {
        border-radius: 12px !important;
        margin: 10px 10px 0 !important;
        top: 10px !important;
    }
}

.navbar.hero-nav.scrolled {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.25), rgba(255, 255, 255, 0.05)) !important;
    backdrop-filter: blur(35px) !important;
    -webkit-backdrop-filter: blur(35px) !important;
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.15),
        inset 0 4px 10px rgba(255, 255, 255, 0.3) !important;
    padding: 0 !important;
}

.navbar.hero-nav .navbar-content {
    padding: 0 40px;
}

.navbar-content {
    height: 80px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 0 40px;
    gap: 20px;
}

.logo {
    grid-column: 1;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.logo img {
    height: 48px;
    width: auto;
}

.nav-links {
    grid-column: 2;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 25px; /* Increased gap for better spacing */
    margin: 0 !important;
}

.nav-links a {
    font-weight: 500;
    font-size: 0.95rem;
    color: #ffffff;
    white-space: nowrap;
    transition: var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
    color: #4ADE80 !important;
    font-weight: 700 !important;
    text-shadow: 0 0 10px rgba(74, 222, 128, 0.4) !important;
}

.nav-right {
    grid-column: 3;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 15px;
}

.accreditation-link {
    display: flex;
    align-items: center;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
}

.accreditation-logo {
    height: 38px !important;
    max-width: 220px !important;
    width: auto !important;
    position: static !important;
    transform: none !important;
    transition: var(--transition);
    display: block;
}

.accreditation-logo:hover {
    transform: scale(1.05) !important;
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: #ffffff;
    cursor: pointer;
}

@media (max-width: 1024px) {
    .navbar.hero-nav .navbar-content {
        padding: 0 20px;
    }
    .mobile-toggle {
        display: block;
    }
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(10, 61, 98, 0.95);
        backdrop-filter: blur(15px);
        flex-direction: column;
        padding: 20px;
        gap: 15px;
        border-bottom: 3px solid var(--secondary);
        border-radius: 0 0 20px 20px;
    }
    .nav-links.active {
        display: flex;
    }
}

/* --- Hero Section --- */
.hero {
    position: relative;
    min-height: 500px;
    height: 80vh;
    display: flex;
    align-items: center;
    margin-top: -150px;
}

@media (max-width: 768px) {
    .hero {
        height: auto;
        padding: 180px 0 80px;
        margin-top: -100px;
    }
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('./assets/clinic.jpeg') no-repeat center center;
    background-size: cover;
    z-index: 1;
}

@media (max-width: 768px) {
    .hero-bg {
        background-attachment: scroll;
    }
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(rgba(10, 61, 98, 0.5), rgba(10, 61, 98, 0.5));
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    width: 100%;
}

.hero-text-box {
    max-width: 700px;
}

.hero-text-box h1 {
    font-size: 3.2rem;
    color: #ffffff;
    line-height: 1.1;
    margin-bottom: 20px;
    font-weight: 700;
}

.hero-text-box p {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 30px;
}

.hero-btns {
    display: flex;
    gap: 15px;
}

/* --- Quick Info Features --- */
.features-section {
    background-color: var(--primary);
    color: white;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0;
    backdrop-filter: none;
    /* Already covered by section */
}

.feature-box {
    display: flex;
    gap: 16px;
    padding: 30px;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    background: transparent;
}

.feature-box:last-child {
    border-right: none;
}

.feature-icon i {
    width: 36px;
    height: 36px;
    color: var(--secondary);
}

.feature-text h3 {
    color: white;
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.feature-text p {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* --- About Section --- */
.about-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-main-img {
    width: 100%;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    display: block;
}

.lead-text {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--primary);
    margin-bottom: 20px;
}

.about-content p {
    margin-bottom: 16px;
}

.about-bullets {
    margin-top: 30px;
}

.bullet-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    font-weight: 500;
    color: var(--text-main);
}

.bullet-item i {
    color: var(--secondary);
    width: 20px;
    height: 20px;
}

/* --- Mission/Vision Section --- */
.mission-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

@media (max-width: 768px) {
    .mission-grid {
        grid-template-columns: 1fr;
    }
}

.content-card {
    background: linear-gradient(145deg, rgba(235, 244, 250, 0.4) 0%, #ffffff 50%);
    border: none;
    border-top: 4px solid var(--primary);
    border-radius: 12px; /* slightly more rounded for softer look */
    padding: 40px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05), inset 0 0 40px rgba(10, 61, 98, 0.015);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.card-watermark {
    position: absolute;
    bottom: -30px;
    right: -30px;
    opacity: 0.04; /* Very subtle low opacity */
    z-index: 0;
    pointer-events: none;
    transform: rotate(-10deg);
}

.card-watermark i {
    width: 200px;
    height: 200px;
    color: var(--primary);
}

.content-card::before {
    content: ""; /* Kept for that soft radial top-left glow */
    position: absolute;
    top: -50px;
    left: -50px;
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(14, 165, 233, 0.04) 0%, transparent 60%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}

.content-card::after {
    content: "";
    position: absolute;
    bottom: -60px;
    right: -60px;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(10, 61, 98, 0.03) 0%, transparent 50%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}

.content-card > * {
    position: relative;
    z-index: 1;
}

.content-card:hover {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1), inset 0 0 50px rgba(10, 61, 98, 0.02);
    transform: translateY(-5px);
}

.card-header-horizontal {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.card-icon-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.08) 0%, rgba(10, 61, 98, 0.03) 100%);
    border-radius: 16px; /* soft rounded square */
    box-shadow: inset 0 2px 5px rgba(255, 255, 255, 1), 0 4px 15px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(255, 255, 255, 1);
    flex-shrink: 0;
}

.card-icon-wrapper i,
.card-icon-wrapper svg {
    width: 28px;
    height: 28px;
    color: var(--primary);
}

.card-title-group {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.card-subtitle {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: rgba(10, 61, 98, 0.6);
    font-weight: 600;
    margin-top: 2px;
}

.content-card h3 {
    font-size: 1.35rem;
    color: var(--primary);
    font-weight: 800;
    letter-spacing: 0.5px;
    margin: 0;
}

.content-card p {
    color: #5a6a7a;
    font-size: 1rem;
    line-height: 1.8;
    margin: 0;
}

.content-card ul {
    padding-left: 0;
    list-style: none;
    margin: 0;
}

.content-card ul li {
    padding: 10px 15px;
    margin-bottom: 5px;
    border-bottom: 1px solid rgba(10, 61, 98, 0.04);
    color: #5a6a7a;
    line-height: 1.6;
    border-radius: 6px;
    transition: background 0.2s ease;
    display: flex;
    align-items: flex-start;
}

.content-card ul li::before {
    content: "•";
    color: var(--primary);
    font-weight: bold;
    margin-right: 10px;
    opacity: 0.6;
}

.content-card ul li:hover {
    background: rgba(10, 61, 98, 0.02);
}

.content-card ul li:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

/* --- Departments Section --- */
.dept-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}



.dept-card {
    display: flex;
    flex-direction: column;
    padding: 0;
    align-items: stretch;
    background: white;
    border: none;
    border-radius: 12px;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.dept-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.15);
}

.dept-card>img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}

.dept-icon {
    background-color: #E2E8F0;
    width: 100%;
    height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0;
    flex-shrink: 0;
}

.dept-icon i {
    color: var(--primary);
}

.dept-info {
    background: linear-gradient(to right, #058899, #41C0C9);
    padding: 16px 10px;
    text-align: center;
    width: 100%;
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dept-info h3 {
    color: white;
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
    font-family: 'Open Sans', sans-serif;
}

.dept-info p {
    display: none;
}

/* --- Doctors Section --- */
.department-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 30px;
}

.department-filters .filter-btn {
    padding: 8px 16px;
    border: 1px solid var(--primary);
    background: transparent;
    color: var(--primary);
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.department-filters .filter-btn:hover,
.department-filters .filter-btn.active {
    background: var(--primary);
    color: #fff;
}

.doctors-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}



.practitioner-card {
    background: #FFFFFF;
    border-radius: var(--radius-sm);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid var(--border-color);
    position: relative;
    padding-top: 60px; /* Space for fixed-height header */
    min-width: 0; /* Prevents large intrinsic PNG sizes from overriding exactly 1fr width constraints in CSS Grid */
}

.practitioner-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.card-header {
    background-color: #FFFFFF !important;
    color: var(--primary);
    padding: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    z-index: 10;
    text-align: center;
    border-bottom: 1px solid #f0f0f0;
}

.dept-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 3px;
    color: var(--primary); /* Fix color visibility */
    display: block;
}

body.lang-ar .dept-title {
    display: none;
}

.dept-arabic {
    font-size: 1.15rem;
    font-weight: 700;
    display: none;
}

body.lang-ar .dept-arabic {
    display: block;
}

.img-wrapper {
    background-color: #FFFFFF !important;
    margin-top: 0;
    padding-top: 0;
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.img-wrapper::before {
    display: none;
}

.practitioner-img {
    width: 100%;
    height: auto;
    aspect-ratio: 1/1; /* 1:1 perfectly trims the bottom 20% of the 800x1000 canvas to remove blank space natively */
    object-fit: cover;
    object-position: top; /* Locks the high head level from the python script */
    border-radius: 0;
    position: relative;
    z-index: 2;
    border: none;
    display: block;
}

.practitioner-details {
    padding: 20px;
    background-color: #FFFFFF;
    text-align: center;
}

.practitioner-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 5px;
}

.practitioner-spec {
    color: #C0392B;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 15px;
}

.practitioner-schedule {
    font-size: 0.75rem;
    color: #7F8C8D;
    text-transform: uppercase;
}

/* Doctor Hovers */
.practitioner-hover-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    padding: 15px;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    z-index: 5;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 8px;
    border-top: 2px solid var(--primary);
    box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.1);
}

.practitioner-card:hover .practitioner-hover-info {
    transform: translateY(0);
}

.hover-info-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: #333;
    font-weight: 600;
}

.hover-info-item i {
    color: var(--primary);
}

.practitioner-hover-info p {
    font-size: 0.8rem;
    color: #555;
    margin: 0;
    line-height: 1.4;
}

/* Modal Styling */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.modal-content {
    background: white;
    width: 90%;
    max-width: 600px;
    border-radius: var(--radius-md);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transform: translateY(20px);
    transition: transform 0.3s ease;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    position: relative;
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    z-index: 10;
    color: #333;
}

.modal-close:hover {
    background: #f1f1f1;
}

.modal-header {
    background: var(--primary-light);
    display: flex;
    padding: 30px;
    gap: 20px;
    align-items: center;
}

.modal-img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid white;
    box-shadow: var(--shadow-md);
}

.modal-title h3 {
    font-size: 1.6rem;
    margin-bottom: 5px;
    color: #333;
}

.modal-title p {
    color: #C0392B;
    font-weight: 600;
    font-size: 0.95rem;
}

.modal-body {
    padding: 30px;
}

.modal-info-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 20px;
}

.modal-info-item i {
    color: var(--secondary);
    margin-top: 2px;
}

.modal-info-item p {
    margin: 5px 0 0;
    color: #555;
    font-size: 0.95rem;
}

.modal-footer {
    padding: 20px 30px;
    background: #f8f9fa;
    border-top: 1px solid var(--border-color);
    text-align: right;
}

/* --- Contact Section --- */
.contact-info-section {
    border-top: 1px solid var(--border-color);
}

.contact-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
}

.contact-method {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}

.method-icon {
    width: 48px;
    height: 48px;
    background-color: var(--primary-light);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
}

.method-icon i {
    color: var(--secondary);
}

.method-details h4 {
    margin-bottom: 5px;
}

.method-details p {
    color: var(--text-muted);
}

.map-container {
    background-color: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 350px;
}

.map-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    color: var(--text-muted);
}

.map-placeholder i {
    width: 40px;
    height: 40px;
    color: #CBD5E1;
}

/* --- Footer --- */
.site-footer {
    background-color: #0c1c2e;
    /* Very dark medical blue */
    color: white;
}

.footer-main {
    padding: 60px 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.footer-logo img {
    height: 40px;
    border-radius: 4px;
    /* Optional, for cleaner look */
}

.footer-logo span {
    font-size: 1.1rem;
    font-weight: 700;
}

.footer-about-text {
    color: #94A3B8;
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.social-icons {
    display: flex;
    gap: 12px;
}

.social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    color: white;
}

.social-icons a:hover {
    background-color: var(--secondary);
}

.widget-title {
    color: white;
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.footer-menu li {
    margin-bottom: 10px;
}

.footer-menu a {
    color: #94A3B8;
    font-size: 0.95rem;
}

.footer-menu a:hover {
    color: white;
}

.hours-list li {
    display: flex;
    flex-direction: column;
    margin-bottom: 12px;
    font-size: 0.95rem;
}

.hours-list span {
    color: #94A3B8;
}

.footer-bottom {
    background-color: #06101a;
    padding: 20px 0;
    font-size: 0.85rem;
    color: #94A3B8;
}

.bottom-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.bottom-links {
    display: flex;
    gap: 20px;
}

.bottom-links a:hover {
    color: white;
}

/* Animations */
.fade-in {
    animation: fadeIn 0.8s ease forwards;
}

.fade-in-up {
    animation: fadeInUp 0.8s ease forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(15px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.bottom-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

/* Responsiveness */
@media (max-width: 768px) {
    .top-bar {
        display: none;
    }

    .bottom-flex {
        flex-direction: column;
        justify-content: center;
        text-align: center;
        gap: 15px;
    }
}

.developer-credit {
    margin-top: 0; 
    font-size: 0.9rem;
    color: #94A3B8;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.developer-credit a {
    color: #cfa161; /* Gold color from screenshot */
    transition: transform 0.3s ease, color 0.3s ease;
    display: flex;
    align-items: center;
    text-decoration: none;
}

.developer-credit a:hover {
    color: #e5b985;
    transform: scale(1.1);
}

.developer-credit i {
    width: 20px;
    height: 20px;
}

/* Additions to style.css for Multi-page layout */

/* Store / Offers Section */
.offers-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 20px;
}



.offer-card {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 30px;
    border-radius: var(--radius-sm);
    text-align: center;
    position: relative;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.offer-card .btn {
    margin-top: auto !important;
}

.offer-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

.offer-price {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--secondary);
    margin-bottom: 20px;
}

.popular-offer {
    border-top: 4px solid var(--secondary);
}

.popular-badge {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--secondary);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
}



/* Internal Page Headers */
.internal-header {
    background-color: rgba(0, 0, 0, 0.4);
    color: white;
    padding: 80px 0 60px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.doctors-header {
    background: linear-gradient(rgba(10, 61, 98, 0.5), rgba(10, 61, 98, 0.5)), url('./assets/web banner.png') center/130% no-repeat;
    padding: 100px 0;
}

.about-header {
    background: linear-gradient(rgba(10, 61, 98, 0.5), rgba(10, 61, 98, 0.5)), url('./assets/clinic.jpeg') center/cover no-repeat;
}

.departments-header {
    background: linear-gradient(rgba(10, 61, 98, 0.85), rgba(10, 61, 98, 0.85)), url('./assets/departments_header_bg.png') center/cover no-repeat;
}

.contact-header {
    background: linear-gradient(rgba(10, 61, 98, 0.85), rgba(10, 61, 98, 0.85)), url('./assets/contact_header_bg.png') center/cover no-repeat;
}

.dermatology-header {
    background: linear-gradient(rgba(10, 61, 98, 0.85), rgba(10, 61, 98, 0.85)), url('./assets/hero_bg.png') center/cover no-repeat;
}

@media (max-width: 768px) {
    .internal-header {
        padding: 120px 0 50px; /* More top padding to account for mobile navbar bubble */
    }
    .doctors-header, 
    .about-header, 
    .departments-header, 
    .contact-header, 
    .dermatology-header, 
    .store-header {
        background-size: cover !important;
        background-position: center !important;
        padding: 140px 0 60px !important;
    }
}

.internal-header h1 {
    color: white;
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.internal-header p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}


.store-header {
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('./assets/offers_bkd.jpg') center/cover no-repeat;
}




.highlight-link {
    color: var(--secondary) !important;
    font-weight: 600 !important;
}

/* Specific store filters */
.store-filters {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 16px;
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    cursor: pointer;
    font-family: 'Roboto', sans-serif;
    font-weight: 500;
    transition: var(--transition);
}

.filter-btn.active,
.filter-btn:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}



/* Scroll Revealing Animations */
.fade-in-up {
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

/* --- RTL Support --- */
[dir="rtl"] {
    text-align: right;
}

[dir="rtl"] .logo {
    justify-content: flex-start;
}

[dir="rtl"] .nav-links {
    margin: 0 !important;
}

[dir="rtl"] .nav-right {
    justify-content: flex-end;
}

[dir="rtl"] .accreditation-link {
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
}

[dir="rtl"] .feature-box {
    border-right: none !important;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
}

[dir="rtl"] .feature-box:last-child {
    border-left: none !important;
}

[dir="rtl"] .bullet-item i {
    margin-right: 0 !important;
    margin-left: 10px;
}

/* Fix inline styles which have padding-left: 20px and text-align: left */
[dir="rtl"] [style*="text-align: left"] {
    text-align: right !important;
}

[dir="rtl"] [style*="padding-left: 20px"] {
    padding-left: 0 !important;
    padding-right: 20px !important;
}

[dir="rtl"] .practitioner-hover-info {
    text-align: right;
}

/* --- Medical Services Grid --- */
.services-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: clamp(30px, 5vw, 60px);
    margin-top: 40px;
}

.service-card {
    background: transparent;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.service-card:hover {
    transform: translateY(-10px);
}

.service-image-container {
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border-radius: 30px;
    box-shadow: 0 15px 35px -10px rgba(0, 0, 0, 0.15);
    margin-bottom: 25px;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.service-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s ease;
}

.service-card:hover .service-image-container img {
    transform: scale(1.08);
}

.service-info-row {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 0 5px;
}

.service-icon-box {
    width: 54px;
    height: 54px;
    background: #EBF4FA;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03);
    transition: background 0.3s ease;
}

.service-card:hover .service-icon-box {
    background: #D1E9F6;
}

.service-icon-box i {
    width: 26px;
    height: 26px;
    color: #0D9488;
}

.service-text-content h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.65rem;
    color: #0F172A;
    margin: 0;
    font-weight: 700;
    line-height: 1.2;
}

.service-text-content p {
    font-family: 'Inter', sans-serif;
    font-size: 1.05rem;
    color: #64748B;
    margin: 6px 0 0 0;
    font-weight: 600;
}

@media (max-width: 991px) {
    .service-text-content h3 {
        font-size: 1.45rem;
    }
}

@media (max-width: 768px) {
    .services-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .service-image-container {
        border-radius: 24px;
    }
    
    .service-text-content h3 {
        font-size: 1.4rem;
    }
    
    .service-info-row {
        gap: 15px;
    }
    
    .service-icon-box {
        width: 48px;
        height: 48px;
    }
    
    .service-icon-box i {
        width: 22px;
        height: 22px;
    }
}

/* RTL Support for Medical Services */
[dir="rtl"] .medical-services-title-wrapper {
    flex-direction: row-reverse;
}

[dir="rtl"] .medical-services-title-wrapper .gradient-line {
    margin-right: 0 !important;
    margin-left: 25px;
}

[dir="rtl"] .medical-services-title-wrapper div {
    text-align: right;
}

[dir="rtl"] .service-info-row {
    flex-direction: row-reverse;
}

[dir="rtl"] .service-text-content {
    text-align: right;
}

/* ==========================================================================
   STRICT MOBILE-ONLY OVERRIDES (MAX-WIDTH: 768PX)
   ========================================================================== */
@media (max-width: 768px) {
    /* 🔷 1. Container Fix & Side Spacing */
    .container {
        padding: 0 16px !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    /* 🔷 2. Grid & Card Layout (1 card per row) */
    .mission-grid,
    .dept-grid,
    .doctors-grid,
    .offers-grid,
    .features-grid,
    .footer-grid,
    .contact-layout,
    .about-wrapper,
    .services-grid {
        grid-template-columns: 1fr !important;
        display: grid !important;
        gap: 30px !important;
    }

    .feature-box {
        border-right: none !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    }
    
    .feature-box:last-child {
        border-bottom: none !important;
    }

    /* 🔷 3. Typography Scaling */
    h1, .hero-text-box h1 { font-size: 2.2rem !important; }
    h2, .section-title { font-size: 1.8rem !important; }
    h3 { font-size: 1.5rem !important; }
    p, .hero-text-box p { font-size: 1rem !important; }

    /* 🔷 4. Button Fix (Full Width) */
    .btn, 
    .hero-btns .btn,
    .offer-card .btn,
    .appointment-form .btn {
        width: 100% !important;
        margin-bottom: 10px !important;
        display: block !important;
        text-align: center !important;
    }
    
    .hero-btns {
        flex-direction: column !important;
        gap: 10px !important;
    }

    /* 🔷 5. Filter Buttons */
    .store-filters {
        display: flex !important;
        justify-content: flex-start !important;
        gap: 12px !important;
        margin: 0 0 30px 0 !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        padding: 10px 5px !important;
        -webkit-overflow-scrolling: touch !important;
    }

    .department-filters {
        display: flex !important;
        justify-content: center !important;
        gap: 10px !important;
        margin: 0 0 30px 0 !important;
        flex-wrap: wrap !important;
        padding: 10px 5px !important;
    }

    .store-filters::-webkit-scrollbar {
        display: none !important;
    }

    .filter-btn {
        white-space: nowrap !important;
        flex-shrink: 0 !important;
    }

    .department-filters .filter-btn {
        white-space: normal !important;
        flex-shrink: initial !important;
    }

    /* 🔷 6. Image Handling */
    img, 
    .about-main-img, 
    .service-image-container img, 
    .practitioner-img {
        width: 100% !important;
        height: auto !important;
        max-width: 100% !important;
    }

    /* Fix for currency images (SAR) to keep them small like desktop */
    .offer-price img,
    .custom-select img,
    .custom-option img,
    .logo img,
    .accreditation-logo {
        width: auto !important;
    }
    
    .offer-price img,
    .custom-select img,
    .custom-option img {
        height: 1.1em !important;
        display: inline-block !important;
        vertical-align: middle !important;
    }

    /* 🔷 Hide boring top bar on mobile */
    .top-bar {
        display: none !important;
    }

    /* 🔷 Premium Language Switcher Positioning */
    .custom-lang-wrapper {
        margin: 0 !important;
        display: flex;
        align-items: center;
    }

    .nav-actions {
        display: flex !important;
        align-items: center;
        gap: 15px;
    }

    .lang-pill-container {
        background: rgba(255, 255, 255, 0.15) !important;
        border: 1px solid rgba(255, 255, 255, 0.25) !important;
        padding: 5px 12px !important;
        border-radius: 25px !important;
        backdrop-filter: blur(15px) !important;
        -webkit-backdrop-filter: blur(15px) !important;
        display: flex !important;
        align-items: center !important;
    }

    .custom-lang-select {
        background: transparent !important;
        border: none !important;
        color: white !important;
        font-size: 0.8rem !important;
        font-weight: 700 !important;
        padding: 0 !important;
        margin: 0 !important;
        appearance: none !important; /* Remove default chevron for ultra-clean look */
    }

    .custom-lang-select:hover {
        background: rgba(255, 255, 255, 0.2) !important;
    }

    .navbar.hero-nav {
        border-radius: 12px !important;
        margin: 10px 10px 0 !important;
        top: 10px !important;
        max-width: calc(100% - 20px) !important;
    }

    .navbar-content {
        padding: 0 10px !important;
        display: flex !important;
        justify-content: space-between !important;
        gap: 10px !important;
    }

    .nav-links {
        display: none !important; /* Managed by JS class toggle */
        position: absolute !important;
        top: 100% !important;
        left: 0 !important;
        right: 0 !important;
        background: rgba(10, 61, 98, 0.98) !important;
        flex-direction: column !important;
        padding: 20px !important;
        gap: 15px !important;
        border-bottom: 3px solid var(--secondary) !important;
        text-align: center !important;
        border-radius: 0 0 15px 15px !important;
        box-shadow: 0 10px 30px rgba(0,0,0,0.3) !important;
    }

    .nav-links.active {
        display: flex !important;
    }

    .mobile-toggle {
        display: block !important;
    }
    
    .nav-right .accreditation-link {
        display: block !important;
    }
    
    .accreditation-logo {
        height: 32px !important;
        width: auto !important;
    }

    /* 🔷 9. Spacing Fix & Hero Gaps */
    .section-padding {
        padding: 40px 0 !important;
    }
    
    /* Fix for Modals (like Gentle Pro Max View Details) */
    #spectra-modal,
    #gentle-modal,
    #eco2-modal,
    #hydra-modal,
    #scalp-modal {
        align-items: flex-start !important;
        overflow-y: auto !important;
        padding-top: 20px !important;
        padding-bottom: 20px !important;
    }

    #spectra-modal-content,
    #gentle-modal-content,
    #eco2-modal-content,
    #hydra-modal-content,
    #scalp-modal-content {
        padding: 20px !important;
        max-height: none !important; /* Allow natural height, parent scrolls */
        width: 95% !important;
        margin: 0 auto !important;
        transform: scale(1) !important;
    }

    .hero {
        height: auto !important;
        min-height: 480px !important;
        padding: 140px 0 60px !important;
        margin-top: -80px !important;
    }
    
    .hero-bg {
        background-attachment: scroll !important;
    }

    .footer-bottom .bottom-flex {
        flex-direction: column !important;
        gap: 15px !important;
        text-align: center !important;
    }

    .contact-layout {
        gap: 40px !important;
    }
    
    .map-container {
        min-height: 250px !important;
    }
}

/* =========================================
   🌐 FULL RTL SUPPORT (ARABIC)
   ========================================= */

[dir="rtl"] {
    text-align: right;
}

[dir="rtl"] .logo {
    justify-content: flex-start; /* In RTL, flex-start is the right side */
}

[dir="rtl"] .nav-right {
    justify-content: flex-end; /* In RTL, flex-end is the left side */
}

/* Reverse layout for feature boxes */
[dir="rtl"] .feature-box {
    border-right: none;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
}

[dir="rtl"] .feature-box:last-child {
    border-left: none;
}

/* Align bullets correctly */
[dir="rtl"] .bullet-item i {
    /* gap handles this, but ensuring no stray margins */
}

[dir="rtl"] .content-card ul li::before {
    margin-right: 0;
    margin-left: 10px;
}

/* Flip icons that indicate direction */
[dir="rtl"] .lucide-chevron-right,
[dir="rtl"] .lucide-arrow-right,
[dir="rtl"] .btn i[data-lucide="arrow-right"] {
    transform: rotate(180deg);
}

/* Watermark position reversal */
[dir="rtl"] .card-watermark {
    right: auto;
    left: -30px;
}

/* Form and Input fixes */
[dir="rtl"] input, 
[dir="rtl"] textarea, 
[dir="rtl"] select {
    text-align: right;
}

/* Language Switcher alignment */
[dir="rtl"] .custom-lang-wrapper {
    margin-right: 0;
    margin-left: 15px;
}

/* Accreditations and logos */
[dir="rtl"] .nav-right {
    gap: 20px;
}

/* Responsive adjustments for RTL */
@media (max-width: 1024px) {
    [dir="rtl"] .nav-links {
        left: 0;
        right: 0;
        text-align: right;
    }
    
    [dir="rtl"] .mobile-toggle {
        order: -1; /* Move toggle to the left end in RTL mobile */
    }
}

/* Section specific RTL adjustments */
[dir="rtl"] .about-bullets {
    padding-right: 0;
}

[dir="rtl"] .footer-col h4::after {
    left: auto;
    right: 0;
}

/* Offer cards and store fixes */
[dir="rtl"] .offer-card .btn {
    flex-direction: row-reverse;
}

[dir="rtl"] .offer-card .btn i {
    margin-left: 8px;
    margin-right: 0;
    transform: rotate(180deg);
}

/* Ensure font is applied to all elements */
[dir="rtl"] body, 
[dir="rtl"] .navbar,
[dir="rtl"] .nav-links a,
[dir="rtl"] .hero-text-box h1,
[dir="rtl"] .section-title,
[dir="rtl"] .btn,
[dir="rtl"] input,
[dir="rtl"] textarea,
[dir="rtl"] .offer-card h3,
[dir="rtl"] .practitioner-name {
    font-family: 'Cairo', 'Tajawal', sans-serif !important;
}