/* ===================================
   60roads - Design System
   Mobile-First | Oldschool Modern
   =================================== */

/* --- CSS Variables --- */
:root {
    /* Colors - Oldschool Warm Palette */
    --color-primary: #D4A574;
    --color-primary-dark: #B8895A;
    --color-primary-light: #E8C9A8;

    --color-accent: #C75B3A;
    --color-accent-dark: #A34829;
    --color-accent-light: #E07A5C;

    --color-dark: #1A1A1A;
    --color-dark-lighter: #2D2D2D;
    --color-dark-card: #232323;

    --color-light: #F5F0EB;
    --color-light-muted: #E8E2DB;
    --color-white: #FFFFFF;

    --color-text: #F5F0EB;
    --color-text-muted: #A0998F;
    --color-text-dark: #1A1A1A;

    /* Typography */
    --font-display: 'Bebas Neue', sans-serif;
    --font-body: 'Inter', system-ui, sans-serif;

    --fs-xs: 0.75rem;
    --fs-sm: 0.875rem;
    --fs-base: 1rem;
    --fs-md: 1.125rem;
    --fs-lg: 1.25rem;
    --fs-xl: 1.5rem;
    --fs-2xl: 2rem;
    --fs-3xl: 2.5rem;
    --fs-4xl: 3rem;
    --fs-5xl: 4rem;
    --fs-6xl: 5rem;

    /* Spacing - Mobile First */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 2.5rem;
    --space-3xl: 3rem;
    --space-4xl: 4rem;

    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 20px;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 30px rgba(212, 165, 116, 0.3);

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 300ms ease;
    --transition-slow: 500ms ease;

    /* Container */
    --container-max: 1200px;
    --container-padding: 1rem;
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    /* Prevent text size adjustment on orientation change */
    -webkit-text-size-adjust: 100%;
    -moz-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
}

body {
    font-family: var(--font-body);
    font-size: var(--fs-base);
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-dark);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-fast);
}

ul,
ol {
    list-style: none;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

input,
textarea,
select {
    font-family: inherit;
    font-size: inherit;
    /* Prevent zoom on iOS */
    font-size: max(16px, 1rem);
}

/* Prevent double-tap zoom on iOS */
button,
a {
    touch-action: manipulation;
}

/* --- Utilities --- */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

/* Touch-Friendly Utilities */
@media (hover: none) and (pointer: coarse) {

    .btn,
    .nav__link,
    .hamburger {
        min-height: 44px;
        min-width: 44px;
    }

    .service-card:hover,
    .rally-card:hover,
    .gallery__item:hover .gallery__overlay {
        /* Disable hover effects on touch devices */
        transform: none;
        opacity: 0;
    }
}

/* Smooth Scrolling */
@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

.section-tag {
    display: inline-block;
    font-family: var(--font-display);
    font-size: var(--fs-sm);
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--color-primary);
    margin-bottom: var(--space-md);
    position: relative;
    padding-left: 40px;
}

.section-tag::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 30px;
    height: 1px;
    background: var(--color-primary);
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(1.75rem, 4vw, var(--fs-3xl));
    font-weight: 400;
    letter-spacing: 2px;
    line-height: 1.1;
    margin-bottom: var(--space-lg);
    color: var(--color-white);
}

.section-description {
    font-size: var(--fs-base);
    color: var(--color-text-muted);
    max-width: 600px;
}

.section-header {
    text-align: center;
    margin-bottom: var(--space-3xl);
}

.section-header .section-tag {
    padding-left: 0;
}

.section-header .section-tag::before {
    display: none;
}

.section-header .section-description {
    margin: 0 auto;
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: 0.875rem 1.5rem;
    font-family: var(--font-display);
    font-size: clamp(0.875rem, 2.5vw, var(--fs-md));
    letter-spacing: 1.5px;
    text-transform: uppercase;
    border-radius: var(--radius-sm);
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
    white-space: nowrap;
}

.btn--primary {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    color: var(--color-dark);
    box-shadow: var(--shadow-sm), 0 0 20px rgba(212, 165, 116, 0.2);
}

.btn--primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md), var(--shadow-glow);
}

.btn--outline {
    background: transparent;
    color: var(--color-white);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn--outline:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
    background: rgba(212, 165, 116, 0.1);
}

.btn--full {
    width: 100%;
}

