/* ============================================
   Premier Health Care Exchange — Custom Styles
   ============================================ */

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

body {
    overflow-x: hidden;
}

/* Selection */
::selection {
    background: rgba(123, 45, 59, 0.15);
    color: #3a0f17;
}

/* ============================================
   Navigation
   ============================================ */
#navbar {
    transition: background-color 0.4s ease, backdrop-filter 0.4s ease, box-shadow 0.4s ease;
}

#navbar.scrolled {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(123, 45, 59, 0.08);
}

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

#navbar.scrolled .nav-logo-text {
    color: #3a0f17;
}

.nav-link {
    position: relative;
}

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

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

#navbar.scrolled .nav-link {
    color: rgba(58, 15, 23, 0.7);
}

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

/* Mobile Menu */
.mobile-nav-link {
    font-size: 1.1rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(123, 45, 59, 0.06);
}

.mobile-nav-link:last-child {
    border-bottom: none;
}

/* ============================================
   Hero Section
   ============================================ */
.hero-decor {
    opacity: 0;
    animation: heroFadeIn 1s ease forwards;
}

.hero-decor:nth-child(1) { animation-delay: 0.1s; }
.hero-decor:nth-child(2) { animation-delay: 0.2s; }
.hero-decor:nth-child(3) { animation-delay: 0.3s; }
.hero-decor:nth-child(4) { animation-delay: 0.4s; }
.hero-decor:nth-child(5) { animation-delay: 0.5s; }
.hero-decor:nth-child(6) { animation-delay: 0.6s; }
.hero-decor:nth-child(7) { animation-delay: 0.7s; }

@keyframes heroFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.hero-eyebrow {
    opacity: 0;
    animation: slideUp 0.8s ease 0.3s forwards;
}

.hero-headline {
    opacity: 0;
    animation: slideUp 0.9s ease 0.5s forwards;
}

.hero-subheadline {
    opacity: 0;
    animation: slideUp 0.9s ease 0.7s forwards;
}

.hero-ctas {
    opacity: 0;
    animation: slideUp 0.9s ease 0.9s forwards;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   Section Labels & Titles
   ============================================ */
.section-label {
    display: block;
}

.section-title {
    line-height: 1.15;
}

/* ============================================
   Scroll Reveal (Progressive Enhancement)
   Only applied when JS is available and user
   prefers motion. Default state is visible.
   ============================================ */
@media (prefers-reduced-motion: no-preference) {
    .scroll-reveal {
        opacity: 1;
        transform: translateY(0);
        transition: opacity 0.7s ease, transform 0.7s ease;
    }
    
    .scroll-reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   Service Cards
   ============================================ */
.service-card {
    transition: background-color 0.5s ease;
}

.service-card:hover .service-card-icon {
    transform: scale(1.05);
}

.service-card-icon {
    transition: transform 0.3s ease;
}

/* ============================================
   Facility Cards
   ============================================ */
.group:hover .group-img {
    transform: scale(1.05);
}

/* ============================================
   Buttons
   ============================================ */
button, a[role="button"] {
    cursor: pointer;
}

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

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 768px) {
    .section-title {
        font-size: 2.5rem;
        line-height: 1.2;
    }
    
    .hero-headline {
        font-size: 2.75rem;
    }
    
    .hero-subheadline {
        font-size: 1.05rem;
    }
}

@media (max-width: 640px) {
    .hero-headline {
        font-size: 2.25rem;
    }
}

/* ============================================
   Focus Visible (Accessibility)
   ============================================ */
:focus-visible {
    outline: 2px solid #7B2D3B;
    outline-offset: 2px;
}

/* ============================================
   Print Styles
   ============================================ */
@media print {
    #navbar, .hero-decor, #contactForm {
        display: none;
    }
    
    body {
        color: #000;
        background: #fff;
    }
}
