/* ============================================
   Next Level Dental & Orthodontics
   Custom Styles
   ============================================ */

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

body {
    overflow-x: hidden;
}

/* Selection color */
::selection {
    background-color: #c99320;
    color: #ffffff;
}

/* ============================================
   Hero Animations
   ============================================ */
.hero-elem {
    opacity: 0;
    transform: translateY(24px);
    animation: heroReveal 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.hero-elem:nth-child(1) { animation-delay: 0.1s; }
.hero-elem:nth-child(2) { animation-delay: 0.25s; }
.hero-elem:nth-child(3) { animation-delay: 0.4s; }
.hero-elem:nth-child(4) { animation-delay: 0.55s; }

@keyframes heroReveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   Scroll Reveal (below the fold)
   Progressive enhancement: JS adds the animated state
   ============================================ */
.reveal {
    /* Default: visible (no JS = no animation, content still shows) */
    opacity: 1;
    transform: none;
}

.reveal.animated {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1), 
                transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

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

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1 !important;
        transform: none !important;
    }
    .reveal.animated {
        transition: none;
    }
    html {
        scroll-behavior: auto;
    }
    .hero-elem {
        opacity: 1;
        transform: none;
        animation: none;
    }
    .service-card, .experience-item {
        transition: none;
    }
    img {
        transition: none;
    }
}

/* ============================================
   Service Cards
   ============================================ */
.service-card,
.experience-item {
    transition: all 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

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

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

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

/* ============================================
   Mobile Menu
   ============================================ */
.mobile-link {
    position: relative;
}

/* ============================================
   Form styles
   ============================================ */
select option {
    background-color: #0f1724;
    color: #ffffff;
}

/* ============================================
   Back to top
   ============================================ */
#back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

/* ============================================
   Responsive adjustments
   ============================================ */
@media (max-width: 767px) {
    .hero-elem {
        transform: translateY(16px);
    }
}