.btn--accent {
    background: linear-gradient(135deg, var(--color-accent), var(--color-accent-dark));
    color: var(--color-white);
}

.btn--accent:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md), 0 0 30px rgba(199, 91, 58, 0.3);
}

/* --- Header --- */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: var(--space-md) 0;
    background: rgba(26, 26, 26, 0.9);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: all var(--transition-base);
}

.header--scrolled {
    padding: var(--space-sm) 0;
    background: rgba(26, 26, 26, 0.98);
}

.header__container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header__logo {
    display: flex;
    align-items: baseline;
    font-family: var(--font-display);
    font-size: var(--fs-2xl);
    letter-spacing: 2px;
}

.logo-text {
    color: var(--color-white);
}

.logo-accent {
    color: var(--color-primary);
}

/* Mobile Navigation */
.nav {
    position: fixed;
    inset: 0;
    right: -100%;
    width: 100%;
    max-width: 420px;
    margin-left: auto;
    height: 100vh;
    height: 100dvh;
    /* Dynamic viewport height for mobile browsers */
    background: linear-gradient(155deg, rgba(20, 22, 25, 0.96), rgba(16, 18, 22, 0.95));
    padding: calc(70px + var(--space-xl)) var(--space-xl) var(--space-2xl);
    transition: right var(--transition-base);
    z-index: 1001;
    box-shadow: var(--shadow-lg);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    border-left: 1px solid rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(12px);
}

.nav--open {
    right: 0;
}

.nav__list {
    display: flex;
    flex-direction: column;
    gap: var(--space-xl);
    align-items: flex-start;
}

.nav__link {
    font-family: var(--font-display);
    font-size: var(--fs-lg);
    letter-spacing: 1px;
    color: var(--color-white);
    transition: color var(--transition-fast);
    position: relative;
    line-height: 1.3;
}

.nav__link:hover,
.nav__link--active {
    color: var(--color-primary);
}

/* Hamburger */
.hamburger {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: var(--space-sm);
    z-index: 1002;
    position: relative;
    /* Essential for z-index */
    background: transparent;
    border: none;
    cursor: pointer;
}

.hamburger__line {
    width: 24px;
    height: 2px;
    background: var(--color-white);
    transition: all var(--transition-fast);
    transform-origin: center;
}

.hamburger--active .hamburger__line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.hamburger--active .hamburger__line:nth-child(2) {
    opacity: 0;
}

.hamburger--active .hamburger__line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Header Actions */
.header__actions {
    display: none;
}

.btn--sm {
    padding: var(--space-sm) var(--space-md);
    font-size: var(--fs-xs);
}

/* Nav Overlay */
.nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
    z-index: 999;
}

.nav-overlay--visible {
    opacity: 1;
    visibility: visible;
}

/* --- Hero Section --- */
.hero {
    min-height: 100vh;
    min-height: 100dvh;
    /* Dynamic viewport for mobile browsers */
    display: flex;
    align-items: center;
    position: relative;
    padding: calc(70px + var(--space-2xl)) var(--space-md) var(--space-2xl);
    background:
        linear-gradient(135deg, rgba(26, 26, 26, 0.85) 0%, rgba(45, 45, 45, 0.75) 100%),
        url('../images/hero_rally.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -30%;
    width: 80%;
    height: 150%;
    background: radial-gradient(ellipse, rgba(212, 165, 116, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.hero__container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 80vh;
}

.hero__content {
    max-width: 100%;
}

.hero__badge {
    display: inline-block;
    padding: var(--space-sm) var(--space-md);
    background: rgba(212, 165, 116, 0.1);
    border: 1px solid rgba(212, 165, 116, 0.3);
    border-radius: var(--radius-full);
    font-size: var(--fs-xs);
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--color-primary);
    margin-bottom: var(--space-lg);
    animation: fadeInUp 0.8s ease forwards;
}

.hero__title {
    font-family: var(--font-display);
    font-weight: 400;
    line-height: 0.95;
    margin-bottom: var(--space-lg);
}

.hero__title-line {
    display: block;
    font-size: clamp(2rem, 8vw, var(--fs-4xl));
    letter-spacing: 2px;
    animation: fadeInUp 0.8s ease forwards;
    animation-delay: 0.2s;
    opacity: 0;
}

.hero__title-accent {
    font-size: clamp(2.5rem, 10vw, var(--fs-5xl));
    color: var(--color-primary);
    animation-delay: 0.4s;
}

.hero__subtitle {
    font-size: clamp(0.9rem, 3vw, var(--fs-md));
    color: var(--color-text-muted);
    max-width: 500px;
    line-height: 1.6;
    margin-bottom: var(--space-xl);
    animation: fadeInUp 0.8s ease forwards;
    animation-delay: 0.6s;
    opacity: 0;
}

.hero__buttons {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    width: 100%;
    animation: fadeInUp 0.8s ease forwards;
    animation-delay: 0.8s;
    opacity: 0;
}

.hero__buttons .btn {
    width: 100%;
    max-width: 320px;
}

.hero__scroll {
    display: none;
}

/* --- About Section --- */
.about {
    padding: var(--space-4xl) 0;
    background: var(--color-dark);
}

.about__grid {
    display: flex;
    flex-direction: column;
    gap: var(--space-2xl);
}

.about__image-wrapper {
    position: relative;
}

.about__image {
    aspect-ratio: 4/3;
    background:
        linear-gradient(135deg, rgba(26, 26, 26, 0.3), rgba(45, 45, 45, 0.2)),
        url('../images/concept_escape.png');
    background-size: cover;
    background-position: center;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.about__image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary);
    opacity: 0.3;
}

.about__icon {
    width: 60%;
    height: 60%;
}

.about__badge {
    position: absolute;
    bottom: -20px;
    right: 20px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-md);
    text-align: center;
    box-shadow: var(--shadow-md);
}

