/**
 * Global CSS Stylesheet - Hind Spine Clinic
 * Implements design token system, header layouts, dropdown menus, resets, and typography.
 */

/* ==========================================================================
   1. Design System Tokens & Custom Properties
   ========================================================================== */
:root {
    /* Color Palette */
    --color-primary: #024731;        /* Deep Emerald */
    --color-primary-light: #036646;
    --color-primary-dark: #012b1d;
    
    --color-secondary: #D4AF37;      /* Champagne Gold */
    --color-secondary-hover: #b5952f;
    
    --color-dark-blue: #0F172A;      /* Midnight Slate */
    --color-dark-blue-hover: #1e293b;
    
    --color-accent-orange: #D4AF37;  /* Unified with Champagne Gold */
    
    --color-text-dark: #0F172A;      /* Body Text Slate */
    --color-text-muted: #475569;
    --color-bg-light: #F8FAF9;       /* Light clinical background */
    --color-bg-white: #FFFFFF;
    --color-border: #E2E8F0;
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #012b1d 0%, #036646 100%);
    --gradient-accent: linear-gradient(135deg, #D4AF37 0%, #b5952f 100%);
    --gradient-glass: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.6) 100%);
    
    /* Typography */
    --font-heading: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    --font-body: 'Inter', system-ui, -apple-system, sans-serif;
    
    /* Shadow & Transition System */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.03);
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Layout Constants */
    --header-height: 140px;
    --container-width: 1200px;
}

/* ==========================================================================
   2. Base Reset & Layout
   ========================================================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    overflow-x: hidden;
    width: 100%;
}

body {
    font-family: var(--font-body);
    overflow-x: hidden;
    width: 100%;
    color: var(--color-text-dark);
    background-color: var(--color-bg-light);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.25;
}

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

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

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

/* ==========================================================================
   3. Header Styling (with Slanted Left Logo block)
   ========================================================================== */
.site-header {
    width: 100%;
    position: relative;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
    background-color: var(--color-bg-white);
}

/* Top Utility Bar */
.top-bar {
    background-color: var(--color-dark-blue);
    color: var(--color-bg-white);
    padding: 8px 0;
    font-size: 0.85rem;
    border-bottom: 2px solid var(--color-secondary);
}

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

.top-bar-contact {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

a.contact-item:hover {
    color: var(--color-secondary);
}

.icon-circle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background-color: var(--color-accent-orange);
    border-radius: 50%;
    color: var(--color-bg-white);
    flex-shrink: 0;
}

.icon-circle svg {
    width: 14px;
    height: 14px;
}

.top-bar-socials {
    display: flex;
    align-items: center;
    gap: 12px;
}

.top-bar-socials a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    color: var(--color-accent-orange);
    background-color: transparent;
    border-radius: 50%;
    transition: var(--transition-smooth);
}

.top-bar-socials a:hover {
    color: var(--color-bg-white);
    transform: scale(1.1);
}

.social-icon {
    width: 18px;
    height: 18px;
}

/* Hidden by default on desktop, shown inside mobile menu */
.mobile-top-bar-content {
    display: none;
}

/* Main Navigation Bar (Clean height-aligned structure) */
.nav-container {
    padding: 0;
    background-color: var(--color-bg-white);
    border-bottom: 1px solid var(--color-border);
}

.navbar-inner {
    display: flex;
    justify-content: space-between;
    align-items: stretch; /* Vertically stretch menu and logo wrapper */
    height: 85px;
}

/* Split-Header Logo Section: Forest Green banner extending left infinitely */
.logo-link {
    display: flex;
    align-items: center;
    background-color: var(--color-primary);
    padding: 10px 45px 10px 20px;
    margin-left: -20px; /* Align perfectly to container edge */
    position: relative;
    /* Slants right border and extends infinitely left */
    clip-path: polygon(-100vw 0, 100% 0, 88% 100%, -100vw 100%);
    transition: var(--transition-smooth);
    z-index: 5;
}

.logo-link:hover {
    background-color: var(--color-primary-light);
}

