/* ===== Custom Styles for Trd Economy Driving School ===== */

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

body {
    overflow-x: hidden;
}

/* Selection color */
::selection {
    background-color: rgba(212, 154, 42, 0.3);
    color: #f0f3f9;
}

/* ===== Navbar ===== */
#navbar {
    background: transparent;
    transition: background-color 0.5s ease, box-shadow 0.5s ease, backdrop-filter 0.5s ease;
}

#navbar.scrolled {
    background: rgba(7, 12, 23, 0.92);
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(141, 159, 207, 0.08);
}

/* ===== Mobile Menu ===== */
.mobile-link {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease, color 0.3s ease;
}

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

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

/* Menu button animation */
.menu-line {
    transition: transform 0.3s ease, opacity 0.3s ease;
}

#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) {
    transform: rotate(-45deg) translate(4px, -4px);
    width: 1.25rem;
}

/* ===== Hero ===== */
#hero {
    min-height: 100vh;
}

/* ===== 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, rgba(212, 154, 42, 0.5), 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 cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .reveal,
    .reveal.revealed {
        opacity: 1;
        transform: none;
        transition: none;
    }

    html {
        scroll-behavior: auto;
    }

    .service-card,
    a,
    button {
        transition: none;
    }
}

/* ===== Gold accent line animation ===== */
@keyframes shimmer {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}

.gold-shimmer {
    background: linear-gradient(90deg, #d49a2a, #edc96a, #d49a2a);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 4s linear infinite;
}

/* ===== Button hover glow ===== */
.glow-gold:hover {
    box-shadow: 0 0 40px rgba(212, 154, 42, 0.3);
}

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

::-webkit-scrollbar-track {
    background: #0d1629;
}

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

::-webkit-scrollbar-thumb:hover {
    background: #334c8c;
}

/* ===== Focus styles ===== */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid rgba(212, 154, 42, 0.6);
    outline-offset: 2px;
}

/* ===== Responsive adjustments ===== */
@media (max-width: 767px) {
    .font-serif {
        font-size: clamp(1.75rem, 8vw, 2.5rem);
    }

    #hero h1 {
        font-size: clamp(2rem, 7vw, 3.5rem);
    }

    #hero h1 span.block {
        font-size: clamp(1.25rem, 5vw, 1.75rem);
    }
}
