/* ========================================
   Core Physicians — Custom Styles
   ======================================== */

/* Base & Typography */
html {
    scroll-behavior: smooth;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

::selection {
    background-color: #1B4332;
    color: #FDF8F0;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #FDF8F0;
}
::-webkit-scrollbar-thumb {
    background: #95D5B2;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #2D6A4F;
}

/* ========================================
   Navigation
   ======================================== */
#site-header {
    transition: background-color 0.4s ease, box-shadow 0.4s ease, padding 0.4s ease;
}

#site-header.scrolled {
    background-color: rgba(253, 248, 240, 0.97);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(27, 67, 50, 0.08);
}

.nav-link {
    position: relative;
}

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

.mobile-nav-link {
    position: relative;
}

.mobile-nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background-color: #1B4332;
    transition: width 0.3s ease;
}

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

/* Hamburger */
.menu-line {
    display: block;
}

#menu-toggle.active .menu-line:nth-child(1) {
    transform: translateY(5px) rotate(45deg);
}
#menu-toggle.active .menu-line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
#menu-toggle.active .menu-line:nth-child(3) {
    transform: translateY(-5px) rotate(-45deg);
    width: 1.25rem;
}

/* ========================================
   Hero Animations
   ======================================== */
.hero-subtitle {
    opacity: 0;
    transform: translateY(20px);
    animation: heroFadeUp 0.8s ease forwards;
    animation-delay: 0.3s;
}

.hero-title {
    opacity: 0;
    transform: translateY(30px);
    animation: heroFadeUp 0.8s ease forwards;
    animation-delay: 0.5s;
}

.hero-description {
    opacity: 0;
    transform: translateY(20px);
    animation: heroFadeUp 0.8s ease forwards;
    animation-delay: 0.7s;
}

.hero-cta {
    opacity: 0;
    transform: translateY(20px);
    animation: heroFadeUp 0.8s ease forwards;
    animation-delay: 0.9s;
}

.hero-stats {
    opacity: 0;
    animation: heroFadeIn 1s ease forwards;
    animation-delay: 1.2s;
}

.hero-scroll {
    opacity: 0;
    animation: heroFadeIn 1s ease forwards;
    animation-delay: 1.5s;
}

@keyframes heroFadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes heroFadeIn {
    to {
        opacity: 1;
    }
}

/* ========================================
   Scroll Reveal
   ======================================== */
.section-reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

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

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

/* Stagger children */
.service-card {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease, transform 0.6s ease, box-shadow 0.5s ease, border-color 0.5s ease;
}

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

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

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

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

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

/* ========================================
   Buttons
   ======================================== */
a, button {
    -webkit-tap-highlight-color: transparent;
}

/* ========================================
   Form
   ======================================== */
input:focus,
textarea:focus,
select:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(45, 106, 79, 0.15);
}

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

@media (min-width: 768px) and (max-width: 1023px) {
    /* Tablet adjustments */
}

/* ========================================
   Focus Visible (Accessibility)
   ======================================== */
*:focus-visible {
    outline: 2px solid #2D6A4F;
    outline-offset: 2px;
    border-radius: 4px;
}

/* ========================================
   Print
   ======================================== */
@media print {
    #site-header,
    #mobile-menu,
    .hero-scroll {
        display: none;
    }

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

    a {
        color: #000;
    }

    a[href]::after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
        opacity: 0.7;
    }
}
