/* ================================================= */
/* 1. Variables*/
/* ================================================= */
:root {
    --color-primary: #0A3D62;
    --color-primary-light: #1565A8;
    --color-primary-dark: #072C46;

    --color-secondary: #2B9DA3;
    --color-secondary-light: #4DB8BD;
    --color-secondary-dark: #1F7B7F;

    --color-accent: #C5A572;
    --color-accent-light: #D6BC8F;
    --color-accent-dark: #A88C5C;

    --color-bg-main: #FFFFFF;
    --color-bg-surface: #F7F9FB;
    --color-bg-soft: #EEF3F7;

    --color-text-main: #1A2332;
    --color-text-muted: #6B7280;
    --color-text-light: #9AA5B1;

    --color-border: #D9E2EC;
    --color-border-soft: #E6EDF3;

    --color-success: #2E7D6B;
    --color-warning: #F2A541;
    --color-danger: #D64545;
    --color-info: #3182CE;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 10px 20px rgba(0, 0, 0, 0.08);
    --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.10);

    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 14px;
    --radius-xl: 20px;
    --radius-full: 9999px;

    --transition-fast: 150ms ease-in-out;
    --transition-base: 250ms ease-in-out;
    --transition-slow: 350ms ease-in-out;

    --font-latin: 'Inter', sans-serif;
    --font-arabic: 'Noto Kufi Arabic', sans-serif;
}


/* ================================================= */
/* 2. Reset & Base                */
/* ================================================= */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-latin);
    line-height: 1.7;
    background-color: var(--color-bg-main);
    color: var(--color-text-main);
    -webkit-font-smoothing: antialiased;
}

/* Arabic overrides */
html[lang="ar"] body,
html[lang="ar"] h1,
html[lang="ar"] h2,
html[lang="ar"] h3,
html[lang="ar"] h4,
html[lang="ar"] h5,
html[lang="ar"] h6,
html[lang="ar"] p,
html[lang="ar"] a,
html[lang="ar"] button,
html[lang="ar"] input,
html[lang="ar"] textarea,
html[lang="ar"] select {
    font-family: var(--font-arabic);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    line-height: 1.3;
    color: var(--color-text-main);
}

p {
    color: var(--color-text-muted);
    line-height: 1.8;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--color-secondary);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul,
ol {
    list-style: none;
    padding: 0;
    margin: 0;
}

button {
    cursor: pointer;
    border: none;
    background: none;
}


/* ================================================= */
/* 3. Scrollbar                                      */
/* ================================================= */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--color-bg-soft);
}

::-webkit-scrollbar-thumb {
    background: var(--color-secondary);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-primary);
}

::selection {
    background: var(--color-secondary);
    color: #fff;
}


/* ================================================= */
/* 4. Bootstrap Overrides                            */
/* ================================================= */
.container {
    max-width: 1280px;
}

.btn-primary {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
    border-radius: var(--radius-md);
    font-weight: 600;
    padding: 0.6rem 1.5rem;
    transition: all var(--transition-base);
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--color-primary-light);
    border-color: var(--color-primary-light);
    box-shadow: 0 4px 12px rgba(10, 61, 98, 0.3);
}

.btn-secondary {
    background-color: var(--color-secondary);
    border-color: var(--color-secondary);
    border-radius: var(--radius-md);
    font-weight: 600;
    padding: 0.6rem 1.5rem;
    transition: all var(--transition-base);
}

.btn-secondary:hover,
.btn-secondary:focus {
    background-color: var(--color-secondary-dark);
    border-color: var(--color-secondary-dark);
    box-shadow: 0 4px 12px rgba(43, 157, 163, 0.3);
}

.btn-outline-primary {
    color: var(--color-primary);
    border-color: var(--color-primary);
    border-radius: var(--radius-md);
    font-weight: 600;
    padding: 0.6rem 1.5rem;
    transition: all var(--transition-base);
}

.btn-outline-primary:hover {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
    box-shadow: 0 4px 12px rgba(10, 61, 98, 0.2);
}


/* ================================================= */
/* 5. Utilities                                      */
/* ================================================= */
.text-primary-custom {
    color: var(--color-primary) !important;
}

.text-secondary-custom {
    color: var(--color-secondary) !important;
}

.text-accent {
    color: var(--color-accent) !important;
}

.text-muted-custom {
    color: var(--color-text-muted) !important;
}

