/* ============================================
   Lavendar Hall — Custom Styles
   Classic & Elegant Medical Practice
   ============================================ */

/* 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;
}

/* Selection */
::selection {
    background: rgba(212, 165, 32, 0.2);
    color: #111c32;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #111c32;
}

::-webkit-scrollbar-thumb {
    background: #d4a520;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #eccf6a;
}

/* ============================================
   Navbar
   ============================================ */
#navbar {
    transition: background-color 0.5s ease, box-shadow 0.5s ease, padding 0.5s ease;
}

#navbar.scrolled {
    background-color: rgba(255, 255, 255, 0.97);
    box-shadow: 0 1px 0 rgba(17, 28, 50, 0.08);
}

#navbar.scrolled .font-serif {
    color: #111c32;
}

#navbar.scrolled .menu-line {
    background-color: #111c32;
}

#navbar.scrolled nav a {
    color: #2d4470;
}

#navbar.scrolled nav a:hover {
    color: #b8871a;
}

#navbar.scrolled .mobile-link {
    color: #111c32;
}

/* ============================================
   Hero
   ============================================ */
#hero {
    position: relative;
}

/* Scroll indicator animation */
@keyframes scrollIndicator {
    0% {
        transform: translateY(-100%);
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        transform: translateY(400%);
        opacity: 0;
    }
}

.animate-scroll-indicator {
    animation: scrollIndicator 1.8s ease-in-out infinite;
}

/* ============================================
   Services
   ============================================ */
.service-card {
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #d4a520, #eccf6a);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s ease;
}

.service-card:hover::before {
    transform: scaleX(1);
}

/* ============================================
   Testimonials
   ============================================ */
.testimonial-card {
    position: relative;
}

.testimonial-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

.testimonial-card:hover::after {
    opacity: 1;
}

/* ============================================
   Contact Form
   ============================================ */
select option {
    background: #111c32;
    color: #fff;
}

/* ============================================
   Mobile Menu
   ============================================ */
#mobileMenu.open {
    opacity: 1;
    pointer-events: all;
}

#mobileMenu.closed {
    opacity: 0;
    pointer-events: none;
}

/* Hamburger animation */
.menu-line {
    transition: transform 0.3s ease, opacity 0.3s ease;
}

#menuBtn.active .menu-line:nth-child(1) {
    transform: translateY(4px) rotate(45deg);
}

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

#menuBtn.active .menu-line:nth-child(3) {
    transform: translateY(-4px) rotate(-45deg);
    width: 5rem;
}

/* ============================================
   Scroll Reveal (progressive enhancement)
   ============================================ */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.8s ease, transform 0.8s 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; }
    .reveal-delay-6 { transition-delay: 0.6s; }
}

/* Reduced motion: ensure everything is visible */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
    }
    
    html {
        scroll-behavior: auto;
    }
    
    .animate-scroll-indicator {
        animation: none;
        opacity: 0.5;
    }
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 767px) {
    .font-serif {
        line-height: 1.2;
    }
}

@media (min-width: 768px) {
    /* Smooth section transitions */
    section {
        contain: layout style paint;
    }
}
