/* ==========================================
   Cedarville Wellness Center-SBHC
   Custom Styles
   ========================================== */

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

body {
    overflow-x: hidden;
}

::selection {
    background-color: rgba(161, 31, 57, 0.12);
    color: #6e1a2e;
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: #FDF8F5;
}
::-webkit-scrollbar-thumb {
    background: #fce7eb;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #f6a6b8;
}

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

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

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

.nav-link::after {
    left: 50%;
    transform: translateX(-50%);
}

.nav-link:hover::after {
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
}

/* --- Service Cards --- */
.service-card {
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.service-card:hover {
    background: #fff9f7;
    transform: translateY(-2px);
}

.service-card:hover .w-12 {
    background-color: rgba(161, 31, 57, 0.08);
}

/* --- Mobile Menu --- */
.mobile-link {
    opacity: 0;
    transform: translateY(12px);
    transition: all 0.35s ease;
}

body.menu-open .mobile-link {
    opacity: 1;
    transform: translateY(0);
}

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

/* --- Menu Button Animation --- */
.menu-line {
    transition: all 0.3s ease;
}

body.menu-open #menuIcon .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}
body.menu-open #menuIcon .menu-line:nth-child(2) {
    opacity: 0;
}
body.menu-open #menuIcon .menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(4px, -4px);
}

/* --- Scroll Reveal --- */
.reveal {
    opacity: 1;
    transform: translateY(0);
    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);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    html {
        scroll-behavior: auto;
    }
}

/* --- Form Focus States --- */
input:focus,
select:focus,
textarea:focus {
    border-color: #f6a6b8 !important;
    box-shadow: 0 0 0 3px rgba(246, 166, 184, 0.2);
}

/* --- Image hover --- */
.rounded-2xl.overflow-hidden {
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.rounded-2xl.overflow-hidden:hover {
    transform: scale(1.01);
}

.rounded-2xl.overflow-hidden img {
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.rounded-2xl.overflow-hidden:hover img {
    transform: scale(1.03);
}

/* --- Button ripple effect --- */
button, a {
    -webkit-tap-highlight-color: transparent;
}

/* --- Print Styles --- */
@media print {
    nav, #contactForm, .reveal {
        display: none !important;
    }
    body {
        color: #000;
        background: #fff;
    }
}
