/* ===================================
   AAPL Driving School - Custom Styles
   =================================== */

/* Base */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
}

/* Selection */
::selection {
    background: rgba(201, 168, 76, 0.2);
    color: #0a1628;
}

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

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

::-webkit-scrollbar-thumb {
    background: rgba(201, 168, 76, 0.4);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(201, 168, 76, 0.6);
}

/* ===================================
   Navigation
   =================================== */
#navbar {
    transition: background-color 0.5s ease, backdrop-filter 0.5s ease;
}

#navbar.scrolled {
    background: rgba(10, 22, 40, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05);
}

.nav-logo-text {
    transition: color 0.3s ease;
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: #c9a84c;
    transition: width 0.3s ease;
}

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

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

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

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

/* Menu Button Animation */
.menu-line-1 {
    transform-origin: center;
}

.menu-line-2 {
    transform-origin: center;
}

.menu-line-3 {
    transform-origin: center;
}

#menuBtn.active .menu-line-1 {
    transform: translateY(4px) rotate(45deg);
}

#menuBtn.active .menu-line-2 {
    opacity: 0;
}

#menuBtn.active .menu-line-3 {
    transform: translateY(-4px) rotate(-45deg);
    width: 24px;
}

/* ===================================
   Hero Section
   =================================== */
#hero {
    position: relative;
}

#hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg,
        rgba(10, 22, 40, 0.85) 0%,
        rgba(10, 22, 40, 0.6) 50%,
        rgba(10, 22, 40, 0.4) 100%
    );
    z-index: 1;
}

#hero > .relative {
    position: relative;
    z-index: 2;
}

/* ===================================
   Services Section
   =================================== */
.service-card {
    position: relative;
}

.service-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #c9a84c, #d4b95e);
    transition: width 0.5s ease;
}

.service-card:hover::after {
    width: 100%;
}

/* ===================================
   Course Cards
   =================================== */
.course-card {
    position: relative;
    transition: border-color 0.5s ease, box-shadow 0.5s ease;
}

.course-card:hover {
    box-shadow: 0 20px 60px rgba(10, 22, 40, 0.08);
}

/* ===================================
   Form Styles
   =================================== */
.form-input {
    display: block;
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(10, 22, 40, 0.2);
    padding: 12px 0;
    font-family: 'Inter', system-ui, sans-serif;
    font-weight: 300;
    font-size: 15px;
    color: #0a1628;
    outline: none;
    transition: border-color 0.3s ease;
}

.form-input::placeholder {
    color: rgba(10, 22, 40, 0.2);
    font-weight: 300;
}

.form-input:focus {
    border-bottom-color: #c9a84c;
}

.form-input:focus + .form-line {
    width: 100%;
}

/* Select styling */
select.form-input {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%230a1628' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0 center;
    padding-right: 24px;
    appearance: none;
    -webkit-appearance: none;
}

select.form-input option {
    background: #fff;
    color: #0a1628;
}

/* ===================================
   Back to Top Button
   =================================== */
#backToTop {
    transition: opacity 0.3s ease, transform 0.3s ease, background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

#backToTop.visible {
    opacity: 1;
    pointer-events: auto;
}

#backToTop:hover {
    transform: translateY(-2px);
}

/* ===================================
   Animations (progressive enhancement)
   =================================== */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.8s ease, transform 0.8s ease;
    }
    
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
    
    .reveal-delay-1 { transition-delay: 0.1s; }
    .reveal-delay-2 { transition-delay: 0.2s; }
    .reveal-delay-3 { transition-delay: 0.3s; }
    .reveal-delay-4 { transition-delay: 0.4s; }
}

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