.about__badge-number {
    display: block;
    font-family: var(--font-display);
    font-size: var(--fs-2xl);
    color: var(--color-dark);
}

.about__badge-text {
    font-size: var(--fs-xs);
    color: var(--color-dark);
    opacity: 0.8;
}

.about__content {
    padding-top: var(--space-xl);
}

.about__text {
    color: var(--color-text-muted);
    margin-bottom: var(--space-md);
}

.about__stats {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-lg);
    margin-top: var(--space-xl);
    padding-top: var(--space-xl);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.about__stat {
    text-align: center;
}

.about__stat-number {
    display: block;
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 5vw, var(--fs-2xl));
    color: var(--color-primary);
    margin-bottom: var(--space-xs);
}

.about__stat-label {
    font-size: var(--fs-xs);
    color: var(--color-text-muted);
}

/* --- Services Section --- */
.services {
    padding: var(--space-4xl) 0;
    background: var(--color-dark-lighter);
}

.services__grid {
    display: grid;
    gap: var(--space-lg);
}

.service-card {
    background: var(--color-dark-card);
    padding: var(--space-xl);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--transition-base);
}

.service-card:hover {
    transform: translateY(-5px);
    border-color: rgba(212, 165, 116, 0.2);
    box-shadow: var(--shadow-md);
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-card--featured {
    border-color: rgba(212, 165, 116, 0.3);
    background: linear-gradient(135deg, var(--color-dark-card), rgba(212, 165, 116, 0.05));
}

.service-card__badge {
    position: absolute;
    top: var(--space-md);
    right: var(--space-md);
    padding: var(--space-xs) var(--space-sm);
    background: var(--color-accent);
    color: var(--color-white);
    font-size: var(--fs-xs);
    font-weight: 600;
    border-radius: var(--radius-sm);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.service-card__icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(212, 165, 116, 0.1);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-lg);
    color: var(--color-primary);
}

.service-card__icon svg {
    width: 24px;
    height: 24px;
}

.service-card__title {
    font-family: var(--font-display);
    font-size: var(--fs-xl);
    font-weight: 400;
    letter-spacing: 1px;
    margin-bottom: var(--space-md);
    color: var(--color-white);
}

.service-card__text {
    font-size: var(--fs-sm);
    color: var(--color-text-muted);
    margin-bottom: var(--space-lg);
}

.service-card__link {
    font-size: var(--fs-sm);
    color: var(--color-primary);
    font-weight: 500;
    transition: all var(--transition-fast);
}

.service-card__link:hover {
    color: var(--color-primary-light);
    letter-spacing: 1px;
}

/* --- Rallies Section --- */
.rallies {
    padding: var(--space-4xl) 0;
    background: var(--color-dark);
}

.rallies__grid {
    display: grid;
    gap: var(--space-lg);
}

