/* ============================================
   Jeffrey M Nash Inc — Custom Styles
   Classic & Elegant Medical Website
   ============================================ */

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

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

body {
    overflow-x: hidden;
}

::selection {
    background: rgba(27, 67, 50, 0.15);
    color: #1B4332;
}

/* ---------- Navigation ---------- */
.nav-scrolled {
    background: rgba(250, 248, 244, 0.95) !important;
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(27, 67, 50, 0.08);
}

.nav-scrolled .nav-link {
    color: #2d5c33 !important;
}

.nav-scrolled .menu-line {
    background: #1B4332 !important;
}

/* ---------- Mobile Menu ---------- */
#mobileMenu.open {
    opacity: 1 !important;
    pointer-events: all !important;
}

#mobileMenu .menu-line:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

#mobileMenu .menu-line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

#mobileMenu .menu-line:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
    width: 5px !important;
}

.mobile-menu-link {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease, color 0.2s ease;
}

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

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

/* ---------- Hero Floating Cards ---------- */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-12px); }
}

@keyframes float-delayed {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

.animate-float-delayed {
    animation: float-delayed 5s ease-in-out infinite;
    animation-delay: 1.5s;
}

/* ---------- 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, #1B4332, #D4A96A);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

/* ---------- Scroll Reveal ---------- */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

.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; }

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

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

/* ---------- Input AutoFill ---------- */
input:-webkit-autofill,
textarea:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 30px #FAF8F4 inset !important;
    box-shadow: 0 0 0 30px #FAF8F4 inset !important;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #1B4332;
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
    .font-serif {
        font-size: clamp(1.75rem, 5vw, 2.5rem);
    }

    #hero h1 {
        font-size: clamp(2rem, 6vw, 3.5rem);
    }
}