.bg-primary-custom {
    background-color: var(--color-primary) !important;
}

.bg-secondary-custom {
    background-color: var(--color-secondary) !important;
}

.bg-surface {
    background-color: var(--color-bg-surface) !important;
}

.bg-soft {
    background-color: var(--color-bg-soft) !important;
}

.shadow-custom-sm {
    box-shadow: var(--shadow-sm);
}

.shadow-custom-md {
    box-shadow: var(--shadow-md);
}

.shadow-custom-lg {
    box-shadow: var(--shadow-lg);
}

.section-padding {
    padding-top: 80px;
    padding-bottom: 80px;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 0.5rem;
}

.section-subtitle {
    font-size: 1rem;
    color: var(--color-text-muted);
    margin-bottom: 2.5rem;
}

.section-divider {
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--color-secondary), var(--color-accent));
    border-radius: var(--radius-full);
    margin-bottom: 1rem;
}


/* ================================================= */
/* 6. Scroll Reveal Animation                        */
/* ================================================= */
[data-reveal] {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

[data-reveal].revealed {
    opacity: 1;
    transform: translateY(0);
}


/* ================================================= */
/* 7. Responsive                */
/* ================================================= */
@media (max-width: 768px) {
    .section-title {
        font-size: 1.5rem;
    }

    .section-padding {
        padding-top: 50px;
        padding-bottom: 50px;
    }
}


/* ================================================= */
/* NAVBAR                                            */
/* ================================================= */
#main-navbar {
    padding: 0;
    background: transparent;
    transition: background var(--transition-slow), box-shadow var(--transition-slow), padding var(--transition-slow);
    z-index: 1000;
}

#main-navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
    transition: height var(--transition-slow);
}

/* Scrolled State */
#main-navbar.navbar-scrolled {
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 2px 30px rgba(10, 61, 98, 0.10);
}

#main-navbar.navbar-scrolled .container {
    height: 64px;
}

/* On hero (transparent bg) - white text */
#main-navbar:not(.navbar-scrolled) .nav-link-custom,
#main-navbar:not(.navbar-scrolled) .brand-name,
#main-navbar:not(.navbar-scrolled) .brand-tagline,
#main-navbar:not(.navbar-scrolled) .hamburger-line {
    color: #fff;
}

#main-navbar:not(.navbar-scrolled) .brand-icon {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.4);
}

#main-navbar:not(.navbar-scrolled) .lang-switcher {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.35);
}

#main-navbar:not(.navbar-scrolled) .btn-appointment {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.5);
    color: #fff;
    backdrop-filter: blur(8px);
}

#main-navbar:not(.navbar-scrolled) .btn-appointment:hover {
    background: #fff;
    color: var(--color-primary);
}

/* ---- Brand ---- */
.navbar-brand {
    padding: 0;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-icon {
    width: 44px;
    height: 44px;
    border: 1.5px solid var(--color-secondary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary);
    transition: all var(--transition-base);
    flex-shrink: 0;
}

.navbar-brand:hover .brand-icon {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #fff;
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.brand-name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-primary);
    letter-spacing: -0.01em;
    transition: color var(--transition-fast);
}

.brand-tagline {
    font-size: 0.68rem;
    color: var(--color-accent);
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    transition: color var(--transition-fast);
}

/* ---- Nav Collapse ---- */
.navbar-collapse-custom {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ---- Nav List ---- */
.navbar-nav-custom {
    display: flex;
    align-items: center;
    gap: 4px;
    margin: 0;
}

/* ---- Nav Link ---- */
.nav-link-custom {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 14px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-text-main);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    white-space: nowrap;
    position: relative;
}

.nav-link-custom::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 14px;
    right: 14px;
    height: 2px;
    background: var(--color-secondary);
    border-radius: var(--radius-full);
    transform: scaleX(0);
    transition: transform var(--transition-base);
}

.nav-link-custom:hover,
.nav-link-custom.active {
    color: var(--color-primary);
    background: var(--color-bg-soft);
}

.nav-link-custom:hover::after,
.nav-link-custom.active::after {
    transform: scaleX(1);
}

#main-navbar:not(.navbar-scrolled) .nav-link-custom:hover,
#main-navbar:not(.navbar-scrolled) .nav-link-custom.active {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

.dropdown-arrow {
    transition: transform var(--transition-base);
    flex-shrink: 0;
}

