/* ============================================
   MELL CHIROPRACTIC — Custom Styles
   ============================================ */

/* Base & Reset */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
}

/* Smooth scroll offset for fixed nav */
section[id] {
    scroll-margin-top: 80px;
}

/* ============================================
   NAVIGATION
   ============================================ */
.nav-fixed {
    background: transparent;
    transition: background 0.4s ease, box-shadow 0.4s ease, backdrop-filter 0.4s ease;
}

.nav-fixed.scrolled {
    background: rgba(253, 248, 246, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(123, 45, 59, 0.08);
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: #7B2D3B;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.nav-link-hover:hover {
    color: #7B2D3B;
}

.nav-text-color {
    transition: color 0.3s ease;
}

.nav-fixed.scrolled .nav-text-color {
    color: #7B2D3B;
}

/* ============================================
   MOBILE MENU
   ============================================ */
.menu-line {
    transition: all 0.3s ease;
}

#menu-btn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

#menu-btn.active .menu-line:nth-child(2) {
    opacity: 0;
}

#menu-btn.active .menu-line:nth-child(3) {
    width: 1.25rem;
    transform: rotate(-45deg) translate(5px, -5px);
}

.mobile-nav-link {
    position: relative;
    transition: color 0.3s ease, transform 0.3s ease;
}

.mobile-nav-link:hover {
    color: #ec657a;
    transform: translateX(8px);
}

/* ============================================
   HERO
   ============================================ */
.hero-geo {
    animation: float 8s ease-in-out infinite;
}

.hero-geo-1 {
    animation-delay: 0s;
}

.hero-geo-2 {
    animation-delay: -3s;
}

.hero-geo-3 {
    animation-delay: -5s;
}

@keyframes float {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-20px) scale(1.05); }
}

/* ============================================
   SERVICE CARDS
   ============================================ */
.service-card {
    transform: translateY(0);
}

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

/* ============================================
   TESTIMONIAL CARDS
   ============================================ */
.testimonial-card {
    transform: translateY(0);
}

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

/* ============================================
   SCROLL REVEAL ANIMATIONS
   (Progressive enhancement — only apply when JS runs)
   ============================================ */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.7s ease, transform 0.7s ease;
    }

    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }

    .reveal-delay-1 { transition-delay: 0.1s; }
    .reveal-delay-2 { transition-delay: 0.2s; }
    .reveal-delay-3 { transition-delay: 0.3s; }
    .reveal-delay-4 { transition-delay: 0.4s; }
    .reveal-delay-5 { transition-delay: 0.5s; }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }

    .reveal {
        opacity: 1 !important;
        transform: none !important;
    }
}

/* ============================================
   FOCUS STYLES
   ============================================ */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid #7B2D3B;
    outline-offset: 2px;
    border-radius: 4px;
}

/* ============================================
   RESPONSIVE TWEAKS
   ============================================ */
@media (max-width: 767px) {
    section[id] {
        scroll-margin-top: 70px;
    }

    .font-display {
        word-break: break-word;
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
    nav, #mobile-menu, .hero-geo, footer {
        display: none;
    }

    body {
        color: #000;
        background: #fff;
    }

    .bg-burgundy-500 {
        background: #7B2D3B !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}
