/* ===== Custom Styles for California Career School ===== */

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

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #060E09;
}
::-webkit-scrollbar-thumb {
    background: #1C3A28;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #D4AF37;
}

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

/* ===== Navigation ===== */
.nav-link {
    position: relative;
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: #D4AF37;
    transition: width 0.3s ease;
}
.nav-link:hover::after {
    width: 100%;
}

/* Navbar scroll state */
.navbar-scrolled {
    background: rgba(6, 14, 9, 0.95) !important;
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(212, 175, 55, 0.1);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* ===== Mobile Menu ===== */
.mobile-link {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s ease;
}
.mobile-menu-open .mobile-link {
    opacity: 1;
    transform: translateY(0);
}
.mobile-menu-open .mobile-link:nth-child(1) { transition-delay: 0.1s; }
.mobile-menu-open .mobile-link:nth-child(2) { transition-delay: 0.15s; }
.mobile-menu-open .mobile-link:nth-child(3) { transition-delay: 0.2s; }
.mobile-menu-open .mobile-link:nth-child(4) { transition-delay: 0.25s; }
.mobile-menu-open .mobile-link:nth-child(5) { transition-delay: 0.3s; }

/* Mobile menu toggle animation */
.menu-active #bar1 {
    transform: rotate(45deg) translate(4px, 4px);
}
.menu-active #bar2 {
    opacity: 0;
}
.menu-active #bar3 {
    transform: rotate(-45deg) translate(4px, -4px);
    width: 1.5rem;
}

/* ===== Program Cards ===== */
.program-card {
    transform: translateY(0);
    transition: transform 0.5s ease, border-color 0.5s ease, box-shadow 0.5s ease;
}
.program-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4), 0 0 40px rgba(212, 175, 55, 0.05);
}

/* ===== Testimonial Cards ===== */
.testimonial-card {
    transition: transform 0.5s ease, border-color 0.5s ease, box-shadow 0.5s ease;
}
.testimonial-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.3);
}

/* ===== Scroll Reveal Animations ===== */
/* These are progressive enhancement — content is visible by default, JS adds the animation class */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: opacity 0.8s ease, transform 0.8s ease;
    }
    .reveal.revealed {
        opacity: 0;
        transform: translateY(40px);
    }
    .reveal-left {
        opacity: 1;
        transform: none;
        transition: opacity 0.8s ease, transform 0.8s ease;
    }
    .reveal-left.revealed {
        opacity: 0;
        transform: translateX(-40px);
    }
    .reveal-right {
        opacity: 1;
        transform: none;
        transition: opacity 0.8s ease, transform 0.8s ease;
    }
    .reveal-right.revealed {
        opacity: 0;
        transform: translateX(40px);
    }
}

/* ===== Gold shimmer effect on hover for CTA buttons ===== */
button[type="submit"]:hover,
a[href="#programs"]:hover,
a[href="#contact"]:hover {
    box-shadow: 0 0 30px rgba(212, 175, 55, 0.2);
}

/* ===== Input Focus States ===== */
input:focus,
textarea:focus,
select:focus {
    outline: none;
}

/* ===== Back to Top ===== */
#back-to-top {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
}
#back-to-top.visible {
    opacity: 1;
    pointer-events: all;
}
#back-to-top:hover {
    transform: translateY(-2px);
}

/* ===== Responsive Adjustments ===== */
@media (max-width: 768px) {
    .font-display {
        line-height: 1.15;
    }
}

/* ===== Prefers 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;
    }
}