/* ---- Dropdown ---- */
.nav-dropdown {
    position: relative;
}

.nav-dropdown-menu {
    position: absolute;
    top: calc(100% + 12px);
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    min-width: 280px;
    background: #fff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--color-border-soft);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all var(--transition-base);
    z-index: 100;
}

html[dir="rtl"] .nav-dropdown-menu {
    left: auto;
    right: 50%;
    transform: translateX(50%) translateY(-8px);
}

.nav-dropdown-menu::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 12px;
    height: 12px;
    background: #fff;
    border-left: 1px solid var(--color-border-soft);
    border-top: 1px solid var(--color-border-soft);
}

.nav-dropdown:hover .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}

html[dir="rtl"] .nav-dropdown:hover .nav-dropdown-menu {
    transform: translateX(50%) translateY(0);
}

.nav-dropdown:hover .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-inner {
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.dropdown-item-custom {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: var(--radius-md);
    transition: background var(--transition-fast);
    color: var(--color-text-main);
}

.dropdown-item-custom:hover {
    background: var(--color-bg-soft);
    color: var(--color-primary);
}

.dropdown-item-icon {
    font-size: 1.4rem;
    width: 40px;
    height: 40px;
    background: var(--color-bg-soft);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background var(--transition-fast);
}

.dropdown-item-custom:hover .dropdown-item-icon {
    background: rgba(43, 157, 163, 0.12);
}

.dropdown-item-title {
    display: block;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--color-text-main);
}

.dropdown-item-desc {
    display: block;
    font-size: 0.75rem;
    color: var(--color-text-muted);
    margin-top: 1px;
}

/* ---- Actions ---- */
.navbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-inline-start: 16px;
}

/* Language Switcher */
.lang-switcher {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-full);
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--color-text-main);
    background: transparent;
    cursor: pointer;
    transition: all var(--transition-base);
    letter-spacing: 0.03em;
}

.lang-switcher:hover {
    border-color: var(--color-secondary);
    color: var(--color-secondary);
    background: rgba(43, 157, 163, 0.06);
}

.lang-globe {
    font-size: 0.9rem;
}

.lang-divider {
    width: 1px;
    height: 12px;
    background: currentColor;
    opacity: 0.3;
}

.lang-other {
    opacity: 0.5;
}

/* CTA Button */
.btn-appointment {
    padding: 9px 20px;
    background: var(--color-primary);
    color: #fff !important;
    border: 1.5px solid var(--color-primary);
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    transition: all var(--transition-base);
    letter-spacing: 0.01em;
}

.btn-appointment:hover {
    background: var(--color-primary-light);
    border-color: var(--color-primary-light);
    box-shadow: 0 4px 16px rgba(10, 61, 98, 0.3);
    transform: translateY(-1px);
    color: #fff !important;
}

/* ---- Hamburger ---- */
.navbar-toggler-custom {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1100;
    position: relative;
}

.hamburger-line {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--color-primary);
    border-radius: var(--radius-full);
    transition: all var(--transition-base);
    transform-origin: center;
}

.navbar-toggler-custom.open .hamburger-line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.navbar-toggler-custom.open .hamburger-line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.navbar-toggler-custom.open .hamburger-line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ---- Mobile Overlay ---- */
.nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(10, 61, 98, 0.4);
    backdrop-filter: blur(4px);
    z-index: 999;
    opacity: 0;
    transition: opacity var(--transition-base);
}

.nav-overlay.active {
    opacity: 1;
}