.rally-card {
    background: var(--color-dark-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all var(--transition-base);
}

.rally-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(212, 165, 116, 0.3);
}

.rally-card__image {
    aspect-ratio: 16/9;
    background:
        linear-gradient(135deg, rgba(26, 26, 26, 0.4), rgba(45, 45, 45, 0.3)),
        url('../images/event_rally.png');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.rally-card:nth-child(2) .rally-card__image {
    background-image:
        linear-gradient(135deg, rgba(26, 26, 26, 0.4), rgba(45, 45, 45, 0.3)),
        url('../images/gallery_landscape.png');
}

.rally-card:nth-child(3) .rally-card__image {
    background-image:
        linear-gradient(135deg, rgba(26, 26, 26, 0.4), rgba(45, 45, 45, 0.3)),
        url('../images/gallery_cars.png');
}

.rally-card__status {
    position: absolute;
    top: var(--space-md);
    left: var(--space-md);
    padding: var(--space-xs) var(--space-md);
    border-radius: var(--radius-full);
    font-size: var(--fs-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.rally-card__status--upcoming {
    background: rgba(212, 165, 116, 0.2);
    color: var(--color-primary);
    border: 1px solid var(--color-primary);
}

.rally-card__status--open {
    background: rgba(34, 197, 94, 0.2);
    color: #22C55E;
    border: 1px solid #22C55E;
}

.rally-card__status--full {
    background: rgba(239, 68, 68, 0.2);
    color: #EF4444;
    border: 1px solid #EF4444;
}

.rally-card__type {
    position: absolute;
    bottom: var(--space-md);
    left: var(--space-md);
    padding: var(--space-xs) var(--space-md);
    background: rgba(26, 26, 26, 0.9);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-sm);
    font-size: var(--fs-sm);
    color: var(--color-white);
}

.rally-card__content {
    padding: var(--space-lg);
}

.rally-card__date {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: var(--fs-sm);
    color: var(--color-primary);
    margin-bottom: var(--space-sm);
}

.rally-card__title {
    font-family: var(--font-display);
    font-size: var(--fs-xl);
    letter-spacing: 1px;
    color: var(--color-white);
    margin-bottom: var(--space-sm);
}

.rally-card__location {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: var(--fs-sm);
    color: var(--color-text-muted);
    margin-bottom: var(--space-md);
}

.rally-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md);
    padding-top: var(--space-md);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: var(--space-md);
}

.rally-card__meta-item {
    font-size: var(--fs-sm);
    color: var(--color-text-muted);
}

.rally-card__meta-item strong {
    color: var(--color-white);
}

.rally-card__cta {
    width: 100%;
}

/* --- Gallery Section --- */
.gallery {
    padding: var(--space-4xl) 0;
    background: var(--color-dark);
}

.gallery__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-md);
}

.gallery__item {
    position: relative;
    aspect-ratio: 4/3;
    background: var(--color-dark-lighter);
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
}

.gallery__placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--color-dark-lighter) 0%, var(--color-dark-card) 100%);
}

.gallery__label {
    font-family: var(--font-display);
    font-size: var(--fs-lg);
    color: var(--color-text-muted);
    letter-spacing: 2px;
}

.gallery__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(26, 26, 26, 0.95) 0%, transparent 60%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: var(--space-lg);
    opacity: 0;
    transition: opacity var(--transition-base);
}

.gallery__item:hover .gallery__overlay {
    opacity: 1;
}

.gallery__category {
    font-size: var(--fs-xs);
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--color-primary);
    margin-bottom: var(--space-xs);
}

.gallery__title {
    font-family: var(--font-display);
    font-size: var(--fs-xl);
    color: var(--color-white);
    margin-bottom: var(--space-xs);
}

.gallery__year {
    font-size: var(--fs-sm);
    color: var(--color-text-muted);
}

/* --- Testimonials Section --- */
.testimonials {
    padding: var(--space-4xl) 0;
    background: var(--color-dark-lighter);
}

.testimonials__slider {
    position: relative;
    overflow: hidden;
}

