/* ========================================
   Jessica Salas Mann, MD — Custom Styles
   ======================================== */

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

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

body {
    min-height: 100vh;
}

/* Selection color */
::selection {
    background-color: rgba(5, 150, 105, 0.2);
    color: #064e3b;
}

/* ========================================
   Navbar
   ======================================== */
.navbar-text {
    color: #064e3b;
    transition: color 0.3s ease;
}

.navbar-subtitle {
    color: #047857;
    transition: color 0.3s ease;
}

#navbar.scrolled .navbar-text,
#navbar.scrolled .navbar-subtitle {
    color: #064e3b;
}

#navbar.scrolled {
    background: rgba(254, 253, 248, 0.95) !important;
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(5, 150, 105, 0.08);
}

/* ========================================
   Mobile Menu
   ======================================== */
.mobile-menu-link {
    position: relative;
}

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

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

/* ========================================
   Hero Section
   ======================================== */
.hero-section {
    position: relative;
}

/* ========================================
   Cards & Interactive Elements
   ======================================== */
.service-card {
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                box-shadow 0.4s ease;
}

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

/* ========================================
   Scroll Reveal Animations
   (Progressive Enhancement — content
    is visible by default; JS adds the
   animated state only when supported)
   ======================================== */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(24px);
        transition: opacity 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                    transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }

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

    /* Staggered delays for grid items */
    .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; }
}

/* Fallback: ensure content is visible even without JS */
.reveal {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(24px);
    }
}

/* ========================================
   Form Styles
   ======================================== */
input:focus,
select:focus,
textarea:focus {
    outline: none;
}

/* ========================================
   Smooth Scroll Offset for Fixed Nav
   ======================================== */
section[id] {
    scroll-margin-top: 80px;
}

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

::-webkit-scrollbar-track {
    background: #fdf9ef;
}

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

::-webkit-scrollbar-thumb:hover {
    background: #6ee7b7;
}

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

    /* Ensure mobile menu has proper z-index */
    #mobile-menu {
        z-index: 50;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .service-card {
        /* Subtle hover lift on tablet */
    }
}

/* ========================================
   Print Styles
   ======================================== */
@media print {
    #navbar,
    #mobile-menu,
    .reveal {
        display: none !important;
    }

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

    a {
        color: #047857;
    }
}
