/* ============================================
   Health District Family Dental Clinic
   Custom Styles & Animations
   ============================================ */

/* ---- Smooth Scrolling ---- */
html {
    scroll-behavior: smooth;
}

/* ---- Scroll Reveal Animations ---- */
.scroll-reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Default state for reduced motion or no-JS: always visible */
@media (prefers-reduced-motion: no-preference) {
    .scroll-reveal {
        opacity: 0;
        transform: translateY(24px);
    }
    
    .scroll-reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ---- Navbar Scroll State ---- */
#navbar.scrolled {
    background: rgba(2, 6, 23, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06), 0 4px 24px rgba(0, 0, 0, 0.3);
}

/* ---- Mobile Menu Transitions ---- */
#mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
    opacity: 0;
}

#mobile-menu.open {
    max-height: 400px;
    opacity: 1;
}

.mobile-nav-link {
    position: relative;
    padding-left: 0;
    transition: padding-left 0.2s ease, color 0.2s ease;
}

.mobile-nav-link:hover {
    padding-left: 8px;
    color: #fff;
}

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

/* ---- Custom Selection ---- */
::selection {
    background: rgba(13, 148, 136, 0.2);
    color: #0f766e;
}

/* ---- Focus Styles ---- */
:focus-visible {
    outline: 2px solid #14b8a6;
    outline-offset: 2px;
}

/* ---- Image Optimization ---- */
img {
    max-width: 100%;
    height: auto;
}

/* ---- Utility: Aspect Ratio Fallbacks ---- */
.aspect-\[4\/3\] {
    aspect-ratio: 4 / 3;
}

/* ---- Subtle Card Hover Glow ---- */
.group:hover .group-hover\:bg-teal-500 {
    background-color: #0d9488;
}

/* ---- Form Input Focus Ring Animation ---- */
input:focus,
select:focus,
textarea:focus {
    box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.15);
}

/* ---- Print Styles ---- */
@media print {
    #navbar,
    #contact-form,
    .scroll-reveal {
        display: none !important;
    }
    
    body {
        color: #000;
        background: #fff;
    }
    
    section {
        page-break-inside: avoid;
    }
}

/* ---- Extra Small Screen Adjustments ---- */
@media (max-width: 360px) {
    .font-display {
        font-size: clamp(1.5rem, 8vw, 2rem);
    }
}