.testimonial-card {
    display: none;
    background: var(--color-dark-card);
    padding: var(--space-xl);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.testimonial-card--active {
    display: block;
    animation: fadeIn 0.5s ease;
}

.testimonial-card__stars {
    color: var(--color-primary);
    font-size: var(--fs-lg);
    margin-bottom: var(--space-lg);
    letter-spacing: 2px;
}

.testimonial-card__quote {
    font-size: var(--fs-md);
    font-style: italic;
    color: var(--color-text);
    line-height: 1.8;
    margin-bottom: var(--space-xl);
}

.testimonial-card__author {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.testimonial-card__avatar {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: var(--fs-md);
    color: var(--color-dark);
}

.testimonial-card__name {
    display: block;
    font-weight: 600;
    color: var(--color-white);
}

.testimonial-card__role {
    font-size: var(--fs-sm);
    color: var(--color-text-muted);
}

.testimonials__dots {
    display: flex;
    justify-content: center;
    gap: var(--space-sm);
    margin-top: var(--space-xl);
}

.testimonials__dot {
    width: 10px;
    height: 10px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.2);
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.testimonials__dot--active {
    background: var(--color-primary);
    width: 30px;
}

/* --- Contact Section --- */
.contact {
    padding: var(--space-4xl) 0;
    background: var(--color-dark);
}

.contact__grid {
    display: flex;
    flex-direction: column;
    gap: var(--space-2xl);
}

.contact__text {
    color: var(--color-text-muted);
    margin-bottom: var(--space-xl);
}

.contact__details {
    display: flex;
    flex-direction: column;
    gap: var(--space-xl);
}

.contact__detail {
    display: flex;
    gap: var(--space-md);
}

.contact__detail-icon {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(212, 165, 116, 0.1);
    border-radius: var(--radius-md);
    color: var(--color-primary);
}

.contact__detail-icon svg {
    width: 20px;
    height: 20px;
}

.contact__detail strong {
    display: block;
    color: var(--color-white);
    margin-bottom: var(--space-xs);
}

.contact__detail p {
    font-size: var(--fs-sm);
    color: var(--color-text-muted);
}

/* Form Styles */
.contact__form {
    background: var(--color-dark-card);
    padding: var(--space-xl);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.form-group {
    margin-bottom: var(--space-lg);
}

.form-label {
    display: block;
    font-size: var(--fs-sm);
    font-weight: 500;
    color: var(--color-white);
    margin-bottom: var(--space-sm);
}

.form-input {
    width: 100%;
    padding: var(--space-md);
    background: var(--color-dark);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    color: var(--color-text);
    transition: all var(--transition-fast);
}

.form-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(212, 165, 116, 0.1);
}

.form-input::placeholder {
    color: var(--color-text-muted);
}

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23A0998F'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 40px;
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
}

/* --- Auth Modal Styles --- */
.auth-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: var(--space-md);
    overflow-y: auto;
}

.auth-modal--open {
    display: flex;
}

.auth-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
}

.auth-modal__content {
    position: relative;
    width: 100%;
    max-width: 420px;
    max-height: 90vh;
    max-height: 90dvh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: var(--color-dark-card);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: var(--space-lg);
    animation: fadeInUp 0.3s ease;
    margin: auto;
}

.auth-modal__close {
    position: absolute;
    top: var(--space-md);
    right: var(--space-md);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-full);
    color: var(--color-text-muted);
    transition: all var(--transition-fast);
}

.auth-modal__close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--color-white);
}

.auth-modal__header {
    text-align: center;
    margin-bottom: var(--space-xl);
}

.auth-modal__title {
    font-family: var(--font-display);
    font-size: var(--fs-2xl);
    letter-spacing: 2px;
    color: var(--color-white);
    margin-bottom: var(--space-sm);
}

.auth-modal__subtitle {
    font-size: var(--fs-sm);
    color: var(--color-text-muted);
}

.auth-tabs {
    display: flex;
    gap: var(--space-sm);
    margin-bottom: var(--space-xl);
    background: var(--color-dark);
    padding: var(--space-xs);
    border-radius: var(--radius-md);
}

.auth-tab {
    flex: 1;
    padding: var(--space-sm) var(--space-md);
    font-family: var(--font-display);
    font-size: var(--fs-sm);
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--color-text-muted);
    background: transparent;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.auth-tab--active {
    background: var(--color-primary);
    color: var(--color-dark);
}

.auth-form {
    display: none;
}

.auth-form--active {
    display: block;
}

.auth-footer {
    margin-top: var(--space-lg);
    text-align: center;
    font-size: var(--fs-sm);
    color: var(--color-text-muted);
}

