/* ===== Custom Styles for All Star Driver Education ===== */

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

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===== Navbar ===== */
.nav {
    background: rgba(253, 252, 248, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(10, 35, 66, 0.06);
}

.nav.scrolled {
    background: rgba(253, 252, 248, 0.95);
    box-shadow: 0 1px 20px rgba(10, 35, 66, 0.06);
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #7ED4B5;
    transition: width 0.3s ease;
    border-radius: 1px;
}

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

/* Hamburger */
.hamburger-line {
    display: block;
}

#menuToggle.active .hamburger-line:nth-child(1) {
    transform: translateY(5.5px) rotate(45deg);
}

#menuToggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

#menuToggle.active .hamburger-line:nth-child(3) {
    transform: translateY(-5.5px) rotate(-45deg);
    width: 1.25rem;
}

/* ===== Buttons ===== */
.btn-primary {
    display: inline-flex;
    align-items: center;
    background: #0A2342;
    color: #ffffff;
    padding: 0.875rem 1.75rem;
    border-radius: 14px;
    font-weight: 600;
    font-size: 0.9375rem;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(10, 35, 66, 0.2);
}

.btn-primary:hover {
    background: #1A3F6B;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(10, 35, 66, 0.25);
    color: #ffffff;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    background: transparent;
    color: #0A2342;
    padding: 0.875rem 1.75rem;
    border-radius: 14px;
    font-weight: 600;
    font-size: 0.9375rem;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid rgba(10, 35, 66, 0.15);
    cursor: pointer;
}

.btn-secondary:hover {
    border-color: #0A2342;
    background: rgba(10, 35, 66, 0.04);
    transform: translateY(-2px);
    color: #0A2342;
}

/* ===== Hero ===== */
.hero {
    background: linear-gradient(135deg, #FDFCF8 0%, #F0FAF6 50%, #E8EDF4 100%);
    position: relative;
}

.hero-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
}

.hero-blob-1 {
    width: 500px;
    height: 500px;
    background: rgba(126, 212, 181, 0.15);
    top: -100px;
    right: -100px;
    animation: float-slow 8s ease-in-out infinite;
}

.hero-blob-2 {
    width: 350px;
    height: 350px;
    background: rgba(10, 35, 66, 0.06);
    bottom: -50px;
    left: -50px;
    animation: float-slow 10s ease-in-out infinite reverse;
}

.hero-blob-3 {
    width: 200px;
    height: 200px;
    background: rgba(126, 212, 181, 0.12);
    top: 40%;
    left: 45%;
    animation: float-slow 6s ease-in-out infinite;
}

@keyframes float-slow {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(20px, -20px) scale(1.02); }
    66% { transform: translate(-15px, 15px) scale(0.98); }
}

.floating-card {
    animation: float 4s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

/* Scroll line animation */
.animate-scroll-line {
    animation: scrollLine 2s ease-in-out infinite;
}

@keyframes scrollLine {
    0% { opacity: 0; transform: scaleY(0); transform-origin: top; }
    50% { opacity: 1; transform: scaleY(1); transform-origin: top; }
    51% { transform-origin: bottom; }
    100% { opacity: 0; transform: scaleY(0); transform-origin: bottom; }
}

/* ===== Service Cards ===== */
.service-card {
    perspective: 1000px;
}

/* ===== Scroll Reveal ===== */
.reveal-section {
    opacity: 1;
    transform: none;
    transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1), transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

/* When JS is available, hide elements before they scroll into view */
.js .reveal-section {
    opacity: 0;
    transform: translateY(30px);
}

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

.js .reveal-section:nth-child(2) { transition-delay: 0.1s; }
.js .reveal-section:nth-child(3) { transition-delay: 0.2s; }
.js .reveal-section:nth-child(4) { transition-delay: 0.3s; }

/* ===== Mobile Menu ===== */
.mobile-menu {
    animation: slideDown 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.mobile-link {
    display: block;
}

/* ===== Responsive ===== */
@media (max-width: 767px) {
    .hero {
        padding-top: 80px;
    }
}

/* ===== Reduced Motion ===== */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .reveal-section { transition: none; opacity: 1; transform: none; }
    .hero-blob { animation: none; }
    .floating-card { animation: none; }
    .animate-scroll-line { animation: none; }
}
