/* === Custom Styles for Simply White by SmileLabs === */

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

/* Custom selection color */
::selection {
    background: #9c1838;
    color: #fff;
}

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

#navbar.scrolled {
    background: rgba(10, 15, 26, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06), 0 4px 20px rgba(0, 0, 0, 0.3);
}

#navbar.scrolled #nav-logo-text,
#navbar.scrolled .nav-link {
    color: #fff;
}

/* === Hero Animations === */
.hero-fade-up {
    opacity: 0;
    transform: translateY(30px);
    animation: heroFadeUp 0.8s ease forwards;
}

.hero-fade-up:nth-child(1) { animation-delay: 0.1s; }
.hero-fade-up:nth-child(2) { animation-delay: 0.3s; }
.hero-fade-up:nth-child(3) { animation-delay: 0.5s; }
.hero-fade-up:nth-child(4) { animation-delay: 0.7s; }

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

/* === Service Cards === */
.service-card {
    position: relative;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 60px -15px rgba(156, 24, 56, 0.25);
}

/* === Scroll Animations === */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.visible {
    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; }
.reveal-delay-6 { transition-delay: 0.6s; }

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

#mobile-menu.hidden {
    animation: slideUp 0.25s ease forwards;
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
    }
    to {
        opacity: 1;
        max-height: 500px;
    }
}

@keyframes slideUp {
    from {
        opacity: 1;
        max-height: 500px;
    }
    to {
        opacity: 0;
        max-height: 0;
    }
}

/* === Button Focus States === */
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #9c1838;
    outline-offset: 2px;
}

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

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

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

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

/* === Responsive Adjustments === */
@media (max-width: 768px) {
    .service-card {
        padding: 1.5rem;
    }
    
    .service-card:hover {
        transform: none;
    }
}

/* === Reduced Motion === */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
    
    .reveal {
        opacity: 1;
        transform: none;
    }
}