.auth-footer a {
    color: var(--color-primary);
    font-weight: 500;
}

/* Auth Form Sections (for vehicle info) */
.auth-form__section {
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-md);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.auth-form__section:last-of-type {
    border-bottom: none;
}

.auth-form__section-title {
    display: block;
    font-family: var(--font-display);
    font-size: var(--fs-sm);
    letter-spacing: 1px;
    color: var(--color-primary);
    margin-bottom: var(--space-md);
}

/* Form Row (1 column mobile, 2 columns desktop) */
.form-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-md);
}

@media (min-width: 768px) {
    .form-row {
        grid-template-columns: 1fr 1fr;
    }
}

/* Auth Error Message */
.auth-error {
    padding: var(--space-sm) var(--space-md);
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: var(--radius-md);
    color: #EF4444;
    font-size: var(--fs-sm);
    text-align: center;
    margin-bottom: var(--space-md);
    display: none;
}

.auth-error:not(:empty) {
    display: block;
}

/* Larger modal for register form */
@media (min-width: 640px) {
    .auth-modal__content {
        padding: var(--space-xl);
    }
}

@media (min-width: 768px) {
    .auth-modal__content {
        max-width: 500px;
    }
}

/* --- Footer --- */
.footer {
    padding: var(--space-4xl) 0 var(--space-xl);
    background: var(--color-dark-lighter);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer__grid {
    display: grid;
    gap: var(--space-2xl);
}

.footer__tagline {
    font-size: var(--fs-sm);
    color: var(--color-text-muted);
    margin-top: var(--space-md);
    margin-bottom: var(--space-lg);
}

.footer__social {
    display: flex;
    gap: var(--space-md);
}

.footer__social-link {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-full);
    color: var(--color-text-muted);
    transition: all var(--transition-fast);
}

.footer__social-link:hover {
    background: var(--color-primary);
    color: var(--color-dark);
}

.footer__social-link svg {
    width: 18px;
    height: 18px;
}

.footer__title {
    font-family: var(--font-display);
    font-size: var(--fs-md);
    letter-spacing: 2px;
    color: var(--color-white);
    margin-bottom: var(--space-lg);
}