/* ---- Mobile ---- */
@media (max-width: 991px) {
    .navbar-toggler-custom {
        display: flex;
    }

    .navbar-collapse-custom {
        position: fixed;
        top: 0;
        right: 0;
        width: min(320px, 85vw);
        height: 100vh;
        background: #ffffff !important;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        padding: 90px 20px 30px;
        gap: 0;
        transform: translateX(100%);
        transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1050;
        overflow-y: auto;
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.10);
    }

    html[dir="rtl"] .navbar-collapse-custom {
        right: auto;
        left: 0;
        transform: translateX(-100%);
    }

    /* ✅ اصلاح باگ: specificity بالاتر برای حالت open در هر دو جهت */
    .navbar-collapse-custom.open {
        transform: translateX(0) !important;
    }

    .nav-overlay {
        display: block;
        pointer-events: none;
    }

    .nav-overlay.active {
        pointer-events: auto;
    }

    .navbar-nav-custom {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 2px;
        width: 100%;
    }

    .nav-item-custom {
        display: block;
    }

    .nav-link-custom {
        display: flex;
        padding: 12px 16px;
        font-size: 0.95rem;
        justify-content: space-between;
        white-space: normal;
    }

    .nav-link-custom::after {
        display: none;
    }

    /* Mobile Dropdown Fix */
    .nav-dropdown-menu {
        position: static !important;
        transform: none !important;
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        box-shadow: none;
        border: none;
        background: var(--color-bg-soft);
        border-radius: var(--radius-md);
        margin-top: 4px;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        min-width: 0 !important;
        width: 100% !important;
    }

    .nav-dropdown-menu::before {
        display: none !important;
    }

    .nav-dropdown.open .nav-dropdown-menu {
        max-height: 500px;
    }

    .nav-dropdown.open .dropdown-arrow {
        transform: rotate(180deg);
    }

    /* Dropdown items - fix overflow */
    .dropdown-inner {
        padding: 6px;
        width: 100%;
    }

    .dropdown-item-custom {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 10px 12px;
        width: 100%;
        overflow: hidden;
    }

    .dropdown-item-icon {
        width: 36px;
        height: 36px;
        min-width: 36px;
        flex-shrink: 0;
        font-size: 1.2rem;
    }

    .dropdown-item-custom > div:last-child {
        flex: 1;
        min-width: 0;
        overflow: hidden;
    }

    .dropdown-item-title {
        display: block;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .dropdown-item-desc {
        display: block;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .navbar-actions {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        margin-inline-start: 0;
        margin-top: 16px;
        padding-top: 16px;
        border-top: 1px solid var(--color-border-soft);
        gap: 10px;
    }

    .lang-switcher {
        justify-content: center;
    }

    .btn-appointment {
        text-align: center;
    }

    /* Fix colors when navbar is transparent (on hero) */
    #main-navbar:not(.navbar-scrolled) .navbar-collapse-custom .nav-link-custom,
    #main-navbar:not(.navbar-scrolled) .navbar-collapse-custom .lang-current,
    #main-navbar:not(.navbar-scrolled) .navbar-collapse-custom .lang-other,
    #main-navbar:not(.navbar-scrolled) .navbar-collapse-custom .lang-switcher {
        color: var(--color-text-main) !important;
    }

    #main-navbar:not(.navbar-scrolled) .navbar-collapse-custom .lang-switcher {
        border-color: var(--color-border) !important;
    }

    #main-navbar:not(.navbar-scrolled) .navbar-collapse-custom .dropdown-item-title {
        color: var(--color-text-main) !important;
    }

    #main-navbar:not(.navbar-scrolled) .navbar-collapse-custom .dropdown-item-desc {
        color: var(--color-text-muted) !important;
    }

    #main-navbar:not(.navbar-scrolled) .navbar-collapse-custom .dropdown-item-icon {
        color: var(--color-primary) !important;
    }

    /* RTL specific fixes for mobile */
    html[dir="rtl"] .nav-link-custom {
        flex-direction: row-reverse;
        text-align: right;
    }

    html[dir="rtl"] .dropdown-item-custom {
        flex-direction: row-reverse;
        text-align: right;
    }

    html[dir="rtl"] .dropdown-item-custom > div:last-child {
        text-align: right;
    }
}


/* ================================================= */
/* CLINICS HERO                                       */
/* ================================================= */
.clinics-hero {
    position: relative;
    min-height: 420px;
    display: flex;
    align-items: center;
    overflow: hidden;
    padding-top: 80px;
}

.clinics-hero-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 45%, var(--color-secondary-dark) 100%);
}

.clinics-hero-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at 20% 50%, rgba(197, 165, 114, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(43, 157, 163, 0.2) 0%, transparent 40%);
}

.clinics-hero-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.clinics-hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 60px 0 80px;
}

.clinics-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.9);
    padding: 8px 18px;
    border-radius: var(--radius-full);
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 20px;
}

.clinics-hero-title {
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 800;
    color: #fff;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
    line-height: 1.15;
}

.clinics-hero-subtitle {
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.72);
    max-width: 520px;
    margin: 0 auto;
    line-height: 1.7;
}

.clinics-hero-wave {
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    line-height: 0;
}

