:root {
    --primary-color: #8E24AA;
    /* Deep Purple */
    --primary-hover-color: #6A1B9A;
    /* Darker Purple */
    --secondary-color: #EDE7F6;
    /* Lavender - Cooler */
    --background-color: #FFFFFF;
    /* White */
    --text-color: #343a40;
    /* Dark Grey */
    --text-color-light: #FFFFFF;
    --footer-bg: linear-gradient(135deg, #EDE7F6 0%, #D1C4E9 100%);
    --gradient-hero: linear-gradient(135deg, #EDE7F6 0%, #D1C4E9 100%);
    --accent-color: #AB47BC;

    /* Override Bootstrap primary color */
    --bs-primary: #8E24AA;
    --bs-primary-rgb: 142, 36, 170;
    --bs-primary-border-subtle: #D1C4E9;
    --bs-primary-bg-subtle: #EDE7F6;
    --bs-primary-text-emphasis: #4A148C;
}

/* General Styles */
body {
    font-family: 'Cairo', 'Helvetica Neue', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    overflow-x: hidden;
}

/* Subtle Background Pattern */
body.pattern-background {
    position: relative;
}

body.pattern-background::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(circle at 20px 20px, rgba(142, 36, 170, 0.03) 1px, transparent 1px),
        radial-gradient(circle at 60px 60px, rgba(243, 229, 245, 0.05) 1px, transparent 1px);
    background-size: 80px 80px;
    background-position: 0 0, 40px 40px;
    pointer-events: none;
    z-index: -1;
}

/* Remove global page loader to avoid initial white/flash rectangle */
#page-loader {
    display: none !important;
}