.logo-img {
    height: 52px;
    width: auto;
    object-fit: contain;
    background-color: #ffffff; /* Contrast card border box for the logo */
    padding: 4px 10px;
    border-radius: 4px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* Desktop Navigation Menu */
.nav-menu {
    display: flex;
    align-items: center;
}

.nav-list {
    display: flex;
    align-items: center;
    gap: 25px;
    height: 100%;
}

.nav-item {
    position: relative;
    display: flex;
    align-items: center;
    height: 100%;
}

.nav-link {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--color-dark-blue);
    display: flex;
    align-items: center;
    gap: 5px;
    height: 100%;
    padding: 0 2px;
    border-bottom: 3px solid transparent;
    transition: var(--transition-smooth);
}

.nav-link:hover, 
.nav-link.active {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
}

.dropdown-chevron {
    width: 12px;
    height: 12px;
    transition: var(--transition-smooth);
}

.nav-item:hover .dropdown-chevron {
    transform: rotate(180deg);
}

/* Dropdown Menu styling */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--color-bg-white);
    border-radius: 0 0 6px 6px;
    box-shadow: var(--shadow-lg);
    border-top: 3px solid var(--color-secondary);
    min-width: 240px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--transition-smooth);
    padding: 12px 0;
    z-index: 1010;
}

.dropdown-menu li {
    position: relative;
    padding: 0 16px;
}

.dropdown-link {
    display: block;
    padding: 10px 12px 10px 24px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-text-dark);
    border-radius: 4px;
    position: relative;
}

.dropdown-link::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--color-accent-orange);
    border: 2px solid var(--color-secondary);
    transition: var(--transition-smooth);
}

.dropdown-link:hover {
    color: var(--color-primary);
    background-color: var(--color-bg-light);
}

.dropdown-link:hover::before {
    background-color: var(--color-primary);
    border-color: var(--color-primary-light);
    transform: translateY(-50%) scale(1.3);
}

.dropdown-menu.megamenu {
    min-width: 420px;
}

.has-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Mobile Toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--color-dark-blue);
    cursor: pointer;
    padding: 8px;
}

.toggle-icon {
    width: 30px;
    height: 30px;
}

/* ==========================================================================
   4. Premium Footer Styling
   ========================================================================== */
.site-footer {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%); 
    color: #ffffff;
    padding: 0;
    position: relative;
    font-family: var(--font-body);
}

/* Slanted Logo top bar */
.footer-top-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    height: 100px;
    position: relative;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-logo-wrap {
    background-color: #ffffff;
    padding: 20px 50px 20px 20px;
    clip-path: polygon(0 0, 100% 0, 85% 100%, 0 100%);
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 280px;
    box-shadow: 4px 0 15px rgba(0, 0, 0, 0.15);
}

.footer-logo {
    height: 60px;
    width: auto;
    object-fit: contain;
}

.footer-socials {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-left: auto;
}

.social-circle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background-color: var(--color-secondary);
    border-radius: 50%;
    color: #ffffff;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.social-circle svg {
    width: 18px;
    height: 18px;
}

.social-circle:hover {
    background-color: #ffffff;
    color: var(--color-secondary-hover);
    transform: translateY(-5px) rotate(8deg);
    box-shadow: 0 8px 20px rgba(242, 188, 7, 0.3);
}

/* Footer Main Grid */
.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 0.9fr 1.2fr;
    gap: 60px;
    padding: 70px 20px;
}

.footer-col {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.footer-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: #ffffff;
    font-family: var(--font-heading);
    position: relative;
    padding-bottom: 12px;
    letter-spacing: 0.5px;
}

.footer-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 35px;
    height: 3px;
    background-color: var(--color-secondary);
    border-radius: 2px;
}

.menu-col .footer-title::after,
.timing-address-col .footer-title::after {
    width: 25px;
}
.menu-col .footer-title::before,
.timing-address-col .footer-title::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 30px;
    width: 6px;
    height: 3px;
    background-color: #ffffff;
    border-radius: 50%;
}

/* Column 1: Glassmorphism Inset Container */
.about-clinic-col {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 28px;
    border-radius: 8px;
    box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.03), 0 10px 30px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
    transition: var(--transition-smooth);
}

.about-clinic-col:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.12);
    transform: translateY(-2px);
}

.about-clinic-col .footer-title::after {
    width: 45px;
}

.about-clinic-text {
    font-size: 0.94rem;
    line-height: 1.75;
    color: #cbd5e1;
}

.about-clinic-text strong {
    color: #ffffff;
    font-weight: 600;
}

.footer-contact-details {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 10px;
}