.clinics-hero-wave svg {
    width: 100%;
    height: 60px;
}

/* ================================================= */
/* CLINICS GRID - LUXURY IMAGE CARDS                 */
/* ================================================= */
.clinics-section {
    padding: 60px 0 100px;
    background: var(--color-bg-main);
}

.clinics-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

/* ---- Clinic Card ---- */
.clinic-card {
    position: relative;
    display: block;
    border-radius: var(--radius-xl);
    overflow: hidden;
    aspect-ratio: 4/3;
    text-decoration: none;
    box-shadow: 0 8px 24px rgba(10, 61, 98, 0.12);
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.5s ease;
}

.clinic-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 24px 60px rgba(10, 61, 98, 0.22);
}

/* Image */
.clinic-card-img {
    position: absolute;
    inset: 0;
}

.clinic-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.clinic-card:hover .clinic-card-img img {
    transform: scale(1.15);
}

/* Overlay */
.clinic-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top,
    rgba(7, 44, 70, 0.85) 0%,
    rgba(7, 44, 70, 0.4) 50%,
    rgba(7, 44, 70, 0.1) 100%);
    transition: background 0.5s ease;
}

.clinic-card:hover .clinic-card-overlay {
    background: linear-gradient(to top,
    rgba(43, 157, 163, 0.92) 0%,
    rgba(10, 61, 98, 0.75) 60%,
    rgba(10, 61, 98, 0.3) 100%);
}

/* Content */
.clinic-card-content {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px;
    z-index: 1;
}

.clinic-card-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 16px;
    text-align: center;
    letter-spacing: -0.01em;
    transform: translateY(0);
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.clinic-card:hover .clinic-card-title {
    transform: translateY(-12px);
}

/* CTA Button */
.clinic-card-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(12px);
    border: 1.5px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-full);
    color: #fff;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.clinic-card-cta::after {
    content: '→';
    font-size: 1.1rem;
    transition: transform 0.3s ease;
}

.clinic-card:hover .clinic-card-cta {
    opacity: 1;
    transform: translateY(0);
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
}

.clinic-card:hover .clinic-card-cta::after {
    transform: translateX(4px);
}

/* ---- Responsive ---- */
@media (max-width: 991px) {
    .clinics-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }
}

@media (max-width: 576px) {
    .clinics-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .clinic-card-title {
        font-size: 1.3rem;
    }

    .clinics-hero {
        min-height: 320px;
    }
}

/* RTL */
html[dir="rtl"] .clinic-card-cta::after {
    content: '←';
}

html[dir="rtl"] .clinic-card:hover .clinic-card-cta::after {
    transform: translateX(-4px);
}

/* ================================================= */
/* LUXURY LIGHT SWEEP EFFECT                         */
/* ================================================= */
.clinic-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -75%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right,
    transparent 0%,
    rgba(255, 255, 255, 0.18) 50%,
    transparent 100%);
    transform: skewX(-15deg);
    z-index: 2;
    opacity: 0;
    transition: none;
}

.clinic-card:hover::before {
    animation: luxurySweep 0.75s ease forwards;
}

@keyframes luxurySweep {
    0% {
        left: -75%;
        opacity: 1;
    }

    100% {
        left: 125%;
        opacity: 1;
    }
}

/* Gold shimmer on CTA button */
.clinic-card-cta {
    position: relative;
    overflow: hidden;
}

.clinic-card-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(to right,
    transparent,
    rgba(255, 255, 255, 0.35),
    transparent);
    transform: skewX(-20deg);
}

.clinic-card:hover .clinic-card-cta::before {
    animation: ctaShimmer 1s ease 0.3s forwards;
}

@keyframes ctaShimmer {
    0% {
        left: -100%;
    }

    100% {
        left: 150%;
    }
}

/* Subtle gold border glow on hover */
.clinic-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-xl);
    border: 1.5px solid transparent;
    background: linear-gradient(135deg, rgba(197, 165, 114, 0.6), rgba(255, 255, 255, 0.1), rgba(197, 165, 114, 0.4)) border-box;
    -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: destination-out;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 3;
    pointer-events: none;
}

.clinic-card:hover::after {
    opacity: 1;
}


/* ================================================= */
/* 🌟 LUXURY UNIQUE FOOTER                         */
/* ================================================= */

