/* Custom styles for Center For Rehab Medicine */

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #060e0b;
}
::-webkit-scrollbar-thumb {
    background: #1f4a1f;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #c9a84c;
}

/* Selection color */
::selection {
    background: rgba(201, 168, 76, 0.3);
    color: #faf8f4;
}

/* Base animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes shimmer {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}

/* Reveal animations (progressive enhancement - only applied via JS) */
.reveal {
    opacity: 1;
    transform: none;
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), 
                transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal[data-reveal="fade-up"] {
    opacity: 0;
    transform: translateY(30px);
}

.reveal[data-reveal="fade-left"] {
    opacity: 0;
    transform: translateX(-30px);
}

.reveal[data-reveal="fade-right"] {
    opacity: 0;
    transform: translateX(30px);
}

.reveal[data-reveal="scale"] {
    opacity: 0;
    transform: scale(0.95);
}

/* Active state for revealed elements */
.reveal.active {
    opacity: 1;
    transform: none;
}

/* Nav active state */
.nav-link.active {
    color: #c9a84c !important;
}

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

.mobile-menu.open .mobile-link {
    opacity: 1;
    transform: translateY(0);
}

.mobile-menu.open .mobile-link:nth-child(1) { transition-delay: 0.05s; }
.mobile-menu.open .mobile-link:nth-child(2) { transition-delay: 0.1s; }
.mobile-menu.open .mobile-link:nth-child(3) { transition-delay: 0.15s; }
.mobile-menu.open .mobile-link:nth-child(4) { transition-delay: 0.2s; }
.mobile-menu.open .mobile-link:nth-child(5) { transition-delay: 0.25s; }

/* Hamburger animation */
.menu-line {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#menu-btn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}
#menu-btn.active .menu-line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
#menu-btn.active .menu-line:nth-child(3) {
    width: 1.25rem;
    transform: rotate(-45deg) translate(4px, -4px);
}

/* Gold shimmer effect for special text */
.gold-shimmer {
    background: linear-gradient(90deg, #c9a84c 0%, #e8d5a3 50%, #c9a84c 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 3s linear infinite;
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    
    .reveal[data-reveal] {
        opacity: 1;
        transform: none;
        transition: none;
    }
    
    .mobile-link {
        opacity: 1;
        transform: none;
        transition: none;
    }
    
    .gold-shimmer {
        animation: none;
    }
    
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

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

/* Print styles */
@media print {
    nav, #menu-btn, .reveal[data-reveal] {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: #1a1a1a !important;
    }
}

/* Select styling for dropdown */
select option {
    background: #0d1f14;
    color: #faf8f4;
}
