/* ============================================
   Driving School of the Southwest
   Custom Styles
   ============================================ */

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   Geometric Background Shapes
   ============================================ */
.geo-shape {
    position: absolute;
    pointer-events: none;
    opacity: 0.04;
}

.geo-circle-1 {
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: #0d9488;
    top: -200px;
    right: -150px;
}

.geo-circle-2 {
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: #f97316;
    bottom: 10%;
    left: -100px;
}

.geo-triangle {
    width: 0;
    height: 0;
    border-left: 150px solid transparent;
    border-right: 150px solid transparent;
    border-bottom: 260px solid #0d9488;
    top: 40%;
    right: 5%;
    opacity: 0.03;
}

.geo-square {
    width: 200px;
    height: 200px;
    background: #f97316;
    top: 60%;
    left: 8%;
    transform: rotate(45deg);
    border-radius: 20px;
    opacity: 0.03;
}

.geo-dots {
    width: 120px;
    height: 120px;
    background-image: radial-gradient(circle, #0d9488 2px, transparent 2px);
    background-size: 16px 16px;
    top: 30%;
    left: 3%;
    opacity: 0.1;
}

/* ============================================
   Navigation
   ============================================ */
.nav-fixed {
    background: rgba(248, 250, 252, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.nav-fixed.scrolled {
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.08);
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: #0d9488;
    transition: all 0.2s ease;
    transform: translateX(-50%);
}

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

/* Mobile menu */
#mobile-menu.open {
    transform: translateX(0);
}

#mobile-menu.closed {
    transform: translateX(100%);
}

/* Hamburger animation */
#menu-toggle[aria-expanded="true"] #bar1 {
    transform: translateY(4px) rotate(45deg);
}

#menu-toggle[aria-expanded="true"] #bar2 {
    opacity: 0;
    transform: scaleX(0);
}

#menu-toggle[aria-expanded="true"] #bar3 {
    transform: translateY(-4px) rotate(-45deg);
    width: 100%;
}

.mobile-nav-link {
    display: block;
}

/* ============================================
   Floating Cards
   ============================================ */
.floating-card {
    animation: float 3s ease-in-out infinite;
}

.floating-card.card-teal {
    animation-delay: 0s;
}

.floating-card.card-orange {
    animation-delay: 1s;
}

.floating-card.card-slate {
    animation-delay: 2s;
}

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

/* ============================================
   Service Cards
   ============================================ */
.service-card {
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #0d9488, #5eead4);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-card:hover {
    transform: translateY(-4px);
}

/* ============================================
   Process Cards
   ============================================ */
.process-card {
    position: relative;
}

.process-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 1.5rem;
    padding: 1px;
    background: linear-gradient(135deg, transparent, rgba(255,255,255,0.1));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.process-card:hover::after {
    opacity: 1;
}

/* ============================================
   Testimonial Cards
   ============================================ */
.testimonial-card {
    position: relative;
}

.testimonial-card::before {
    content: '"';
    position: absolute;
    top: 16px;
    right: 24px;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 6rem;
    font-weight: 700;
    color: #f1f5f9;
    line-height: 1;
    pointer-events: none;
}

.testimonial-card:hover {
    transform: translateY(-2px);
}

/* ============================================
   FAQ
   ============================================ */
.faq-toggle {
    cursor: pointer;
}

.faq-toggle:hover .faq-icon {
    background: #0d9488;
}

.faq-toggle:hover .faq-icon svg {
    stroke: white;
}

.faq-icon svg {
    transition: transform 0.3s ease;
}

.faq-item.active .faq-icon {
    background: #0d9488;
}

.faq-item.active .faq-icon svg {
    stroke: white;
    transform: rotate(45deg);
}

.faq-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-item.active .faq-content {
    max-height: 300px;
}

/* ============================================
   Scroll Reveal Animations
   (Progressive enhancement — content visible without JS)
   ============================================ */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: opacity 0.6s ease, transform 0.6s ease;
    }
    
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   Form Styles
   ============================================ */
input:focus,
select:focus,
textarea:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.15);
}

/* ============================================
   Responsive Adjustments
   ============================================ */
@media (max-width: 640px) {
    .floating-card {
        position: relative;
        top: auto;
        left: auto;
        right: auto;
        bottom: auto;
        display: inline-block;
        margin: 0.5rem;
        animation: none;
    }
    
    .hero-cards-stack {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        margin-top: 1rem;
    }
}

@media (min-width: 641px) and (max-width: 1023px) {
    .floating-card {
        position: relative;
        top: auto;
        left: auto;
        right: auto;
        bottom: auto;
        display: inline-block;
        margin: 0.5rem;
    }
}
