/* ============================================
   NEGRIN COMMUNITY WELLNESS CENTER
   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(52, 212, 168, 0.3);
    color: #0B1D3A;
}

/* --- Scroll Reveal (Progressive Enhancement) --- */
@media (prefers-reduced-motion: no-preference) {
    .scroll-reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
    }

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

/* Fallback: always visible if JS is disabled or reduced motion preferred */
@media (prefers-reduced-motion: reduce) {
    .scroll-reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

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

#navbar.scrolled {
    background-color: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(11, 29, 58, 0.08);
}

.nav-text {
    color: #0B1D3A;
    transition: color 0.3s ease;
}

#navbar.scrolled .nav-text {
    color: #0B1D3A;
}

.nav-link {
    position: relative;
}

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

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

#navbar.scrolled .nav-link {
    color: #1e3a58;
}

#navbar.scrolled .nav-link:hover {
    color: #0fb88a;
}

/* --- Mobile Menu --- */
#mobile-menu {
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mobile-nav-link {
    position: relative;
    padding-left: 0;
}

.mobile-nav-link::before {
    content: '';
    position: absolute;
    left: -12px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 100%;
    background: rgba(52, 212, 168, 0.1);
    border-radius: 4px;
    transition: width 0.2s ease;
}

.mobile-nav-link:hover::before {
    width: calc(100% + 24px);
}

/* --- Mobile Menu Button Animation --- */
#mobile-menu-btn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

#mobile-menu-btn.active .menu-line:nth-child(2) {
    opacity: 0;
}

#mobile-menu-btn.active .menu-line:nth-child(3) {
    width: 24px;
    transform: rotate(-45deg) translate(5px, -5px);
}

/* --- Card Hover Effects --- */
.group:hover .group-hover\:bg-mint-500\/20 {
    background-color: rgba(52, 212, 168, 0.2);
}

/* --- Form Focus States --- */
input:focus,
select:focus,
textarea:focus {
    box-shadow: 0 0 0 3px rgba(52, 212, 168, 0.15);
}

/* --- Button Ripple --- */
button, a {
    position: relative;
    overflow: visible;
}

/* --- Smooth Image Loading --- */
img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* --- Map Overlay --- */
.map-container {
    position: relative;
}

.map-container::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(255,255,255,0) 0%, rgba(255,255,255,0.05) 100%);
    pointer-events: none;
}

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

/* --- Focus Visible --- */
:focus-visible {
    outline: 2px solid #34d4a8;
    outline-offset: 2px;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #7c94b0;
}

/* --- Print Styles --- */
@media print {
    #navbar,
    #mobile-menu,
    .scroll-reveal,
    .map-container iframe {
        display: none !important;
    }
    
    body {
        color: #000;
        background: #fff;
    }
    
    a {
        color: #000;
        text-decoration: underline;
    }
}