.footer-lux {
    background: linear-gradient(135deg, #061121 0%, #0d284a 50%, #081e3a 100%);
    color: #cbd5e1;
    overflow: hidden;
    position: relative;
}

/* --- 🌊 Top SVG Wave --- */
.custom-shape-divider-top {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
    transform: translateY(-1px);
}

.custom-shape-divider-top svg {
    position: relative;
    display: block;
    width: calc(100% + 1.3px);
    height: 60px;
}

.custom-shape-divider-top .shape-fill {
    fill: #f8fafc;
}

/* --- 🎇 Footer Glowing Orbs --- */
.footer-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.25;
    pointer-events: none;
    z-index: 0;
}

.glow-left {
    width: 300px;
    height: 300px;
    background: var(--color-primary);
    top: -50px;
    left: -100px;
}

.glow-right {
    width: 400px;
    height: 400px;
    background: #0ea5e9;
    bottom: -150px;
    right: -150px;
}

/* --- Typography & Elements --- */
.footer-text {
    color: #94a3b8;
    line-height: 1.8;
    transition: color 0.3s ease;
}

.footer-logo-icon {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #38bdf8;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

/* --- Social Buttons (Glassmorphism) --- */
.social-btn {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    color: #e2e8f0;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-decoration: none;
}

.social-btn:hover {
    background: var(--color-primary);
    color: #ffffff;
    border-color: var(--color-primary);
    transform: translateY(-6px) scale(1.05);
    box-shadow: 0 10px 20px rgba(0, 86, 179, 0.4);
}

/* --- Footer Links with Hover Animation --- */
.footer-links li {
    margin-bottom: 1rem;
}

.footer-links a {
    color: #94a3b8;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
    position: relative;
    font-weight: 500;
}

.footer-links a::before {
    content: "•";
    position: absolute;
    left: -15px;
    color: #38bdf8;
    opacity: 0;
    transition: all 0.3s ease;
}

.footer-links a:hover {
    color: #ffffff;
    transform: translateX(8px);
}

.footer-links a:hover::before {
    opacity: 1;
    left: -12px;
}

/* --- Separator Line --- */
.border-bottom-lux {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-bottom-links a:hover {
    color: #fff;
}

/* --- 👑 Davinci Signature --- */
.davinci-signature {
    font-weight: 800;
    font-size: 1.1rem;
    letter-spacing: 1px;
    background: linear-gradient(90deg, #38bdf8, #818cf8, #c084fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
    position: relative;
}

.davinci-signature::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    bottom: -2px;
    left: 0;
    background: linear-gradient(90deg, #38bdf8, #c084fc);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.4s ease;
}

.davinci-signature:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

/* ================================================= */
/* 🌐 RTL SUPPORT FOR FOOTER                       */
/* ================================================= */
html[dir="rtl"] .custom-shape-divider-top {
    transform: rotateY(180deg) translateY(-1px);
}

html[dir="rtl"] .footer-logo-icon {
    margin-right: 0 !important;
    margin-left: 1rem !important;
}

html[dir="rtl"] .davinci-signature {
    margin-left: 0 !important;
    margin-right: 0.25rem !important;
}

html[dir="rtl"] .footer-links a:hover {
    transform: translateX(-8px);
}

html[dir="rtl"] .footer-links a::before {
    left: auto;
    right: -15px;
}

html[dir="rtl"] .footer-links a:hover::before {
    right: -12px;
    left: auto;
}


/* ================================================= */
/* OTHERS — No-link card + disabled CTA              */
/* ================================================= */
.clinic-card--no-link {
    cursor: default;
}

.clinic-card--no-link:hover {
    transform: translateY(-8px) scale(1.01);
}

.clinic-card-cta--disabled {
    pointer-events: none;
    opacity: 0;
    font-size: 0.82rem;
    font-style: italic;
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    cursor: default;
}

.clinic-card-cta--disabled::after {
    content: '' !important;
}

.clinic-card--no-link:hover .clinic-card-cta--disabled {
    opacity: 0.85;
    transform: translateY(0);
}

/* CTA-others Button */
.clinic-card-cta-others {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(12px);
    border: 1.5px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-full);
    color: #fff;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.clinic-card-cta-others::after {

    transition: transform 0.3s ease;
}

.clinic-card:hover .clinic-card-cta-others {
    opacity: 1;
    transform: translateY(0);
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
}

.clinic-card:hover .clinic-card-cta-others::after {
    transform: translateX(4px);
}