.footer__list {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.footer__list a {
    font-size: var(--fs-sm);
    color: var(--color-text-muted);
    transition: color var(--transition-fast);
}

.footer__list a:hover {
    color: var(--color-primary);
}

.footer__newsletter p {
    font-size: var(--fs-sm);
    color: var(--color-text-muted);
    margin-bottom: var(--space-md);
}

.footer__form {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.footer__input {
    flex: 1;
    padding: var(--space-sm) var(--space-md);
    background: var(--color-dark);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    color: var(--color-text);
    font-size: var(--fs-sm);
}

.footer__input:focus {
    outline: none;
    border-color: var(--color-primary);
}

.footer__bottom {
    margin-top: var(--space-2xl);
    padding-top: var(--space-xl);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    text-align: center;
}

.footer__bottom p {
    font-size: var(--fs-sm);
    color: var(--color-text-muted);
}

.footer__legal {
    display: flex;
    justify-content: center;
    gap: var(--space-lg);
}

.footer__legal a {
    font-size: var(--fs-sm);
    color: var(--color-text-muted);
    transition: color var(--transition-fast);
}

.footer__legal a:hover {
    color: var(--color-primary);
}

/* --- Animations --- */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
}

/* --- Media Queries (Desktop) --- */

/* Tablet Breakpoint - 640px */
@media (min-width: 640px) {
    .hero__buttons {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .hero__buttons .btn {
        width: auto;
    }

    .about__stats {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--space-md);
    }

    .about__stat {
        text-align: center;
    }

    .footer__form {
        flex-direction: row;
    }

    .footer__legal {
        gap: var(--space-xl);
    }
}

@media (min-width: 768px) {
    :root {
        --container-padding: 2rem;
        --space-2xl: 3rem;
        --space-3xl: 4rem;
        --space-4xl: 6rem;
    }

    .section-title {
        font-size: clamp(2.5rem, 5vw, var(--fs-4xl));
    }

    /* Header Desktop */
    .hamburger {
        display: none;
    }

    .header__actions {
        display: flex;
        align-items: center;
        gap: var(--space-md);
    }

    .nav {
        position: static;
        width: auto;
        height: auto;
        background: transparent;
        padding: 0;
        box-shadow: none;
        flex-grow: 1;
        display: flex;
        justify-content: center;
    }

    .nav__list {
        flex-direction: row;
        gap: var(--space-lg);
        align-items: center;
    }

    .nav__link {
        font-size: var(--fs-sm);
        white-space: nowrap;
    }

    /* Hide the Connexion link in nav on desktop (shown in header__actions) */
    .nav__item:last-child {
        display: none;
    }

    .nav__link::after {
        content: '';
        position: absolute;
        bottom: -5px;
        left: 0;
        width: 0;
        height: 2px;
        background: var(--color-primary);
        transition: width var(--transition-fast);
    }

    .nav__link:hover::after {
        width: 100%;
    }

    /* Hero Desktop */
    .hero {
        padding: calc(80px + var(--space-4xl)) 0 var(--space-4xl);
    }

    .hero__title-line {
        font-size: clamp(3rem, 6vw, var(--fs-5xl));
    }

    .hero__title-accent {
        font-size: clamp(4rem, 8vw, var(--fs-6xl));
    }

    .hero__subtitle {
        font-size: var(--fs-md);
        max-width: 600px;
    }

    .hero__buttons {
        flex-direction: row;
    }

    .hero__buttons .btn {
        width: auto;
    }

    .hero__scroll {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: var(--space-sm);
        position: absolute;
        bottom: var(--space-2xl);
        left: 50%;
        transform: translateX(-50%);
        font-size: var(--fs-xs);
        letter-spacing: 2px;
        text-transform: uppercase;
        color: var(--color-text-muted);
    }

    .hero__scroll-line {
        width: 1px;
        height: 60px;
        background: linear-gradient(to bottom, var(--color-primary), transparent);
        animation: scrollLine 2s ease infinite;
    }

    @keyframes scrollLine {

        0%,
        100% {
            transform: scaleY(1);
            opacity: 1;
        }

        50% {
            transform: scaleY(0.5);
            opacity: 0.5;
        }
    }

    /* About Desktop */
    .about__grid {
        grid-template-columns: 1fr 1fr;
        gap: var(--space-4xl);
        align-items: center;
    }

    .about__badge {
        bottom: -30px;
        right: -20px;
    }

    /* Services Desktop */
    .services__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Rallies Desktop */
    .rallies__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Gallery Desktop */
    .gallery__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-lg);
    }

    .gallery__item {
        aspect-ratio: 3/2;
    }

    /* Contact Desktop */
    .contact__grid {
        grid-template-columns: 1fr 1fr;
        gap: var(--space-4xl);
    }

    /* Footer Desktop */
    .footer__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-2xl);
    }

    .footer__bottom {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }
}

@media (min-width: 1024px) {
    .section-title {
        font-size: var(--fs-5xl);
    }

    .hero__title-line {
        font-size: var(--fs-5xl);
    }

    .hero__title-accent {
        font-size: var(--fs-6xl);
    }

    .services__grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .rallies__grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .gallery__grid {
        grid-template-columns: repeat(3, 1fr);
        grid-template-rows: repeat(2, 250px);
    }

    .gallery__item--large {
        grid-column: span 2;
        grid-row: span 2;
    }

    .gallery__item--wide {
        grid-column: span 2;
    }

    .footer__grid {
        grid-template-columns: 2fr 1fr 1fr 1.5fr;
    }
}

/* Extra Large Screens */
@media (min-width: 1280px) {
    :root {
        --container-max: 1280px;
    }
}

/* Utility Classes for Responsive Design */
.hide-on-mobile {
    display: none;
}

.show-on-mobile {
    display: block;
}

@media (min-width: 768px) {
    .hide-on-mobile {
        display: block;
    }

    .show-on-mobile {
        display: none;
    }

    .hide-on-desktop {
        display: none;
    }

    .show-on-desktop {
        display: block;
    }
}

/* Responsive Text Alignment */
.text-center-mobile {
    text-align: center;
}

@media (min-width: 768px) {
    .text-center-mobile {
        text-align: left;
    }
}

/* Print Styles */
@media print {

    .header,
    .footer,
    .hero__scroll,
    .auth-modal,
    .hamburger,
    .nav-overlay {
        display: none !important;
    }

    body {
        background: white;
        color: black;
    }
}