/* Atlas Addiction Treatment Center — Custom Styles */

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

/* Base styles */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #061521;
}
::-webkit-scrollbar-thumb {
    background: #254f73;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #2db88a;
}

/* Selection color */
::selection {
    background: rgba(45, 184, 138, 0.3);
    color: #f2fcf9;
}

/* Navbar styles */
#navbar {
    background: transparent;
}

#navbar.scrolled {
    background: rgba(3, 12, 20, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(45, 184, 138, 0.1);
}

#navbar.scrolled .menu-line {
    background: #a3b8cc;
}

/* Mobile menu animations */
.mobile-link {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.3s ease, transform 0.3s ease, color 0.3s ease;
}

/* Menu button animations */
#menuBtn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}
#menuBtn.active .menu-line:nth-child(2) {
    opacity: 0;
}
#menuBtn.active .menu-line:nth-child(3) {
    width: 24px;
    transform: rotate(-45deg) translate(4px, -4px);
}

/* Form focus styles */
input:focus,
textarea:focus {
    outline: none;
    box-shadow: 0 0 0 1px rgba(45, 184, 138, 0.3);
}

/* Card hover effects */
.group:hover .group-hover\:-translate-y-1 {
    transform: translateY(-4px);
}

/* Image loading placeholder */
img {
    background: linear-gradient(135deg, #0c2133 0%, #112d45 100%);
}

/* Print styles */
@media print {
    #navbar,
    #mobileMenu {
        display: none;
    }
    
    body {
        background: white;
        color: #1a1a1a;
    }
}

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

/* Scroll reveal animations — progressive enhancement via JS */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
    }
    
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

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

@media (prefers-reduced-motion: reduce) {
    .stagger-children > * {
        opacity: 1;
        transform: none;
    }
}
