/* =============================================
   HAWKINS COUNTY MEMORIAL OUTPATIENT REHAB
   Custom Styles — Editorial Navy & Gold Theme
   ============================================= */

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

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

body {
    margin: 0;
    overflow-x: hidden;
}

::selection {
    background: rgba(201, 162, 39, 0.3);
    color: #0a1f3f;
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #060f1e;
}
::-webkit-scrollbar-thumb {
    background: rgba(201, 162, 39, 0.3);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(201, 162, 39, 0.5);
}

/* --- Navigation --- */
.nav-link {
    position: relative;
}

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

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

.nav-link:hover {
    color: #fff;
}

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

.mobile-nav-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 100%;
    background: rgba(201, 162, 39, 0.08);
    border-radius: 8px;
    transition: width 0.3s ease;
}

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

/* --- Reveal Animations --- */
.reveal-element {
    opacity: 1;
    transform: none;
    transition: opacity 0.7s cubic-bezier(0.22, 0.61, 0.36, 1),
                transform 0.7s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.reveal-element.revealed {
    opacity: 1;
    transform: translateY(0) translateX(0) scale(1);
}

/* Default visible state for below-fold reveals (progressive enhancement) */
@media (prefers-reduced-motion: no-preference) {
    .reveal-element {
        opacity: 0;
        transform: translateY(30px);
    }

    .reveal-element.revealed {
        opacity: 1;
        transform: translateY(0) translateX(0) scale(1);
    }
}

/* Staggered delays */
.reveal-element:nth-child(1) { transition-delay: 0.05s; }
.reveal-element:nth-child(2) { transition-delay: 0.1s; }
.reveal-element:nth-child(3) { transition-delay: 0.15s; }
.reveal-element:nth-child(4) { transition-delay: 0.2s; }
.reveal-element:nth-child(5) { transition-delay: 0.25s; }
.reveal-element:nth-child(6) { transition-delay: 0.3s; }

/* --- FAQ --- */
.faq-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.22, 0.61, 0.36, 1),
                padding 0.4s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.faq-content.open {
    max-height: 300px;
}

.faq-item {
    transition: box-shadow 0.3s ease;
}

.faq-item:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

/* --- Form --- */
select option {
    background: #060f1e;
    color: #fff;
}

/* --- Image hover effects --- */
img {
    display: block;
    max-width: 100%;
}

/* --- Print styles --- */
@media print {
    #site-header,
    #mobile-menu,
    .reveal-element {
        opacity: 1 !important;
        transform: none !important;
    }

    footer {
        background: #fff !important;
        color: #000 !important;
    }
}

/* --- Focus visible for accessibility --- */
:focus-visible {
    outline: 2px solid #c9a227;
    outline-offset: 2px;
}

/* --- Reduced motion --- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }
}

/* --- Selection color --- */
::selection {
    background: rgba(201, 162, 39, 0.25);
    color: #0a1f3f;
}
