/* --- CSS Reset & Variables --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #fcfcfc;
    padding-top: 90px; /* Slightly increased padding for a spacious feel */
}

#navbar {
    position: relative;
    z-index: 9999;
}

:root {
    --primary-purple: #4a154b; 
    --text-light: #ffffff;      /* Changed for text clarity against purple background */
    --text-muted-light: #e0cfe1;/* Soft lavender-white for text/dropdown items */
    --transition-speed: 0.3s;
}

/* --- Navbar Core Styles (Flipped to Dark Purple) --- */
.navbar {
    background-color: var(--primary-purple); /* Navbar is now your beautiful dark purple */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1250px;
    margin: 0 auto;
    padding: 10px 24px; /* Slightly adjusted padding */
    height: 90px;       /* Increased height to let your circular logo breathe beautifully */
}

/* Logo (Your white transparent logo will now stand out perfectly) */
.nav-logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.nav-logo img {
    height: 70px; /* Increased height so the circular details are readable */
    display: block;
    object-fit: contain;
}

/* Menu Layout wrapper */
.nav-menu-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-grow: 1;
    margin-left: 40px;
}


.services-link-wrapper{
    display:flex;
    align-items:center;
    gap:10px;
}

.dropdown-toggle{
    cursor:pointer;
    color:#fff;
    padding:8px;
}

/* Centered Navigation Links */
.nav-menu {
    display: flex;
    list-style: none;
    align-items: center;
    gap: 48px;        
    margin: 0 auto;   
}

.nav-item {
    position: relative;
}

/* Nav Links Base (Text is now White) */
.nav-link {
    text-decoration: none;
    color: var(--text-light); /* Changed to white */
    font-weight: 600;
    font-size: 15px;
    padding: 8px 0;
    display: inline-flex;
    align-items: center;
    transition: opacity var(--transition-speed) ease, color var(--transition-speed) ease;
}

/* Hover Effect: Soft Opacity Shift instead of color change */
.nav-link:hover {
    color: var(--text-muted-light);
    opacity: 0.9;
}

/* --- Active Page Custom Underline with Center Dot (Flipped to White) --- */
.nav-link.active {
    color: #ffffff;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #ffffff; /* White line for contrast */
}

.nav-link.active::before {
    content: '';
    position: absolute;
    bottom: -9px;
    left: 50%;
    transform: translateX(-50%);
    width: 8px;
    height: 8px;
    background-color: #ffffff; /* White center dot */
    border-radius: 50%;
    z-index: 2;
}

/* --- Dropdown Menu Styling --- */
.dropdown-icon {
    font-size: 11px;
    margin-left: 6px;
    transition: transform var(--transition-speed) ease;
}

.dropdown-menu-list {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(15px);
    background-color: #ffffff; /* Keeps clean white background for dropdown list items */
    min-width: 260px; 
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    border-radius: 6px;
    list-style: none;
    padding: 8px 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-speed) ease, transform var(--transition-speed) ease, visibility var(--transition-speed);
}

.dropdown-menu-list li a {
    display: block;
    padding: 12px 20px;
    text-decoration: none;
    color: #333333; /* Dark text inside dropdown for readability */
    font-size: 14px;
    font-weight: 500;
    transition: background var(--transition-speed), color var(--transition-speed);
}

.dropdown-menu-list li a:hover {
    background-color: #f5f0f6;
    color: var(--primary-purple);
}

/* Show Dropdown on Hover (Desktop) */
@media (min-width: 992px) {
    .nav-item.dropdown:hover .dropdown-menu-list {
        opacity: 1;
        visibility: visible;
        transform: translateX(-50%) translateY(0);
    }
    .nav-item.dropdown:hover .dropdown-icon {
        transform: rotate(180deg);
    }
}

/* --- CTA Appointment Button (Flipped to White Background) --- */
.nav-cta {
    flex-shrink: 0;
}

.btn-appointment {
    background-color: #ffffff; /* White background makes it button stand out on purple nav */
    color: var(--primary-purple); /* Dark purple text */
    text-decoration: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    transition: background-color var(--transition-speed) ease, transform var(--transition-speed) ease, color var(--transition-speed) ease;
}

.btn-appointment:hover {
    background-color: #fdf2fe; /* Light creamy purple on hover */
    transform: translateY(-1px);
}

/* --- Mobile Menu Trigger --- */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: #ffffff; /* White toggle lines for mobile */
    font-size: 24px;
    cursor: pointer;
}

