/* ========================================
   Women's Health Center — 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;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #F7F0F8;
}
::-webkit-scrollbar-thumb {
    background: #D8B8E0;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #C08CD0;
}

/* Selection */
::selection {
    background: #D8B8E0;
    color: #3D1A42;
}

/* ========================================
   Navigation
   ======================================== */
#navbar {
    background: transparent;
}

#navbar.scrolled {
    background: rgba(247, 240, 248, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(92, 46, 110, 0.08);
}

.nav-link {
    position: relative;
}

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

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

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

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

.mobile-nav-link {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

#mobileMenu.open .mobile-nav-link {
    opacity: 1;
    transform: translateY(0);
}

#mobileMenu.open .mobile-nav-link:nth-child(1) { transition-delay: 0.05s; }
#mobileMenu.open .mobile-nav-link:nth-child(2) { transition-delay: 0.1s; }
#mobileMenu.open .mobile-nav-link:nth-child(3) { transition-delay: 0.15s; }
#mobileMenu.open .mobile-nav-link:nth-child(4) { transition-delay: 0.2s; }
#mobileMenu.open .mobile-nav-link:nth-child(5) { transition-delay: 0.25s; }

/* Menu icon animation */
.menu-line {
    transition: transform 0.3s ease, opacity 0.2s ease, width 0.3s ease;
}

#menuBtn.active .menu-line:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}
#menuBtn.active .menu-line:nth-child(2) {
    opacity: 0;
    width: 0;
}
#menuBtn.active .menu-line:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* ========================================
   Hero Section
   ======================================== */
.hero-eyebrow {
    animation: fadeInUp 0.8s ease forwards;
    opacity: 0;
}

.hero-image-wrapper {
    animation: fadeInRight 1s ease 0.3s both;
}

.floating-card {
    animation: float 4s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

/* ========================================
   Section Eyebrows
   ======================================== */
.section-eyebrow {
    animation: fadeInUp 0.8s ease forwards;
    opacity: 0;
}

.section-eyebrow-light {
    animation: fadeInUp 0.8s ease forwards;
    opacity: 0;
}

/* ========================================
   Service Cards
   ======================================== */
.service-card {
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
    transform: translateY(24px);
}

.service-card:nth-child(1) { animation-delay: 0.05s; }
.service-card:nth-child(2) { animation-delay: 0.1s; }
.service-card:nth-child(3) { animation-delay: 0.15s; }
.service-card:nth-child(4) { animation-delay: 0.2s; }
.service-card:nth-child(5) { animation-delay: 0.25s; }
.service-card:nth-child(6) { animation-delay: 0.3s; }

.service-card.animated {
    opacity: 1;
    transform: translateY(0);
}

/* ========================================
   About Section
   ======================================== */
.about-image-grid {
    animation: fadeIn 1s ease 0.2s both;
}

/* ========================================
   Scroll Reveal Animations
   (Progressive enhancement — content is
   visible even without JS)
   ======================================== */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: opacity 0.7s ease, transform 0.7s ease;
    }
    
    .reveal.from-bottom {
        transform: translateY(32px);
        opacity: 0;
    }
    
    .reveal.from-bottom.animated {
        opacity: 1;
        transform: translateY(0);
    }
    
    .reveal.from-left {
        transform: translateX(-32px);
        opacity: 0;
    }
    
    .reveal.from-left.animated {
        opacity: 1;
        transform: translateX(0);
    }
    
    .reveal.from-right {
        transform: translateX(32px);
        opacity: 0;
    }
    
    .reveal.from-right.animated {
        opacity: 1;
        transform: translateX(0);
    }
    
    .reveal.scale-in {
        transform: scale(0.95);
        opacity: 0;
    }
    
    .reveal.scale-in.animated {
        opacity: 1;
        transform: scale(1);
    }
}

/* Reduced motion: always show content */
@media (prefers-reduced-motion: reduce) {
    .reveal,
    .reveal.from-bottom,
    .reveal.from-left,
    .reveal.from-right,
    .reveal.scale-in {
        opacity: 1;
        transform: none;
    }
    
    .hero-eyebrow,
    .section-eyebrow,
    .section-eyebrow-light {
        opacity: 1;
    }
    
    .service-card {
        opacity: 1;
        transform: none;
    }
    
    .floating-card {
        animation: none;
    }
}

/* ========================================
   Back to Top Button
   ======================================== */
#backToTop.visible {
    opacity: 1;
    pointer-events: all;
    transform: translateY(0);
}

/* ========================================
   Form Styles
   ======================================== */
input:focus,
select:focus,
textarea:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(92, 46, 110, 0.1);
}

select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%235C2E6E' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

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

@media (min-width: 768px) and (max-width: 1023px) {
    #hero {
        padding-top: 6rem;
    }
}
