/* Custom styles for Outpatient Alcohol Therapy */

html {
    scroll-behavior: smooth;
}

body {
    overflow-x: hidden;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #061a2e;
}
::-webkit-scrollbar-thumb {
    background: #1a5276;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #48c9b0;
}

/* Selection */
::selection {
    background: rgba(72, 201, 176, 0.3);
    color: #e0f5f0;
}

/* Fade-in animations */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger children */
.stagger-children > * {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.stagger-children.visible > *:nth-child(1) { transition-delay: 0.1s; }
.stagger-children.visible > *:nth-child(2) { transition-delay: 0.2s; }
.stagger-children.visible > *:nth-child(3) { transition-delay: 0.3s; }
.stagger-children.visible > *:nth-child(4) { transition-delay: 0.4s; }
.stagger-children.visible > *:nth-child(5) { transition-delay: 0.5s; }
.stagger-children.visible > *:nth-child(6) { transition-delay: 0.6s; }

.stagger-children.visible > * {
    opacity: 1;
    transform: translateY(0);
}

/* Navbar scrolled state */
.nav-scrolled {
    background: rgba(6, 26, 46, 0.95) !important;
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* Hero image parallax-like */
.hero-image {
    transition: transform 0.3s ease;
}

/* Button hover glow */
.btn-glow:hover {
    box-shadow: 0 0 40px rgba(72, 201, 176, 0.3) !important;
}

/* FAQ active state */
.faq-item.active {
    border-color: rgba(72, 201, 176, 0.3);
    background: rgba(255, 255, 255, 0.04);
}

/* Focus visible for accessibility */
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid #48c9b0;
    outline-offset: 2px;
}

/* Smooth image loading */
img {
    opacity: 1;
    transition: opacity 0.3s ease;
}

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

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

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Prevent layout shift on images */
img {
    content-visibility: auto;
}

/* Print styles */
@media print {
    nav, #contact, #faq, button {
        display: none !important;
    }
    body {
        background: white;
        color: black;
    }
}