/* --- Responsive Media Queries --- */
@media (max-width: 991px) {
    .menu-toggle {
        display: block;
    }

    .nav-menu-wrapper {
        position: absolute;
        top: 90px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 90px);
        background-color: var(--primary-purple); /* Purple mobile drawer */
        flex-direction: column;
        justify-content: flex-start;
        align-items: stretch;
        margin-left: 0;
        padding: 30px;
        gap: 32px;
        transition: left 0.4s cubic-bezier(0.1, 0.9, 0.2, 1);
        overflow-y: auto;
    }

    .nav-menu-wrapper.active {
        left: 0;
    }

    .nav-menu {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
        gap: 16px;
        margin: 0; 
    }

    .nav-item {
        width: 100%;
    }

    .nav-link {
        width: 100%;
        font-size: 18px;
        padding: 12px 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1); /* Subtle white border line */
    }

    .nav-link.active::after {
        bottom: 0;
        background-color: #ffffff;
    }
    
    .nav-link.active::before {
        display: none; 
    }

    .dropdown-menu-list {
        position: static;
        transform: none;
        box-shadow: none;
        opacity: 1;
        visibility: visible;
        display: none; 
        padding-left: 20px;
        background-color: rgba(255, 255, 255, 0.05); /* Slightly transparent inside mobile drawer */
        margin-top: 5px;
        border-radius: 4px;
    }

    .dropdown-menu-list li a {
        color: var(--text-light); /* White dropdown text links on mobile */
    }

    .dropdown-menu-list.open {
        display: block;
    }

    .dropdown-toggle {
        justify-content: space-between;
    }

    .nav-cta {
        width: 100%;
        margin-top: 10px;
    }

    .btn-appointment {
        width: 100%;
        justify-content: center;
        padding: 16px;
        font-size: 16px;
    }
}



/* ==========================================================================
   INFINITE AUTOMATIC TICKER ENGINE (UPDATED TO FIXED STICKY RUNTIME)
   ========================================================================== */
.sparc-ticker-wrap {
    width: 100%;
    overflow: hidden;
    background: #f7f5f7; 
    border-bottom: 1px solid var(--border-color);
    padding: 14px 0;
    margin: 0 !important;
    display: block;
    
    /* THE STICKY POSITIONING FIX */
    position: fixed; 
    top: 90px; /* Anchors perfectly flush directly underneath your 90px high fixed navigation bar */
    left: 0;
    
    /* 
       A high layer stacking priority index keeps your dynamic floating layout cards 
       and images from bleeding over the scrolling text rows during runtime interaction.
    */
    z-index: 999; 
    will-change: transform;
}

/* 
   THE LAYOUT BASELINE ADJUSTMENT FIX:
   Because the navigation bar (90px) and ticker bar (~48px) are both fixed to the viewport, 
   the body requires extra top spacing padding to prevent page headers from being cut off.
*/
body {
    padding-top: 138px !important; /* 90px Nav Height + 48px Ticker Height */
}

.sparc-ticker {
    display: flex;
    align-items: center;
    width: max-content;
    animation: sparcMarquee 35s linear infinite;
    will-change: transform;
}

.sparc-ticker-item {
    display: flex;
    align-items: center;
    padding: 0 50px; /* Space between textual nodes */
    font-size: 14px;
    font-weight: 600; 
    color: #1a1a1a;
    white-space: nowrap;
    flex-shrink: 0;
}

.sparc-ticker-item i {
    color: var(--primary-purple);
    margin-right: 12px;
    font-size: 16px;
    display: inline-block;
}

/* Perfect Mathematics Loop Animation Matrix */
@keyframes sparcMarquee {
    0% {
        transform: translate3d(0, 0, 0);
    }
    100% {
        transform: translate3d(-33.333%, 0, 0); 
    }
}

/* Hover dynamic break trigger */
.sparc-ticker-wrap:hover .sparc-ticker {
    animation-play-state: paused;
}

/* ==========================================================================
   MOBILE SCREEN CONTEXT INTERFACE ADJUSTMENTS
   ========================================================================== */
@media (max-width: 991px) {
    /* 
       Adjusts top placement mapping safely if your navigation wrapper height 
       reconfigures dimensions automatically inside mobile display variations.
    */
    .sparc-ticker-wrap {
        top: 90px; 
    }
    body {
        padding-top: 138px !important;
    }
}