/* Navbar Logo Enhancement */
.navbar-logo {
    transition: transform 0.3s ease;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.navbar-brand:hover .navbar-logo {
    transform: scale(1.05);
}

/* Navbar Scroll Effect */
.navbar {
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Mobile: remove the compact white header container so only the hamburger floats */
@media (max-width: 992px) {
    nav.navbar {
        background: transparent !important;
        box-shadow: none !important;
        border-radius: 0 !important;
        padding: 0.4rem 0 !important;
    }

    nav.navbar .container {
        max-width: 100% !important;
        background: transparent !important;
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
    }

    /* ensure desktop-left-over background isn't visible on small screens */
    nav.navbar.bg-light {
        background: transparent !important;
    }
}




/* NOTE: debug & aggressive hero/header overrides removed — restoring normal hero container styling. */

/* ========== LTR Hero Slider Positioning ========== */
/* LTR: Doctor image on right, content on left */
html[dir="ltr"] .hero-image-container,
html:not([dir="rtl"]) .hero-image-container {
    right: 0;
    left: auto;
}

html[dir="ltr"] .hero-content-col,
html:not([dir="rtl"]) .hero-content-col {
    text-align: left;
}

html[dir="ltr"] .hero-buttons,
html:not([dir="rtl"]) .hero-buttons {
    justify-content: flex-start;
}

.navbar-scrolled {
    background-color: rgba(255, 255, 255, 0.98) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
}

/* Improved desktop header nav spacing - single line enforcement */
@media (min-width: 992px) {
    .navbar-nav .nav-item {
        margin-left: 0.1rem;
        margin-right: 0.1rem;
    }

    .navbar-nav .nav-link {
        padding-left: 0.4rem;
        padding-right: 0.4rem;
        font-size: 0.82rem;
        white-space: nowrap;
    }
}

@media (min-width: 1200px) {
    .navbar-nav .nav-item {
        margin-left: 0.2rem;
        margin-right: 0.2rem;
    }

    .navbar-nav .nav-link {
        padding-left: 0.6rem;
        padding-right: 0.6rem;
        font-size: 0.9rem;
    }
}

@media (min-width: 1400px) {
    .navbar-nav .nav-item {
        margin-left: 0.3rem;
        margin-right: 0.3rem;
    }

    .navbar-nav .nav-link {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
        font-size: 0.95rem;
    }
}

/* Override Bootstrap Primary Button Colors */
.btn-primary {
    --bs-btn-bg: #8E24AA !important;
    --bs-btn-border-color: #8E24AA !important;
    --bs-btn-hover-bg: #6A1B9A !important;
    --bs-btn-hover-border-color: #6A1B9A !important;
    --bs-btn-active-bg: #4A148C !important;
    --bs-btn-active-border-color: #4A148C !important;
    --bs-btn-disabled-bg: #D1C4E9 !important;
    --bs-btn-disabled-border-color: #D1C4E9 !important;
    background: var(--primary-color) !important;
    border: 1px solid var(--primary-color) !important;
    color: #FFFFFF !important;
    padding: 12px 30px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary:hover,
.btn-primary:focus-visible {
    background: var(--primary-hover-color) !important;
    border-color: var(--primary-hover-color) !important;
    color: #FFFFFF !important;
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(142, 36, 170, 0.4) !important;
}

.btn-primary:active,
.btn-primary:focus,
.btn-primary.active,
.btn-check:checked+.btn-primary {
    background: #4A148C !important;
    border-color: #4A148C !important;
    color: #FFFFFF !important;
}

/* Bootstrap Primary Color Overrides */
.text-primary {
    color: #8E24AA !important;
}

.bg-primary {
    background-color: #8E24AA !important;
}

.border-primary {
    border-color: #8E24AA !important;
}

.badge.bg-primary {
    background-color: #8E24AA !important;
}

.bg-primary-subtle {
    background-color: #EDE7F6 !important;
    color: #4A148C !important;
}

.text-primary-emphasis {
    color: #4A148C !important;
}

/* Hero Section (new) */
.hero {
    position: relative;
    /* Fill viewport height for immersive hero */
    min-height: 100vh;
    /* Modern viewport units for mobile chrome/safari dynamic bars */
    min-height: 100svh;
    overflow: hidden;
    background: linear-gradient(135deg, #EDE7F6 0%, #D1C4E9 100%);
    /* Use responsive vertical padding so content centers nicely */
    padding: clamp(70px, 10vh, 120px) 0 clamp(50px, 8vh, 110px);
    display: flex;
    align-items: center;
}

@supports (height: 100dvh) {
    .hero {
        min-height: 100dvh;
    }
}

/* Mobile Footer Enhancements */
.footer-mobile .accordion-item {
    border: none;
    margin-bottom: 12px;
    border-radius: 18px;
    background: linear-gradient(145deg, #ffffff 0%, #EDE7F6 60%, #D1C4E9 100%);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

.footer-mobile .accordion-item:last-child {
    margin-bottom: 0;
}

.footer-mobile .accordion-button {
    background: linear-gradient(135deg, #EDE7F6 0%, #D1C4E9 100%);
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.9rem 1.15rem;
    gap: .65rem;
    display: flex;
    align-items: center;
}

.footer-mobile .accordion-button.collapsed {
    background: linear-gradient(135deg, #fff 0%, #f7f3f3 100%);
    color: #444;
}

.footer-mobile .accordion-button:not(.collapsed) {
    box-shadow: inset 0 0 0 1px rgba(142, 36, 170, .35), 0 4px 12px rgba(0, 0, 0, 0.08);
}

.footer-mobile .accordion-button:focus {
    box-shadow: none;
}

.footer-mobile .accordion-button .icon-wrap {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: linear-gradient(135deg, #BA68C8, #E1BEE7);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 15px;
    flex: 0 0 auto;
    box-shadow: 0 3px 8px rgba(0, 0, 0, .12);
}

.footer-mobile .accordion-button .chevron {
    margin-left: auto;
    transition: transform .35s ease;
    display: inline-flex;
    align-items: center;
    color: #6A1B9A;
}

.footer-mobile .accordion-button:not(.collapsed) .chevron {
    transform: rotate(180deg);
}

.footer-mobile .accordion-body {
    background: #fff;
    padding: 0.75rem 1rem 1rem;
    border-top: 1px solid rgba(142, 36, 170, 0.25);
}

.footer-mobile .accordion-body a {
    transition: color .25s ease;
}

.footer-mobile .accordion-body a:hover {
    color: #6A1B9A;
}

.footer-mobile .accordion-button::after {
    display: none;
}

@media (max-width: 575.98px) {
    .footer-mobile .accordion-button {
        font-size: 0.9rem;
    }
}

.hero-bg-layer {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.hero-photo {
    position: absolute;
    top: auto;
    bottom: auto;
    left: clamp(150px, 4vw, 100px);
    width: min(40vw, 580px);
    height: auto;
    max-width: 580px;
    object-fit: contain;
    object-position: center top;
    transform: translate3d(0, 0, 0) scale(1.02);
    transform-origin: center top;
    opacity: 0.95;
    filter: brightness(1.02);
    z-index: 1;
    -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 1) 85%, rgba(0, 0, 0, 0.1) 100%);
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 1) 85%, rgba(0, 0, 0, 0.1) 100%);
}

.hero-overlay-gradient {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 70% 40%, rgba(255, 255, 255, 0.35), transparent 60%),
        linear-gradient(135deg, rgba(142, 36, 170, 0.25), rgba(237, 231, 246, 0.35));
    mix-blend-mode: screen;
}

.hero-bottom-fade,
.hero-fade-bottom {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 45%;
    background: linear-gradient(to bottom,
            rgba(237, 231, 246, 0) 0%,
            rgba(237, 231, 246, 0.75) 55%,
            rgba(237, 231, 246, 1) 100%);
    pointer-events: none;
    z-index: 2;
}

.hero-decor {
    position: absolute;
    border-radius: 50%;
    opacity: 0.35;
    filter: blur(6px);
    animation: heroFloat 10s ease-in-out infinite;
}

.hero-decor-1 {
    width: 220px;
    height: 220px;
    top: 10%;
    left: -60px;
    background: rgba(142, 36, 170, 0.35);
}

.hero-decor-2 {
    width: 160px;
    height: 160px;
    bottom: 8%;
    right: 6%;
    background: rgba(237, 231, 246, 0.5);
    animation-delay: 2s;
}

.hero-decor-3 {
    width: 110px;
    height: 110px;
    top: 50%;
    right: -40px;
    background: rgba(142, 36, 170, 0.4);
    animation-delay: 4s;
}

@keyframes heroFloat {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-28px);
    }
}

.hero-text {
    max-width: 720px;
    color: #3b2626;
    text-shadow: 0 4px 18px rgba(255, 255, 255, 0.6);
    margin: 0 clamp(20px, 6vw, 140px) 0 auto;
}

.hero-text-ltr {
    direction: ltr;
    text-align: left;
}

.hero-text-rtl {
    direction: rtl;
    text-align: right;
}

.hero-title {
    font-size: clamp(2.3rem, 5vw, 3.6rem);
    line-height: 1.12;
    color: #341b1b;
}

.hero-tagline {
    font-weight: 600;
    opacity: 0.95;
    color: #4b2b2b;
}

.hero-description {
    font-size: 1.05rem;
    opacity: 0.9;
    color: #503737;
}

.hero-meta {
    color: #5a3d3d;
}

.hero-ctas .btn {
    transition: all 0.35s ease;
}

.hero-ctas .btn:hover {
    transform: translateY(-4px) scale(1.03);
    box-shadow: 0 12px 30px -8px rgba(142, 36, 170, 0.55);
}

.hero-cta-phone {
    backdrop-filter: blur(6px);
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.9);
    color: #3b2a2a !important;
    direction: ltr;
    text-align: left;
    unicode-bidi: bidi-override;
    font-weight: 600;
    --bs-btn-color: #3b2a2a;
    --bs-btn-border-color: rgba(255, 255, 255, 0.9);
}

.hero-cta-phone:hover {
    background: rgba(255, 255, 255, 0.92);
    color: #2d1c1c !important;
    --bs-btn-color: #2d1c1c;
}

.hero-cta-phone i {
    color: inherit;
}



.hero-rtl .hero-decor-1 {
    left: auto;
    right: -60px;
}

.hero-rtl .hero-decor-3 {
    right: auto;
    left: -40px;
}

@media (max-width: 992px) {
    .hero {
        min-height: 560px;
    }

    .hero-photo {
        width: 48vw;
        max-width: none;
        transform: scale(0.88);
        opacity: 0.9;
        left: 2vw;
        top: 20px;
    }

    .hero-text {
        max-width: 100%;
        text-align: center;
    }

    .hero-text .hero-ctas {
        justify-content: center;
    }
}

@media (max-width: 576px) {
    .hero {
        min-height: 520px;
    }

    .hero-title {
        font-size: 2.1rem;
    }

    .hero-tagline {
        font-size: 1.05rem;
    }

    .hero-description {
        font-size: 0.95rem;
    }

    .hero-photo {
        width: 70vw;
        transform: scale(0.92);
        opacity: 0.8;
        left: 2vw;
    }
}

/* Stats Section */
.stats-section .stat-card {
    transition: transform 0.3s ease;
}

.stats-section .stat-card:hover {
    transform: translateY(-10px);
}

.stats-section .stat-icon {
    opacity: 0.9;
}

/* Sections */
section {
    overflow: hidden;
}

.service-card {
    transition: all 0.3s ease;
    border-radius: 15px;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(171, 71, 188, 0.25) !important;
}

/* Services Grid */
.services-grid .card h3,
.services-grid .card h6,
.services-grid .card .h6 {
    font-weight: 600;
}

.service-detail article {
    font-size: 1rem;
    line-height: 1.8;
}

.service-detail p {
    margin-bottom: 1.2rem;
}

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

.rating-box {
    border-left: 4px solid var(--accent-color);
}

.contact-item {
    padding: 20px;
    transition: transform 0.3s ease;
}

.contact-item:hover {
    transform: scale(1.05);
}

.card {
    border: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease;
    background-color: var(--background-color);
    border-radius: 10px;
}

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

.bg-light {
    background-color: #f8f9fa !important;
}

.navbar.bg-light {
    background-color: var(--background-color) !important;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

/* Dropdown Menu Styling */
.navbar .dropdown-menu {
    min-width: 280px;
    max-width: 320px;
    border: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    padding: 0.5rem 0;
    margin-top: 0.5rem;
}

.navbar .dropdown-item {
    padding: 0.6rem 1.5rem;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    white-space: normal;
    word-wrap: break-word;
}

.navbar .dropdown-item:hover {
    background-color: #F3E5F5;
    color: var(--primary-color);
    padding-left: 1.8rem;
}

.navbar .dropdown-header {
    padding: 0.75rem 1.5rem 0.5rem;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.navbar .dropdown-divider {
    margin: 0.5rem 0;
    opacity: 0.1;
}

footer.bg-dark {
    background-color: var(--footer-bg-color) !important;
}

/* Additional Styles */
.btn-light {
    background-color: #fff;
    color: var(--text-color);
    font-weight: 600;
    border: 1px solid var(--primary-color);
    padding: 12px 30px;
    transition: all 0.3s ease;
}

.btn-light:hover {
    background-color: var(--primary-color);
    color: var(--text-color);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(171, 71, 188, 0.25);
}

.btn-outline-primary {
    --bs-btn-color: #8E24AA;
    --bs-btn-border-color: #8E24AA;
    --bs-btn-hover-bg: #8E24AA;
    --bs-btn-hover-border-color: #8E24AA;
    --bs-btn-hover-color: #343a40;
    --bs-btn-active-bg: #6A1B9A;
    --bs-btn-active-border-color: #6A1B9A;
    border: 1px solid var(--primary-color);
    color: var(--text-color);
    font-weight: 600;
    padding: 10px 24px;
    background: transparent;
    transition: all 0.3s ease;
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    color: var(--text-color);
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.text-white-50 {
    opacity: 0.8;
}

.about-section {
    background-color: #f8f9fa;
}

.about-image img {
    border-radius: 15px;
}

/* Mobile Menu Styles */
.offcanvas-end {
    width: 280px !important;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
}

.offcanvas-header {
    background: linear-gradient(135deg, #8E24AA 0%, #E1BEE7 100%);
    color: white;
}

.offcanvas-title {
    color: #2c3e50;
    font-weight: 600;
}

.offcanvas-body .nav-link {
    color: #2c3e50 !important;
    font-weight: 500;
    border-radius: 8px;
    margin: 2px 0;
    transition: all 0.3s ease;
}

.offcanvas-body .nav-link:hover {
    background: rgba(142, 36, 170, 0.1);
    color: #8E24AA !important;
    transform: translateX(5px);
}

.offcanvas-body .btn-primary {
    background: linear-gradient(135deg, #8E24AA 0%, #6A1B9A 100%);
    border: none;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.offcanvas-body .btn-outline-secondary {
    border-color: #8E24AA;
    color: #8E24AA;
}

.offcanvas-body .dropdown-menu {
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Mobile Hero Enhancements */
@media (max-width: 768px) {
    .hero {
        min-height: 100vh !important;
        position: relative;
    }

    .hero-bg-layer {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        z-index: 1;
    }

    .hero-photo {
        width: 90vw !important;
        max-width: 350px !important;
        height: 400px !important;
        object-fit: cover;
        border-radius: 20px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
        transform: scale(0.95) !important;
        left: 50% !important;
        top: 20% !important;
        transform: translate(-50%, -50%) scale(0.95) !important;
        opacity: 0.9 !important;
    }

    .hero-text {
        position: relative;
        z-index: 2;
        text-align: center !important;
        padding: 40px 20px;
        background: rgba(255, 255, 255, 0.95);
        border-radius: 20px;
        margin: 10px;
        margin-top: 120px;
        /* Add this line */
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    }

    .hero-title {
        font-size: 2.2rem !important;
        font-weight: 700 !important;
        color: #2c3e50 !important;
        margin-bottom: 1rem !important;
        line-height: 1.2 !important;
    }

    .hero-tagline {
        font-size: 1.4rem !important;
        color: #8E24AA !important;
        font-weight: 600 !important;
        margin-bottom: 1rem !important;
    }

    .hero-description {
        font-size: 1.1rem !important;
        line-height: 1.6 !important;
        color: #6c757d !important;
        margin-bottom: 2rem !important;
    }

    .hero-actions {
        flex-direction: column !important;
        gap: 1rem !important;
    }

    .hero-cta-book,
    .hero-cta-phone {
        width: 100% !important;
        padding: 15px 30px !important;
        font-size: 1.1rem !important;
        font-weight: 600 !important;
        border-radius: 12px !important;
    }

    .hero-meta {
        margin-top: 1.5rem !important;
        padding: 10px 20px !important;
        background: rgba(142, 36, 170, 0.1) !important;
        border-radius: 25px !important;
        display: inline-flex !important;
        align-items: center !important;
        gap: 0.5rem !important;
    }

    /* Mobile Hero Quick Stats */
    .hero-quick-stats {
        border-color: rgba(255, 255, 255, 0.3) !important;
    }

    .quick-stat .stat-number {
        text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    }

    .quick-stat .stat-label {
        opacity: 0.9;
        font-weight: 500;
    }

    /* Mobile Scroll Indicator */
    .hero-scroll-indicator {
        position: absolute;
        bottom: 30px;
        left: 50%;
        transform: translateX(-50%);
        text-align: center;
        color: white;
        z-index: 3;
        animation: bounce 2s infinite;
    }

    .scroll-mouse {
        width: 24px;
        height: 36px;
        border: 2px solid rgba(255, 255, 255, 0.7);
        border-radius: 12px;
        margin: 0 auto 8px;
        position: relative;
    }

    .scroll-wheel {
        width: 4px;
        height: 8px;
        background: rgba(255, 255, 255, 0.7);
        border-radius: 2px;
        position: absolute;
        top: 6px;
        left: 50%;
        transform: translateX(-50%);
        animation: scroll 2s infinite;
    }

    .scroll-text {
        font-size: 0.8rem;
        opacity: 0.8;
        font-weight: 500;
    }

    @keyframes bounce {

        0%,
        20%,
        50%,
        80%,
        100% {
            transform: translateX(-50%) translateY(0);
        }

        40% {
            transform: translateX(-50%) translateY(-10px);
        }

        60% {
            transform: translateX(-50%) translateY(-5px);
        }
    }

    @keyframes scroll {
        0% {
            opacity: 0;
            transform: translateX(-50%) translateY(0);
        }

        50% {
            opacity: 1;
            transform: translateX(-50%) translateY(8px);
        }

        100% {
            opacity: 0;
            transform: translateX(-50%) translateY(16px);
        }
    }
}

/* Mobile Clinic Story Enhancements */
@media (max-width: 768px) {
    .clinic-story-section {
        padding: 60px 0 !important;
    }

    .clinic-story-section .container {
        padding: 0 15px;
    }

    .clinic-story-section h2 {
        font-size: 2rem !important;
        margin-bottom: 1.5rem !important;
        text-align: center;
    }

    .clinic-story-section .lead {
        font-size: 1.1rem !important;
        text-align: center;
        margin-bottom: 2rem !important;
    }

    .clinic-story-section .row {
        flex-direction: column-reverse !important;
    }

    .clinic-story-section .col-lg-6 {
        margin-bottom: 2rem;
    }

    .impact-card {
        padding: 1.5rem !important;
        text-align: center;
        margin-bottom: 1rem;
    }

    .impact-icon {
        width: 70px !important;
        height: 70px !important;
        margin: 0 auto 1rem !important;
    }

    .impact-card h3 {
        font-size: 1.8rem !important;
    }

    .impact-card p {
        font-size: 0.9rem !important;
    }

    /* Enhanced Impact Grid */
    .impact-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        gap: 1rem;
    }

    .impact-card-wrapper {
        display: flex;
    }

    .story-badge {
        animation: pulse 2s infinite;
    }

    @keyframes pulse {
        0% {
            box-shadow: 0 0 0 0 rgba(142, 36, 170, 0.4);
        }

        70% {
            box-shadow: 0 0 0 10px rgba(142, 36, 170, 0);
        }

        100% {
            box-shadow: 0 0 0 0 rgba(142, 36, 170, 0);
        }
    }
}

/* Mobile Statistics Enhancements */
@media (max-width: 768px) {
    .stats-section {
        padding: 60px 0 !important;
        overflow: visible !important;
    }

    .stats-section .container {
        padding: 0 15px;
    }

    .stats-section h2 {
        font-size: 2rem !important;
        text-align: center;
        margin-bottom: 1rem !important;
    }

    .stats-section .lead {
        font-size: 1rem !important;
        text-align: center;
        margin-bottom: 2rem !important;
    }

    .stats-section .row.align-items-end {
        flex-direction: column !important;
        text-align: center;
        margin-bottom: 3rem;
    }

    .stats-section .col-lg-6 {
        margin-bottom: 2rem;
    }

    .kpi-card {
        padding: 2rem 1.5rem !important;
        margin-bottom: 1.5rem;
        text-align: center;
    }

    .kpi-icon-wrapper {
        width: 80px !important;
        height: 80px !important;
        margin: 0 auto 1rem !important;
    }

    .kpi-value {
        font-size: 2.5rem !important;
    }

    .kpi-card p {
        font-size: 0.9rem !important;
    }

    .btn-outline-primary {
        width: 100% !important;
        padding: 12px 24px !important;
        font-size: 1.1rem !important;
    }

    /* Enhanced KPI Grid */
    .kpi-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
        gap: 1.5rem;
        margin-bottom: 2rem;
    }

    .kpi-card-wrapper {
        display: flex;
    }

    .stats-badge {
        animation: statsPulse 3s infinite;
    }

    @keyframes statsPulse {

        0%,
        100% {
            transform: scale(1);
        }

        50% {
            transform: scale(1.05);
        }
    }
}

/* Enhanced Mobile Interactions */
@media (max-width: 768px) {
    .navbar-toggler {
        border: 2px solid #8E24AA;
        border-radius: 8px;
        padding: 8px 12px;
    }

    .navbar-toggler-icon {
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(142, 36, 170, 1)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='m4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
    }

    /* Smooth scrolling for mobile */
    html {
        scroll-behavior: smooth;
    }

    /* Better touch targets */
    .btn {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    /* Improved card shadows for mobile */
    .card,
    .kpi-card,
    .impact-card {
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1) !important;
        transition: transform 0.3s ease, box-shadow 0.3s ease;
    }

    .card:hover,
    .kpi-card:hover,
    .impact-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15) !important;
    }
}

/* ==========================
   Desktop & Global Polishing
   (non-hero sections only - hero/header unchanged)
   ==========================
*/

@media (min-width: 992px) {

    /* Make the site feel wider but keep readable lines */
    .container {
        max-width: 1180px !important;
    }

    /* Clinic story - visual rhythm */
    .clinic-story-section {
        padding: 100px 0 !important;
    }

    .clinic-story-section .row {
        align-items: center;
        gap: 3rem;
    }

    .clinic-story-section .pe-lg-4 {
        padding-right: 3.5rem !important;
    }

    /* Desktop: make the left clinic text feel like a card for readability */
    .clinic-story-section .pe-lg-4 {
        background: rgba(255, 255, 255, 0.96);
        padding: 28px;
        border-radius: 14px;
        box-shadow: 0 18px 40px rgba(0, 0, 0, 0.06);
    }

    .story-badge {
        transform: translateY(-6px);
        box-shadow: none;
    }

    /* KPI / Stats grid - single horizontal row on desktop
         Use column-flow so each KPI becomes an equal-width column
         ensuring all items stay on a single line on wide screens. */
    .kpi-grid {
        display: grid;
        grid-auto-flow: column;
        grid-auto-columns: 1fr;
        gap: 1rem;
        align-items: stretch;
    }

    /* Reduced size KPI cards for a lighter footprint */
    .kpi-card {
        padding: 1rem 1rem;
        border-radius: 12px;
    }

    .kpi-value {
        font-size: 1.6rem;
    }

    /* Services grid - keep Bootstrap rows but make inner cards equal height */
    #aesthetic-services .col-lg-3,
    #services .col-lg-3 {
        display: flex;
    }

    #aesthetic-services .service-card-intimate,
    #services .service-card-intimate {
        flex: 1;
        display: flex;
        flex-direction: column;
    }

    #aesthetic-services .service-card-intimate .card-body,
    #services .service-card-intimate .card-body {
        flex: 1;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .service-card-intimate {
        transition: transform 0.35s ease, box-shadow 0.35s ease;
        border-radius: 12px;
        overflow: hidden;
    }

    /* make clinic impact cards layout tighter & 2-column grid */
    .impact-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .impact-card {
        padding: 1rem !important;
    }

    .service-card-intimate .service-image {
        height: 200px;
        overflow: hidden;
    }

    .service-card-intimate .card-body {
        padding-top: 48px !important;
        padding-bottom: 28px !important;
    }

    /* Team carousel - larger visuals and centered layout */
    .team-section {
        padding: 80px 0;
    }

    .team-card {
        flex: 0 0 260px;
        border-radius: 16px;
    }

    .team-photo-wrapper {
        height: 340px;
    }

    /* Contact CTA - spacious & center aligned */
    .contact-cta .container {
        max-width: 980px;
    }

    .contact-cta .btn {
        padding: 14px 36px;
        font-size: 1.05rem;
        border-radius: 10px;
    }

    /* Footer spacing */
    footer.site-footer {
        padding-top: 64px;
        padding-bottom: 32px;
    }
}

/* Small desktop / tablet tweaks */
@media (min-width: 768px) and (max-width: 991px) {
    .clinic-story-section {
        padding: 70px 0;
    }

    #aesthetic-services .row,
    #services .row {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ==========================
   Mobile polish (non-hero sections only)
   ==========================
*/
@media (max-width: 767px) {

    /* Tighter vertical rhythm after the hero */
    section {
        padding-top: 36px;
        padding-bottom: 36px;
    }

    .clinic-story-section {
        padding: 36px 0;
    }

    .clinic-story-section .pe-lg-4 {
        padding-right: 0 !important;
    }

    /* Stats / kpi grid: single column with subtle card spacing */
    .kpi-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .kpi-card {
        padding: 0.9rem 0.8rem;
        border-radius: 10px;
    }

    /* Services - make service cards more compact */
    #aesthetic-services .row,
    #services .row {
        display: grid;
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .service-card-intimate {
        border-radius: 12px;
        box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
    }

    /* Team - stack nicely and keep photos tall but not oversized */
    .team-card {
        flex: 0 0 calc(100% - 30px);
        margin: 0 auto;
    }

    .team-photo-wrapper {
        height: 260px;
    }

    /* Contact CTA - comfortable spacing and bigger tap targets */
    .contact-cta .btn {
        width: 100%;
        padding: 14px 18px;
    }

    /* Reduce heavy shadow usage on small devices that creates 'floating cards' appearance */
    .card,
    .impact-card,
    .kpi-card {
        box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06) !important;
    }

    /* Mobile: improve spacing, increase touch-targets and keep visual rhythm */
    .clinic-story-section .story-badge {
        margin-bottom: 0.75rem;
        padding: 10px 14px;
    }

    .clinic-story-section h2.h1 {
        font-size: 1.5rem !important;
    }

    .clinic-story-section p.lead {
        font-size: 1rem !important;
    }

    /* Services action buttons scale and alignment */
    .service-card-intimate .service-link {
        width: 56px;
        height: 56px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .service-card-intimate .card-body {
        padding: 18px !important;
    }

    /* Stats cards: clearer titles and breathing room (smaller on mobile) */
    .kpi-card .kpi-value {
        font-size: 1.4rem !important;
    }

    .kpi-card p {
        color: #6c757d;
    }
}

/* mobile-only CTAs after statistics */
@media (max-width: 767px) {
    .mobile-ctas {
        padding-top: 8px;
        padding-bottom: 8px;
    }

    .mobile-ctas .btn {
        padding: 14px 18px;
        font-weight: 700;
    }
}

/* Global UI polish - consistent headings and spacing for readability */
h2.h1 {
    letter-spacing: 0.4px;
    margin-bottom: 1rem;
}

.text-center h2.h1 {
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.btn-primary,
.btn-outline-primary {
    border-radius: 999px;
    padding-left: 22px;
    padding-right: 22px;
}

.impact-grid .impact-card {
    border-radius: 12px;
}

/* Global CTAs & spacing tweaks */
.container {
    padding-left: 24px;
    padding-right: 24px;
}

section:not(.hero) {
    padding-top: 72px;
    padding-bottom: 72px;
}

.section-divider {
    height: 72px;
}

/* Make important CTAs slightly larger on desktop for emphasis */
@media (min-width: 992px) {

    .btn-primary.btn-lg,
    .btn-outline-primary.btn-lg {
        padding: 14px 30px;
        font-size: 1.05rem;
    }
}

/* Make service callouts visually consistent */
.service-card-intimate {
    border-radius: 14px;
    background: linear-gradient(180deg, #ffffff 0%, #fff 100%);
}

.service-card-intimate .service-icon {
    transform: translateY(-24px);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.08);
}

/* Ensure consistent max widths for content blocks to improve line lengths */
.clinic-story-section .pe-lg-4,
.stats-section .container .text-center,
.team-section .container {
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
}

/* subtle hover for CTAs */
.btn-primary:hover,
.btn-outline-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}


/* Loading states for mobile */
@media (max-width: 768px) {

    /* hide the visual page-loader on mobile; avoid flashy white rectangle */
    #page-loader {
        display: none !important;
    }

    .loader-content {
        padding: 2rem;
        border-radius: 20px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    }

    .loader-logo {
        width: 80px;
        height: 80px;
    }
}

/* Footer Links */
footer a {
    transition: all 0.3s ease;
}

footer a:hover {
    opacity: 0.8;
    transform: translateX(-5px);
}

footer .fab {
    transition: all 0.3s ease;
}

footer .fab:hover {
    transform: scale(1.2);
}

/* Section Dividers */
.section-divider {
    position: relative;
    width: 100%;
    height: 60px;
    overflow: hidden;
    background: transparent;
}

.divider-wave {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.divider-wave svg {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.shape-fill {
    fill: #f8f9fa;
}

.offcanvas {
    width: 100vw !important;
    max-width: 100vw !important;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.15);
}

/* Full width mobile menu */
.offcanvas {
    width: 100vw !important;
    max-width: 100vw !important;
    /* glassy, semi-transparent nav panel for modern look */
    background: rgba(255, 255, 255, 0.55) !important;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: -5px 0 30px rgba(0, 0, 0, 0.2);
    border-left: 1px solid rgba(255, 255, 255, 0.12);
}

.offcanvas-header {
    background: rgba(255, 255, 255, 0.55);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

/* Dim and blur the backdrop behind offcanvas for aesthetics */
.offcanvas-backdrop {
    background-color: rgba(0, 0, 0, 0.28) !important;
    backdrop-filter: blur(2px) !important;
}

.offcanvas-backdrop.show {
    /* when visible */
    opacity: 1 !important;
}

.offcanvas-body {
    padding: 1.5rem;
    background: transparent;
}

.offcanvas-body .nav-link {
    border-radius: 12px;
    margin-bottom: 0.5rem;
    padding: 1rem 1.25rem;
    transition: all 0.3s ease;
    border: 1px solid transparent;
    position: relative;
    overflow: hidden;
}

.offcanvas-body .nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(142, 36, 170, 0.1), transparent);
    transition: left 0.5s;
}

.offcanvas-body .nav-link:hover::before {
    left: 100%;
}

.offcanvas-body .nav-link:hover {
    background: rgba(142, 36, 170, 0.05);
    transform: translateX(8px);
    border-color: rgba(142, 36, 170, 0.2);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.offcanvas-body .collapse .nav-link {
    padding-left: 2rem;
    font-size: 0.9rem;
    background: rgba(255, 255, 255, 0.5);
    margin-left: 1rem;
    margin-bottom: 0.25rem;
}

.offcanvas-body .btn {
    border-radius: 12px;
    padding: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.offcanvas-body .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

/* Navbar enhancements */
.navbar {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.navbar .container {
    max-width: 80%;
}

/* Arabic navbar text padding */
[lang="ar"] .navbar-nav .nav-link {
    padding-right: 1.5rem;
    padding-left: 0.75rem;
    direction: rtl;
}

/* Arabic text direction */
[lang="ar"] .hero-text {
    direction: rtl;
    text-align: right;
}

[lang="ar"] .navbar-brand span {
    direction: rtl;
}

[lang="ar"] .offcanvas-body .nav-link {
    direction: rtl;
}

/* Arabic hero button */
[lang="ar"] .hero-cta-phone {
    direction: rtl;
    text-align: right;
}

/* Consolidated mobile header / floating hamburger styles
   - Ensure the hamburger always floats inside the viewport
   - Uses safe-area insets for notched devices
   - Removes the visible navbar container on small screens
*/
@media (max-width: 768px) {

    /* hide standard navbar surface so only floating button remains */
    .navbar {
        height: 0 !important;
        min-height: 0 !important;
        overflow: visible;
        /* allow fixed button to be visible */
        background: transparent !important;
        box-shadow: none !important;
        transition: all 0.2s ease;
    }

    .navbar-brand {
        display: none !important;
    }

    /* Floating hamburger - pinned to viewport's right safe edge */
    .navbar-toggler {
        position: fixed !important;
        top: calc(env(safe-area-inset-top, 12px) + 8px) !important;
        /* use logical inset for RTL-aware positioning and fallback to right */
        inset-inline-end: calc(env(safe-area-inset-right, 8px) + 8px) !important;
        right: calc(env(safe-area-inset-right, 8px) + 8px) !important;
        left: auto !important;
        box-sizing: border-box !important;
        z-index: 2140 !important;
        background: rgba(255, 255, 255, 0.95) !important;
        border: 2px solid rgba(142, 36, 170, 0.95) !important;
        border-radius: 50% !important;
        width: 44px !important;
        height: 44px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 0 !important;
        backdrop-filter: blur(6px) !important;
        box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18) !important;
        transition: transform .18s ease, background .18s ease !important;
    }

    /* Slight hover/active state */
    .navbar-toggler:hover,
    .navbar-toggler:focus {
        transform: scale(1.06) !important;
        background: rgba(142, 36, 170, 0.06) !important;
    }

    .navbar-toggler-icon {
        width: 18px !important;
        height: 18px !important;
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%238E24AA' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
    }

    /* space for floating toggler so it doesn't cover content on very small screens */
    body {
        padding-top: 0 !important;
    }
}

/* tiny devices — tighten placement so the button never goes off viewport */
@media (max-width: 380px) {
    .navbar-toggler {
        right: calc(env(safe-area-inset-right, 6px) + 6px) !important;
        width: 40px !important;
        height: 40px !important;
    }

    .navbar-toggler-icon {
        width: 16px !important;
        height: 16px !important;
    }
}

/* Strong override for the floating toggler so it never leaves the viewport and follows scroll */
.floating-hamburger {
    position: fixed !important;
    top: calc(env(safe-area-inset-top, 8px) + 8px) !important;
    right: calc(env(safe-area-inset-right, 8px) + 8px) !important;
    inset-inline-end: calc(env(safe-area-inset-right, 8px) + 8px) !important;
    z-index: 99999 !important;
    /* above offcanvas */
    width: 44px !important;
    height: 44px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
    padding: 0 !important;
    transform: none !important;
}

/* If content scrolls inside a container that could clip fixed children, ensure body/html allow the fixed element to remain visible */
html,
body {
    overflow-x: hidden !important;
}

/* Ensure offcanvas always anchors and animates from the right (offcanvas-end) regardless of direction */
.offcanvas.offcanvas-end {
    left: auto !important;
    right: 0 !important;
    transform: translateX(100%) !important;
    /* hidden state */
}

.offcanvas.offcanvas-end.show,
.offcanvas.offcanvas-end.showing {
    transform: translateX(0) !important;
    /* visible state */
}

/* Hide floating toggler while offcanvas open so it doesn't visually overlap */
.offcanvas.show~.floating-hamburger,
.offcanvas.show+.floating-hamburger,
.floating-hamburger.offcanvas-open {
    opacity: 0;
    /* hidable by JS if needed */
    pointer-events: none;
    transform: scale(.96) !important;
}

/* Mobile floating hamburger menu */
@media (max-width: 768px) {
    .navbar {
        background: transparent !important;
        box-shadow: none !important;
        transition: all 0.3s ease;
    }

    .navbar-brand {
        display: none;
    }

    .navbar-toggler {
        position: fixed;
        top: 20px;
        right: 20px;
        z-index: 1030;
        background: rgba(255, 255, 255, 0.9);
        border: 2px solid #8E24AA;
        border-radius: 50%;
        width: 50px;
        height: 50px;
        display: flex;
        align-items: center;
        justify-content: center;
        backdrop-filter: blur(10px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
        transition: all 0.3s ease;
    }

    .navbar-toggler:hover {
        background: rgba(142, 36, 170, 0.1);
        transform: scale(1.1);
    }

    .navbar-toggler-icon {
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%238E24AA' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='m4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
        width: 20px;
        height: 20px;
    }

    /* Add padding to body to account for fixed button */
    body {
        padding-top: 0;
    }
}
/* Section Dividers */
.section-divider {
    position: absolute;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
    z-index: 2;
    pointer-events: none;
}

.section-divider.top {
    top: 0;
    transform: rotate(180deg);
}

.section-divider.bottom {
    bottom: 0;
}

.section-divider svg {
    position: relative;
    display: block;
    width: calc(100% + 1.3px);
    height: 50px;
}

@media (min-width: 768px) {
    .section-divider svg {
        height: 100px;
    }
}

.section-divider .shape-fill {
    fill: #FFFFFF;
}

/* Specific Divider Colors */
.divider-fill-white .shape-fill {
    fill: #FFFFFF !important;
}

.divider-fill-lavender .shape-fill {
    fill: #F3E5F5 !important;
}

.divider-fill-light .shape-fill {
    fill: #f8f9fa !important;
}

