/* Crown Rehab & Wellness — Custom Styles */

/* Base & Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

body {
    overflow-x: hidden;
}

/* Selection Color */
::selection {
    background: rgba(212, 175, 55, 0.3);
    color: #f8fafc;
}

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

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

::-webkit-scrollbar-thumb {
    background: #1e293b;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #334155;
}

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

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: linear-gradient(90deg, #d4af37, #fbbf24);
    transition: width 0.3s ease;
}

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

.navbar-scrolled {
    background: rgba(2, 6, 23, 0.95) !important;
    backdrop-blur-xl !important;
    border-bottom: 1px solid rgba(30, 41, 59, 0.5);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* Mobile Menu */
.mobile-link {
    position: relative;
    padding-left: 0;
}

/* Service Cards */
.service-card {
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #14b8a6, transparent);
    opacity: 0;
    transition: opacity 0.5s ease;
}

.service-card:hover::before {
    opacity: 1;
}

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

.reveal[data-reveal] {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal[data-reveal].revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger Children */
.stagger-children .reveal[data-reveal] {
    transition-delay: calc(var(--index, 0) * 0.1s);
}

/* Gold Gradient Text Utility */
.text-gold-gradient {
    background: linear-gradient(135deg, #d4af37, #fbbf24, #d4af37);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Button Hover Effects */
button, a {
    -webkit-tap-highlight-color: transparent;
}

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

/* Input Autofill */
input:-webkit-autofill,
textarea:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 30px #1e293b inset !important;
    -webkit-text-fill-color: #f8fafc !important;
}

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

/* Tablet */
@media (max-width: 768px) {
    .reveal {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Large Desktop */
@media (min-width: 1024px) {
    .service-card:hover {
        transform: translateY(-4px);
    }
}