.footer-contact-link {
    display: flex;
    align-items: center;
    gap: 14px;
}

.contact-icon-circle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background-color: rgba(0, 92, 48, 0.6);
    border-radius: 50%;
    color: var(--color-secondary);
    flex-shrink: 0;
    border: 1px solid rgba(242, 188, 7, 0.25);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.contact-icon-circle svg {
    width: 16px;
    height: 16px;
}

.contact-value {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--color-secondary);
    transition: var(--transition-smooth);
}

.footer-contact-link:hover .contact-icon-circle {
    transform: scale(1.15) rotate(15deg);
    background-color: var(--color-secondary);
    color: #ffffff;
    border-color: var(--color-secondary);
}

.footer-contact-link:hover .contact-value {
    color: #ffffff;
    text-decoration: underline;
}

/* Column 2: Main Menu links */
.footer-menu-links {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.footer-menu-links li a {
    font-size: 0.98rem;
    font-weight: 500;
    color: #cbd5e1;
    display: inline-flex;
    align-items: center;
    transition: var(--transition-smooth);
}

.footer-menu-links li a::before {
    content: '>';
    font-family: var(--font-heading);
    color: var(--color-secondary);
    font-weight: 800;
    margin-right: 12px;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.footer-menu-links li a:hover {
    color: #ffffff;
}

.footer-menu-links li a:hover::before {
    transform: translateX(6px);
    color: #ffffff;
}

/* Column 3: Timing & Address */
.visiting-hours-wrap {
    display: flex;
    justify-content: space-between;
    font-size: 0.98rem;
    color: #cbd5e1;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.12);
    padding-bottom: 12px;
    margin-bottom: 10px;
}

.days-label {
    font-weight: 600;
}

.hours-val {
    font-weight: 600;
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.address-wrap {
    display: flex;
    gap: 14px;
    margin-top: 15px;
}

.address-icon {
    color: var(--color-secondary);
    flex-shrink: 0;
    margin-top: 3px;
    animation: pinGlow 2s infinite alternate;
}

.address-icon svg {
    width: 20px;
    height: 20px;
}

.address-link-text {
    font-size: 0.94rem;
    line-height: 1.65;
    color: #cbd5e1;
    text-decoration: underline;
    transition: var(--transition-smooth);
}

.address-link-text:hover {
    color: var(--color-secondary);
}

@keyframes pinGlow {
    0% { transform: translateY(0); opacity: 0.9; }
    100% { transform: translateY(-3px); opacity: 1; filter: drop-shadow(0 0 4px var(--color-secondary)); }
}

/* Footer Bottom Bar */
.footer-bottom {
    background-color: rgba(0, 56, 29, 0.85); 
    padding: 24px 0;
    font-size: 0.88rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-bottom-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    color: #a7f3d0;
}

.footer-privacy-link,
.footer-credit-link {
    color: #ffffff;
    text-decoration: underline;
    transition: var(--transition-smooth);
}

.footer-privacy-link:hover,
.footer-credit-link:hover {
    color: var(--color-secondary);
}

.security-text {
    color: #34d399;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    text-shadow: 0 0 10px rgba(52, 211, 153, 0.2);
}

/* Floating Scroll to Top button */
.scroll-to-top {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 46px;
    height: 46px;
    background-color: var(--color-secondary);
    color: #ffffff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
    border-radius: 6px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.scroll-to-top svg {
    width: 20px;
    height: 20px;
    transition: var(--transition-smooth);
}

.scroll-to-top:hover {
    background-color: var(--color-secondary-hover);
    transform: translateY(-4px);
}

.scroll-to-top:hover svg {
    transform: translateY(-2px);
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
}

/* Floating WhatsApp Button (Bulletproof overriding layout specs) */
.whatsapp-float {
    position: fixed !important;
    bottom: 85px !important;
    right: 25px !important;
    width: 46px !important;
    height: 46px !important;
    background-color: #25d366 !important;
    color: #ffffff !important;
    border: none !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 998 !important;
    border-radius: 6px !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25) !important;
    text-decoration: none !important;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
}

.whatsapp-float svg {
    width: 24px !important;
    height: 24px !important;
    fill: #ffffff !important;
    margin: 0 !important;
    padding: 0 !important;
    display: block !important;
}

.whatsapp-float:hover {
    background-color: #128c7e !important;
    color: #ffffff !important;
    transform: translateY(-4px) scale(1.05) !important;
}

/* ==========================================================================
   5. Responsive Design (Mobile / Tablet Media Queries)
   ========================================================================== */
@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: 1.2fr 1fr;
        gap: 40px;
    }
    
    .timing-address-col {
        grid-column: span 2;
    }
}

@media (max-width: 900px) {
    /* Hide top bar on mobile */
    .top-bar {
        display: none;
    }

    /* Responsive Navigation Menu */
    .menu-toggle {
        display: block;
    }
    
    .navbar-inner {
        height: 70px;
    }
    
    .logo-img {
        height: 42px;
    }
    
    .logo-link {
        clip-path: none;
        background-color: transparent;
        padding: 5px;
        margin-left: 0;
    }
    
    .logo-link:hover {
        background-color: transparent;
    }
    
    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--color-bg-white);
        box-shadow: var(--shadow-lg);
        border-top: 1px solid var(--color-border);
        display: none; 
        max-height: 80vh;
        overflow-y: auto;
        padding: 15px 0;
    }
    
    .nav-menu.active {
        display: block;
    }
    
    .nav-list {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        height: auto;
    }
    
    .nav-item {
        border-bottom: 1px solid #f1f5f9;
        height: auto;
        display: block;
    }
    
    .nav-link {
        padding: 15px 20px;
        justify-content: space-between;
        height: auto;
        border-bottom: none;
    }
    
    .nav-link:hover, 
    .nav-link.active {
        border-bottom: none;
        background-color: var(--color-bg-light);
    }
    
    .dropdown-chevron {
        transform: rotate(0);
    }
    
    /* Dropdown inside Mobile menu */
    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        display: none; 
        transform: none;
        box-shadow: none;
        border-top: none;
        border-left: 2px solid var(--color-secondary);
        border-radius: 0;
        background-color: var(--color-bg-light);
        padding: 5px 0 10px 0;
        margin-left: 20px;
        min-width: unset;
    }
    
    .dropdown-menu.megamenu {
        min-width: unset;
    }
    
    .nav-item.dropdown-active .dropdown-menu {
        display: block;
    }
    
    .nav-item.dropdown-active .dropdown-chevron {
        transform: rotate(180deg);
    }
    
    /* Mobile Top Bar inside Sidebar */
    .mobile-top-bar-content {
        display: block;
        margin-top: 15px;
        padding: 20px;
        background-color: var(--color-bg-light);
        border-top: 1px solid var(--color-border);
    }
    
    .mobile-contact-list {
        display: flex;
        flex-direction: column;
        gap: 15px;
    }
    
    .mobile-contact-item {
        display: flex;
        align-items: center;
        gap: 12px;
        color: var(--color-text-dark);
        font-size: 0.85rem;
        text-decoration: none;
    }
    
    .mobile-contact-item .icon-circle {
        width: 30px;
        height: 30px;
        background-color: var(--color-primary);
        color: #fff;
    }
}

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 40px;
        padding: 50px 20px;
    }
    
    .timing-address-col {
        grid-column: span 1;
    }
    
    .footer-top-row {
        height: auto;
        padding: 24px;
        flex-direction: column;
        gap: 20px;
        align-items: center;
    }
    
    .footer-logo-wrap {
        position: static;
        clip-path: none;
        width: 100%;
        max-width: 250px;
        padding: 12px;
        border-radius: 6px;
    }
    
    .footer-socials {
        margin-left: 0;
        justify-content: center;
        width: 100%;
    }
}

@media (max-width: 640px) {
    .top-bar-container {
        flex-direction: column;
        align-items: center;
        gap: 8px;
    }
    
    .top-bar-contact {
        flex-direction: column;
        align-items: center;
        gap: 6px;
    }
    
    .footer-bottom-inner {
        flex-direction: column;
        text-align: center;
    }
}

/* ==========================================================================
   Page Hero Section (Shared)
   ========================================================================== */
.page-hero {
    background-color: var(--color-dark-blue);
    background-image: linear-gradient(135deg, var(--color-dark-blue) 0%, #001f3f 100%);
    padding: 80px 0;
    text-align: center;
    color: #fff;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 2.8rem;
    font-weight: 800;
    margin-bottom: 15px;
    letter-spacing: -0.5px;
}

.hero-subtitle {
    font-family: var(--font-body);
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.85);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}
