/* ========================================
   Otolaryngology Associates — Custom Styles
   Classic & Elegant Medical Website
======================================== */

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

body {
    overflow-x: hidden;
}

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

/* ---- Custom Scrollbar ---- */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #0f172a;
}
::-webkit-scrollbar-thumb {
    background: #1e293b;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #334155;
}

/* ---- Navbar Scroll State ---- */
.nav-primary-text,
.nav-secondary-text,
.nav-link {
    transition: color 0.4s ease;
}

#navbar.scrolled .nav-primary-text,
#navbar.scrolled .nav-secondary-text,
#navbar.scrolled .nav-link {
    color: #f8fafc;
}

#navbar.scrolled {
    background: rgba(8, 14, 26, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05);
}

#navbar.transparent .nav-primary-text,
#navbar.transparent .nav-secondary-text,
#navbar.transparent .nav-link {
    color: #f8fafc;
}

/* ---- Service Cards ---- */
.service-card {
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #0d9488, #5eead4);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s ease;
}

.service-card:hover::before {
    transform: scaleX(1);
}

/* ---- Mobile Menu ---- */
#mobileMenu {
    z-index: 50;
}

#mobileMenu.open {
    transform: translateX(0);
}

#mobileMenu.closed {
    transform: translateX(100%);
}

/* ---- Mobile Menu Link Hover ---- */
.mobile-menu-link {
    position: relative;
}

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

.mobile-menu-link:hover::after {
    width: 80%;
}

/* ---- Scroll Reveal Animations ---- */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.hidden-reveal {
    opacity: 0;
    transform: translateY(30px);
}

.reveal.delay-1 { transition-delay: 0.1s; }
.reveal.delay-2 { transition-delay: 0.2s; }
.reveal.delay-3 { transition-delay: 0.3s; }
.reveal.delay-4 { transition-delay: 0.4s; }
.reveal.delay-5 { transition-delay: 0.5s; }
.reveal.delay-6 { transition-delay: 0.6s; }

/* ---- Reduced Motion ---- */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    .reveal {
        opacity: 1;
        transform: none;
    }
    .reveal.hidden-reveal {
        opacity: 1;
        transform: none;
    }
    .service-card::before {
        display: none;
    }
    * {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}

/* ---- Focus Styles ---- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #5eead4;
    outline-offset: 2px;
    border-radius: 4px;
}

/* ---- Select Dropdown Fix ---- */
select option {
    background-color: #0f172a;
    color: #f8fafc;
}

/* ---- Image Loading ---- */
img {
    opacity: 1;
    transition: opacity 0.3s ease;
}

img[data-src] {
    opacity: 0;
}

/* ---- Button Hover Effects ---- */
a[href^="tel"]:hover {
    text-decoration: none;
}

/* ---- Print Styles ---- */
@media print {
    nav, #contactForm, #successMessage, .scroll-indicator {
        display: none !important;
    }
    body {
        color: #000;
        background: #fff;
    }
    .bg-slate-950, .bg-slate-900 {
        background: #fff !important;
        color: #000 !important;
    }
}
