/* ═══════════════════════════════════════════════════
   BIMMER | QAZAQSTAN — Custom Design System
   Replaces Tailwind CDN + Font Awesome CDN
   ═══════════════════════════════════════════════════ */

/* ── 0. CSS Reset ── */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

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

img,
svg,
video {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
    text-decoration: none;
}

ul,
ol {
    list-style: none;
}

button {
    cursor: pointer;
    background: none;
    border: none;
    font: inherit;
    color: inherit;
}

input,
textarea,
select {
    font: inherit;
    color: inherit;
}

/* ── 1. Custom Properties ── */
:root {
    --brand-primary: #E7222E;
    --brand-secondary: #16588E;
    --brand-tertiary: #81C4FF;
    --white: #FFFFFF;
    --black: #333333;
}

/* ── 2. Base Styles ── */
body {
    font-family: 'Montserrat', sans-serif;
    font-weight: 300;
    background-color: var(--black);
    color: var(--white);
    overflow-x: hidden;
    line-height: 1.5;
}

.font-russo-one {
    font-family: 'Russo One', sans-serif;
}

.font-montserrat {
    font-family: 'Montserrat', sans-serif;
}

/* ── 3. Typography ── */
.text-xs {
    font-size: 0.75rem;
    line-height: 1rem;
}

.text-sm {
    font-size: 0.875rem;
    line-height: 1.25rem;
}

.text-lg {
    font-size: 1.125rem;
    line-height: 1.75rem;
}

.text-xl {
    font-size: 1.25rem;
    line-height: 1.75rem;
}

.text-2xl {
    font-size: 1.5rem;
    line-height: 2rem;
}

.text-3xl {
    font-size: 1.875rem;
    line-height: 2.25rem;
}

.text-4xl {
    font-size: 2.25rem;
    line-height: 2.5rem;
}

.text-5xl {
    font-size: 3rem;
    line-height: 1.1;
}

.text-6xl {
    font-size: 3.75rem;
    line-height: 1;
}

.font-light {
    font-weight: 300;
}

.font-bold {
    font-weight: 700;
}

.font-black {
    font-weight: 900;
}

.italic {
    font-style: italic;
}

.uppercase {
    text-transform: uppercase;
}

.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.tracking-widest {
    letter-spacing: 0.1em;
}

.tracking-tighter {
    letter-spacing: -0.05em;
}

.leading-relaxed {
    line-height: 1.625;
}

.leading-tight {
    line-height: 1.25;
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ── 4. Colors ── */
.text-white {
    color: #fff;
}

.text-black {
    color: #000;
}

.text-brand-primary {
    color: var(--brand-primary);
}

.text-brand-tertiary {
    color: var(--brand-tertiary);
}

.text-green-400 {
    color: #4ade80;
}

/* White with alpha */
.text-white\/20 {
    color: rgba(255, 255, 255, 0.2);
}

.text-white\/40 {
    color: rgba(255, 255, 255, 0.4);
}

.text-white\/50 {
    color: rgba(255, 255, 255, 0.5);
}

.text-white\/60 {
    color: rgba(255, 255, 255, 0.6);
}

.text-white\/70 {
    color: rgba(255, 255, 255, 0.7);
}

.text-white\/80 {
    color: rgba(255, 255, 255, 0.8);
}

.text-white\/90 {
    color: rgba(255, 255, 255, 0.9);
}

/* Backgrounds */
.bg-black {
    background-color: #000;
}

.bg-white {
    background-color: #fff;
}

.bg-brand-primary {
    background-color: var(--brand-primary);
}

.bg-white\/5 {
    background-color: rgba(255, 255, 255, 0.05);
}

.bg-white\/02 {
    background-color: rgba(255, 255, 255, 0.02);
}

.bg-black\/60 {
    background-color: rgba(0, 0, 0, 0.6);
}

.bg-brand-primary\/10 {
    background-color: rgba(231, 34, 46, 0.1);
}

.bg-brand-primary\/20 {
    background-color: rgba(231, 34, 46, 0.2);
}

.bg-green-500\/10 {
    background-color: rgba(34, 197, 94, 0.1);
}

.bg-transparent {
    background-color: transparent;
}

/* Gradients */
.bg-gradient-to-b {
    background-image: linear-gradient(to bottom, var(--tw-gradient-stops, #000, rgba(0, 0, 0, 0.8), #000));
}

.bg-gradient-to-r {
    background-image: linear-gradient(to right, var(--tw-gradient-stops));
}

.from-black {
    --tw-gradient-from: #000;
    --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, transparent);
}

.via-black\/80 {
    --tw-gradient-stops: var(--tw-gradient-from), rgba(0, 0, 0, 0.8), var(--tw-gradient-to, transparent);
}

.from-brand-primary {
    --tw-gradient-from: var(--brand-primary);
}

.from-brand-primary\/20 {
    --tw-gradient-from: rgba(231, 34, 46, 0.2);
}

.via-brand-secondary {
    --tw-gradient-via: var(--brand-secondary);
}

.to-brand-tertiary {
    --tw-gradient-to: var(--brand-tertiary);
}

.to-brand-secondary\/20 {
    --tw-gradient-to: rgba(22, 88, 142, 0.2);
}

.to-black {
    --tw-gradient-to: #000;
}

/* Hero bg gradient (used directly) */
.gradient-hero-overlay {
    background: linear-gradient(to bottom, #000, rgba(0, 0, 0, 0.8), #000);
}

/* M-stripe gradient helper */
.gradient-m-stripe {
    background: linear-gradient(to right, var(--brand-primary), var(--brand-secondary), var(--brand-tertiary));
}

/* ── 5. Layout ── */
.block {
    display: block;
}

.inline-block {
    display: inline-block;
}

.flex {
    display: flex;
}

.inline-flex {
    display: inline-flex;
}

.grid {
    display: grid;
}

.hidden {
    display: none;
}

.flex-col {
    flex-direction: column;
}

.flex-grow {
    flex-grow: 1;
}

.flex-1 {
    flex: 1 1 0%;
}

.flex-row {
    flex-direction: row;
}

.flex-nowrap {
    flex-wrap: nowrap;
}

.flex-wrap {
    flex-wrap: wrap;
}

.flex-shrink-0 {
    flex-shrink: 0;
}

.items-center {
    align-items: center;
}

.items-start {
    align-items: start;
}

.justify-center {
    justify-content: center;
}

.justify-between {
    justify-content: space-between;
}

.gap-2 {
    gap: 0.5rem;
}

.gap-3 {
    gap: 0.75rem;
}

.gap-4 {
    gap: 1rem;
}

.gap-6 {
    gap: 1.5rem;
}

.gap-8 {
    gap: 2rem;
}

.gap-12 {
    gap: 3rem;
}

.grid-cols-1 {
    grid-template-columns: repeat(1, minmax(0, 1fr));
}

/* ── 6. Spacing ── */
.p-1 {
    padding: 0.25rem;
}

.p-2 {
    padding: 0.5rem;
}

.p-4 {
    padding: 1rem;
}

.p-6 {
    padding: 1.5rem;
}

.p-8 {
    padding: 2rem;
}

.p-12 {
    padding: 3rem;
}

.px-2 {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

.px-3 {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
}

.px-4 {
    padding-left: 1rem;
    padding-right: 1rem;
}

.px-5 {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
}

.px-6 {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.py-1 {
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
}

.py-2 {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.py-3 {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

.py-4 {
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.py-16 {
    padding-top: 4rem;
    padding-bottom: 4rem;
}

.py-20 {
    padding-top: 5rem;
    padding-bottom: 5rem;
}

.py-32 {
    padding-top: 8rem;
    padding-bottom: 8rem;
}

.pt-8 {
    padding-top: 2rem;
}

.pt-12 {
    padding-top: 3rem;
}

.pt-32 {
    padding-top: 8rem;
}

.pb-0 {
    padding-bottom: 0;
}

.pb-6 {
    padding-bottom: 1.5rem;
}

.pb-16 {
    padding-bottom: 4rem;
}

.pb-20 {
    padding-bottom: 5rem;
}

.pl-8 {
    padding-left: 2rem;
}

.pr-4 {
    padding-right: 1rem;
}

.m-0 {
    margin: 0;
}

.mb-0 {
    margin-bottom: 0;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.mb-3 {
    margin-bottom: 0.75rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

.mb-6 {
    margin-bottom: 1.5rem;
}

.mb-8 {
    margin-bottom: 2rem;
}

.mb-10 {
    margin-bottom: 2.5rem;
}

.mb-12 {
    margin-bottom: 3rem;
}

.mb-16 {
    margin-bottom: 4rem;
}

.mt-auto {
    margin-top: auto;
}

.mt-20 {
    margin-top: 5rem;
}

.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

.space-y-2>*+* {
    margin-top: 0.5rem;
}

.space-y-3>*+* {
    margin-top: 0.75rem;
}

.space-y-4>*+* {
    margin-top: 1rem;
}

.space-y-6>*+* {
    margin-top: 1.5rem;
}

.space-y-8>*+* {
    margin-top: 2rem;
}

/* ── 7. Sizing ── */
.w-4 {
    width: 1rem;
}

.w-5 {
    width: 1.25rem;
}

.w-10 {
    width: 2.5rem;
}

.w-16 {
    width: 4rem;
}

.w-24 {
    width: 6rem;
}

.w-32 {
    width: 8rem;
}

.w-full {
    width: 100%;
}

.w-auto {
    width: auto;
}

.h-1 {
    height: 0.25rem;
}

.h-4 {
    height: 1rem;
}

.h-5 {
    height: 1.25rem;
}

.h-8 {
    height: 2rem;
}

.h-10 {
    height: 2.5rem;
}

.h-16 {
    height: 4rem;
}

.h-32 {
    height: 8rem;
}

.h-full {
    height: 100%;
}

.min-h-screen {
    min-height: 100vh;
}

.min-h-60vh {
    min-height: 60vh;
}

.min-h-50vh {
    min-height: 50vh;
}

.max-w-full {
    max-width: 100%;
}

.max-w-none {
    max-width: none;
}

.max-w-3xl {
    max-width: 48rem;
}

.max-w-4xl {
    max-width: 56rem;
}

.max-w-5xl {
    max-width: 64rem;
}

.max-w-7xl {
    max-width: 80rem;
}

.max-h-0 {
    max-height: 0;
}

.max-h-full {
    max-height: 100%;
}

.aspect-video {
    aspect-ratio: 16 / 9;
}

/* ── 8. Positioning ── */
.relative {
    position: relative;
}

.absolute {
    position: absolute;
}

.fixed {
    position: fixed;
}

.inset-0 {
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
}

.top-0 {
    top: 0;
}

.left-0 {
    left: 0;
}

.right-0 {
    right: 0;
}

.bottom-0 {
    bottom: 0;
}

.left-1\/2 {
    left: 50%;
}

.-top-4 {
    top: -1rem;
}

.-translate-x-1\/2 {
    transform: translateX(-50%);
}

.z-0 {
    z-index: 0;
}

.z-10 {
    z-index: 10;
}

.z-50 {
    z-index: 50;
}

/* ── 9. Borders ── */
.border {
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.border-2 {
    border-width: 2px;
}

.border-t {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.border-b-2 {
    border-bottom: 2px solid transparent;
}

.border-l-4 {
    border-left: 4px solid;
}

.border-transparent {
    border-color: transparent;
}

.border-white\/5 {
    border-color: rgba(255, 255, 255, 0.05);
}

.border-white\/10 {
    border-color: rgba(255, 255, 255, 0.1);
}

.border-white\/20 {
    border-color: rgba(255, 255, 255, 0.2);
}

.border-white\/30 {
    border-color: rgba(255, 255, 255, 0.3);
}

.border-brand-primary {
    border-color: var(--brand-primary);
}

.border-brand-primary\/20 {
    border-color: rgba(231, 34, 46, 0.2);
}

.border-brand-primary\/30 {
    border-color: rgba(231, 34, 46, 0.3);
}

.border-brand-primary\/40 {
    border-color: rgba(231, 34, 46, 0.4);
}

.border-green-500\/20 {
    border-color: rgba(34, 197, 94, 0.2);
}

.rounded-lg {
    border-radius: 0.5rem;
}

.rounded-full {
    border-radius: 9999px;
}

/* ── 10. Effects ── */
.opacity-0 {
    opacity: 0;
}

.opacity-30 {
    opacity: 0.3;
}

.opacity-60 {
    opacity: 0.6;
}

.opacity-80 {
    opacity: 0.8;
}

.opacity-90 {
    opacity: 0.9;
}

.shadow-2xl {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.overflow-hidden {
    overflow: hidden;
}

.overflow-x-auto {
    overflow-x: auto;
}

.object-cover {
    object-fit: cover;
}

.object-contain {
    object-fit: contain;
}

.pointer-events-none {
    pointer-events: none;
}

.resize-none {
    resize: none;
}

/* ── 11. Transitions & Transforms ── */
.transition-all {
    transition: all 0.3s ease;
}

.transition-colors {
    transition: color 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
}

.transition-opacity {
    transition: opacity 0.3s ease;
}

.transition-transform {
    transition: transform 0.3s ease;
}

.duration-300 {
    transition-duration: 300ms;
}

.duration-500 {
    transition-duration: 500ms;
}

.duration-700 {
    transition-duration: 700ms;
}

.translate-y-full {
    transform: translateY(100%);
}

/* ── 12. Hover & Group Utilities ── */
.hover\:text-white:hover {
    color: #fff;
}

.hover\:text-brand-primary:hover {
    color: var(--brand-primary);
}

.hover\:border-brand-primary:hover {
    border-color: var(--brand-primary);
}

.hover\:border-white\/20:hover {
    border-color: rgba(255, 255, 255, 0.2);
}

.hover\:bg-transparent:hover {
    background-color: transparent;
}

.hover\:opacity-80:hover {
    opacity: 0.8;
}

.hover\:underline:hover {
    text-decoration: underline;
}

/* Group hover */
.group:hover .group-hover\:text-brand-primary {
    color: var(--brand-primary);
}

.group:hover .group-hover\:scale-110 {
    transform: scale(1.1);
}

.group:hover .group-hover\:opacity-100 {
    opacity: 1;
}

.group:hover .group-hover\:-translate-x-1 {
    transform: translateX(-0.25rem);
}

.group:hover .group-hover\:translate-y-0 {
    transform: translateY(0);
}

.group:hover .group-hover\:translate-x-1 {
    transform: translateX(0.25rem);
}

/* Focus */
.focus\:border-brand-primary:focus {
    border-color: var(--brand-primary);
}

.focus\:outline-none:focus {
    outline: none;
}

/* ── 13. Responsive ── */
@media (min-width: 768px) {
    .md\:block {
        display: block;
    }

    .md\:flex-row {
        flex-direction: row;
    }

    .md\:grid-cols-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .md\:grid-cols-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .md\:grid-cols-4 {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .md\:h-10 {
        height: 2.5rem;
    }

    .md\:space-x-8>*+* {
        margin-left: 2rem;
    }

    .md\:text-sm {
        font-size: 0.875rem;
    }

    .md\:text-xl {
        font-size: 1.25rem;
    }

    .md\:text-2xl {
        font-size: 1.5rem;
    }

    .md\:text-3xl {
        font-size: 1.875rem;
    }

    .md\:text-5xl {
        font-size: 3rem;
        line-height: 1.1;
    }

    .md\:text-6xl {
        font-size: 3.75rem;
        line-height: 1;
    }

    .md\:text-7xl {
        font-size: 4.5rem;
        line-height: 1;
    }

    .md\:text-8xl {
        font-size: 6rem;
        line-height: 1;
    }
}

@media (min-width: 1024px) {
    .lg\:grid-cols-4 {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .lg\:px-8 {
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

/* ── 14. Container ── */
.container {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

@media (min-width: 640px) {
    .container {
        max-width: 640px;
    }
}

@media (min-width: 768px) {
    .container {
        max-width: 768px;
    }
}

@media (min-width: 1024px) {
    .container {
        max-width: 1024px;
    }
}

@media (min-width: 1280px) {
    .container {
        max-width: 1280px;
    }
}

/* ── 15. Prose (Rich Text Content) ── */
.prose {
    max-width: 65ch;
}

.prose p {
    margin-bottom: 1.25rem;
}

.prose h2,
.prose h3 {
    font-weight: 700;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.prose img {
    border-radius: 0.25rem;
}

.prose-invert {
    color: rgba(255, 255, 255, 0.8);
}

.prose-lg {
    font-size: 1.125rem;
    line-height: 1.75;
}

/* ══════════════════════════════════════════════════
   COMPONENT STYLES (moved from base.html inline)
   ══════════════════════════════════════════════════ */

/* ── M-Border Gradient ── */
.m-border-gradient {
    background: linear-gradient(90deg, var(--brand-primary) 0%, var(--brand-secondary) 50%, var(--brand-tertiary) 100%);
    height: 3px;
    width: 100%;
}

/* ── Glass Navigation ── */
.glass-nav {
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* ── Preloader (Brutal Engine RPM) ── */
.preloader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: radial-gradient(circle at center, #111 0%, #000 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

.preloader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.preloader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 400px;
    padding: 2rem;
}

.preloader-logo {
    font-family: 'Russo One', sans-serif;
    font-size: 2.5rem;
    font-weight: 900;
    letter-spacing: 0.05em;
    color: #fff;
    margin-bottom: 3rem;
    text-transform: uppercase;
}

/* ── SVG Logo Container ── */
.car-logo-svg {
    display: block;
    flex-shrink: 0;
}

.car-logo-svg svg {
    height: 100%;
    width: auto;
    max-width: none;
    display: block;
}

.engine-shake {
    animation: engineRumble 0.08s linear infinite;
}

@keyframes engineRumble {
    0% {
        transform: translate(0, 0) rotate(0deg);
    }

    25% {
        transform: translate(-1px, 1px) rotate(-0.5deg);
    }

    50% {
        transform: translate(1px, -1px) rotate(0.5deg);
    }

    75% {
        transform: translate(-1px, -1px) rotate(0deg);
    }

    100% {
        transform: translate(1px, 1px) rotate(-0.5deg);
    }
}

.rpm-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.rpm-text {
    font-family: 'Russo One', sans-serif;
    font-size: 0.75rem;
    color: var(--brand-tertiary);
    letter-spacing: 0.2em;
    text-align: right;
    animation: blink 1s infinite alternate;
}

@keyframes blink {
    0% {
        opacity: 0.3;
    }

    100% {
        opacity: 1;
    }
}

.rpm-bar {
    width: 100%;
    height: 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
    transform: skewX(-15deg);
}

.rpm-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--brand-primary) 0%, var(--brand-secondary) 60%, var(--brand-tertiary) 100%);
    box-shadow: 0 0 15px var(--brand-tertiary);
}

/* Pseudo-elements for segmented look */
.rpm-bar::after {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(90deg,
            transparent,
            transparent 20px,
            rgba(0, 0, 0, 0.8) 20px,
            rgba(0, 0, 0, 0.8) 24px);
    z-index: 2;
}

.rpm-numbers {
    display: flex;
    justify-content: space-between;
    font-family: 'Russo One', sans-serif;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.4);
    margin-top: 0.25rem;
    padding: 0 5px;
}

.rpm-numbers .redline {
    color: var(--brand-tertiary);
    text-shadow: 0 0 5px rgba(129, 196, 255, 0.5);
}

/* ── Scroll Reveal ── */
.reveal-section {
    opacity: 0;
    transform: translateY(60px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* ── Neon Logo Shimmer ── */
.neon-m-shimmer {
    background: linear-gradient(90deg, #fff, #fff, var(--brand-primary), var(--brand-secondary), var(--brand-tertiary), #fff, #fff);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shimmer 4s linear infinite;
    display: inline-block;
}

@keyframes shimmer {
    to {
        background-position: 200% center;
    }
}

/* ── WebGL Canvas ── */
#webgl-canvas {
    position: fixed;
    top: 0;
    left: 0;
    /* Убираем 100%, чтобы Safari не растягивал холст при скрытии панели адреса.
       Размер будет жестко задаваться через style.width/height в main.js */
    z-index: 0;
    /* Move canvas to Z-axis bottom */
    outline: none;
    pointer-events: none;
}

main {
    position: relative;
}

section {
    position: relative;
    z-index: 10;
}

/* ── Smooth Scroll (Lenis) ── */
html.lenis {
    height: auto;
}

.lenis-smooth {
    scroll-behavior: auto !important;
}

.lenis-smooth [data-lenis-prevent] {
    overscroll-behavior: contain;
}

.lenis-stopped {
    overflow: hidden;
}

/* ── No Scrollbar ── */
.no-scrollbar::-webkit-scrollbar {
    display: none;
}

.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* ── FAQ Accordion ── */
.faq-item .faq-chevron {
    transition: transform 0.3s ease;
}

.faq-item.faq-open .faq-chevron {
    transform: rotate(180deg);
    color: var(--brand-primary);
}

.faq-item.faq-open .faq-answer {
    max-height: 500px;
    padding-bottom: 1.5rem;
}

.faq-item.faq-open {
    border-color: rgba(231, 34, 46, 0.3);
    box-shadow: 0 0 20px rgba(231, 34, 46, 0.1), inset 0 0 20px rgba(231, 34, 46, 0.03);
}

/* ── Neon Heading ── */
.neon-heading {
    text-shadow:
        0 0 10px rgba(231, 34, 46, 0.4),
        0 0 40px rgba(231, 34, 46, 0.15),
        0 0 80px rgba(231, 34, 46, 0.05);
}

/* ── M-Stripe Neon Divider ── */
.neon-divider {
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--brand-primary) 20%, var(--brand-secondary) 40%, var(--brand-tertiary) 60%, transparent);
    box-shadow: 0 0 15px rgba(231, 34, 46, 0.3);
}

/* ── Glass Card with Neon ── */
.glass-card {
    position: relative;
    background: rgba(255, 255, 255, 0.04) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: border-color 0.6s ease, box-shadow 0.6s ease, transform 0.4s ease;
}

.glass-card.neon-active {
    border-color: rgba(231, 34, 46, 0.35);
    box-shadow:
        0 0 15px rgba(231, 34, 46, 0.12),
        0 0 40px rgba(22, 88, 142, 0.08),
        0 0 60px rgba(129, 196, 255, 0.04),
        inset 0 1px 0 rgba(231, 34, 46, 0.08);
}

.glass-card:hover {
    border-color: rgba(231, 34, 46, 0.6);
    box-shadow:
        0 0 25px rgba(231, 34, 46, 0.25),
        0 0 50px rgba(22, 88, 142, 0.12),
        0 0 80px rgba(129, 196, 255, 0.06),
        inset 0 1px 0 rgba(231, 34, 46, 0.15);
    transform: translateY(-3px);
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, var(--brand-primary) 20%, var(--brand-secondary) 40%, var(--brand-tertiary) 60%, transparent 80%);
    background-size: 300% 100%;
    background-position: var(--neon-shift, -100%) 0;
    opacity: 0;
    transition: opacity 0.8s ease;
    z-index: 10;
}

.glass-card.neon-active::before {
    opacity: 0.9;
}

.glass-card:hover::before {
    opacity: 1;
}

.glass-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, var(--brand-tertiary) 20%, var(--brand-secondary) 40%, var(--brand-primary) 60%, transparent 80%);
    background-size: 300% 100%;
    background-position: var(--neon-shift, -100%) 0;
    opacity: 0;
    transition: opacity 0.8s ease;
    z-index: 10;
}

.glass-card.neon-active::after {
    opacity: 0.9;
}

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

/* ── Neon Card (legacy) ── */
.neon-card {
    transition: all 0.5s ease;
}

.neon-card:hover {
    border-color: rgba(231, 34, 46, 0.4);
    box-shadow: 0 0 30px rgba(231, 34, 46, 0.15), 0 0 60px rgba(231, 34, 46, 0.05), inset 0 1px 0 rgba(231, 34, 46, 0.1);
}

/* ── Neon Button Glow ── */
.neon-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background-color: var(--brand-primary) !important;
    color: var(--white) !important;
    border: 1px solid var(--brand-primary) !important;
    font-family: 'Russo One', sans-serif !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.1em !important;
    transition: all 0.3s ease !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    text-shadow: none !important;
}

.neon-btn:hover {
    background-color: rgba(231, 34, 46, 0.05) !important;
    color: var(--brand-primary) !important;
    border-color: var(--brand-primary) !important;
    box-shadow: 0 0 20px rgba(231, 34, 46, 0.4), 0 0 40px rgba(231, 34, 46, 0.1) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
}

/* ── Neon Badges ── */
.neon-badge-green {
    box-shadow: 0 0 10px rgba(34, 197, 94, 0.3);
}

.neon-popular {
    box-shadow: 0 0 30px rgba(231, 34, 46, 0.2), 0 0 60px rgba(231, 34, 46, 0.1);
}

/* ── Neon Text ── */
.neon-text {
    text-shadow: 0 0 20px rgba(231, 34, 46, 0.5), 0 0 60px rgba(231, 34, 46, 0.2);
}

/* ── Event Detail Body Content ── */
.event-body-content p {
    margin-bottom: 2rem;
}

.event-body-content h2,
.event-body-content h3 {
    font-family: 'Orbitron', sans-serif;
    color: #fff;
    margin-top: 3rem;
    margin-bottom: 1.5rem;
}

.event-body-content img {
    border-radius: 4px;
    margin: 3rem 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ── Form Inputs ── */
.form-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 0.75rem 1.25rem;
    color: #fff;
    font-family: 'Exo 2', sans-serif;
    transition: border-color 0.3s ease;
}

.form-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.form-input:focus {
    border-color: var(--brand-primary);
    outline: none;
}

/* ── Placeholder input utility (kept for compat) ── */
.placeholder\:text-white\/40::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

/* ── Special font size with brackets ── */
.text-\[10px\] {
    font-size: 10px;
}

.tracking-\[0\.2em\] {
    letter-spacing: 0.2em;
}

/* ── Back to Top Button ── */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 100;
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(231, 34, 46, 0.15);
    border: 1px solid rgba(231, 34, 46, 0.3);
    color: var(--brand-primary);
    backdrop-filter: blur(10px);
    opacity: 0;
    visibility: hidden;
    transform: translateY(1rem);
    transition: all 0.4s ease;
    cursor: pointer;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--brand-primary);
    color: #000;
    box-shadow: 0 0 20px rgba(231, 34, 46, 0.4);
}

/* ── Mobile Menu ── */
.mobile-menu-overlay {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-menu-panel {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 201;
    width: 80%;
    max-width: 320px;
    height: 100vh;
    background: rgba(10, 10, 10, 0.98);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    padding: 2rem;
    overflow-y: auto;
}

.mobile-menu-panel.active {
    transform: translateX(0);
}

.mobile-menu-panel a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 0;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.6);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: color 0.3s ease;
}

.mobile-menu-panel a:hover {
    color: var(--brand-primary);
}

/* Burger button */
.burger-btn {
    display: flex;
    flex-direction: column;
    gap: 5px;
    width: 28px;
    cursor: pointer;
    z-index: 202;
}

.burger-btn span {
    display: block;
    height: 2px;
    background: #fff;
    transition: all 0.3s ease;
    border-radius: 1px;
}

.burger-btn.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.burger-btn.active span:nth-child(2) {
    opacity: 0;
}

.burger-btn.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Show burger on mobile and tablet */
.burger-btn {
    display: none;
}

@media (max-width: 1023px) {
    .burger-btn {
        display: flex;
    }

    .desktop-nav {
        display: none;
    }
}

/* ── Breadcrumbs ── */
.breadcrumbs {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'Exo 2', sans-serif;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    flex-wrap: wrap;
}

.breadcrumbs a:hover {
    color: var(--brand-primary);
}

.breadcrumbs .sep {
    color: rgba(255, 255, 255, 0.15);
}

/* ── Social Share Buttons ── */
.share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.4);
    transition: all 0.3s ease;
}

.share-btn:hover {
    border-color: var(--brand-primary);
    color: var(--brand-primary);
}

/* ── Accessibility ── */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .preloader {
        transition: none;
    }
}




/* ── Col Span ── */
.col-span-full {
    grid-column: 1 / -1;
}

/* ── Selection ── */
::selection {
    background: rgba(231, 34, 46, 0.3);
    color: #fff;
}

/* ── Scrollbar (for non-hidden) ── */
::-webkit-scrollbar {
    width: 6px;
}

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

::-webkit-scrollbar-thumb {
    background: var(--brand-primary);
    border-radius: 3px;
}

/* ── Social Icons (SVG sizing) ── */
.social-icon svg {
    width: 1.125rem;
    height: 1.125rem;
}

/* ══════════════════════════════════════════════════════════
   GARAGE / LOGBOOK — BMW Digital Logbook Design System
   ══════════════════════════════════════════════════════════ */

/* ── Carbon Fiber Background Texture ── */
.carbon-bg {
    background-color: #0a0a0a;
    background-image:
        linear-gradient(45deg, rgba(255,255,255,0.015) 25%, transparent 25%),
        linear-gradient(-45deg, rgba(255,255,255,0.015) 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, rgba(255,255,255,0.015) 75%),
        linear-gradient(-45deg, transparent 75%, rgba(255,255,255,0.015) 75%);
    background-size: 4px 4px;
    background-position: 0 0, 0 2px, 2px -2px, -2px 0;
}

/* ── Logbook Hero (Car Profile) ── */
.logbook-hero {
    position: relative;
    width: 100%;
    min-height: 50vh;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
}

.logbook-hero__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.45) contrast(1.1) saturate(1.1);
    transition: transform 6s ease-out;
}

.logbook-hero:hover .logbook-hero__img {
    transform: scale(1.04);
}

.logbook-hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.95) 0%,
        rgba(0, 0, 0, 0.6) 40%,
        rgba(0, 0, 0, 0.3) 70%,
        rgba(0, 0, 0, 0.15) 100%
    );
}

.logbook-hero__content {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 64rem;
    margin: 0 auto;
    padding: 3rem 1.5rem;
}

.logbook-hero__model {
    font-family: 'Russo One', sans-serif;
    font-size: 2.5rem;
    line-height: 1.1;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.75rem;
    text-shadow: 0 2px 20px rgba(0,0,0,0.5);
}

@media (min-width: 768px) {
    .logbook-hero {
        min-height: 60vh;
    }
    .logbook-hero__model {
        font-size: 4rem;
    }
    .logbook-hero__content {
        padding: 4rem 2rem;
    }
}

.logbook-hero__owner {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.875rem;
    color: rgba(255,255,255,0.5);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logbook-hero__owner span {
    color: var(--brand-primary);
    font-weight: 700;
}

/* ── Spec Gauges (Dashboard-style info cards) ── */
.spec-panel {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.06);
    margin-bottom: 3rem;
}

.spec-gauge {
    background: rgba(10,10,10,0.9);
    padding: 1.25rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    transition: background-color 0.4s ease;
    position: relative;
}

.spec-gauge:hover {
    background: rgba(231, 34, 46, 0.04);
}

.spec-gauge::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--brand-primary), var(--brand-secondary), var(--brand-tertiary));
    transition: width 0.4s ease;
}

.spec-gauge:hover::after {
    width: 100%;
}

.spec-gauge__label {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.625rem;
    color: rgba(255,255,255,0.35);
    text-transform: uppercase;
    letter-spacing: 0.2em;
}

.spec-gauge__value {
    font-family: 'Russo One', sans-serif;
    font-size: 1.125rem;
    color: #fff;
    letter-spacing: 0.02em;
}

/* ── Logbook Timeline ── */
.logbook-timeline {
    position: relative;
    padding-left: 2.5rem;
}

.logbook-timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(
        to bottom,
        var(--brand-primary) 0%,
        var(--brand-secondary) 50%,
        var(--brand-tertiary) 100%
    );
    opacity: 0.3;
    border-radius: 2px;
}

@media (min-width: 768px) {
    .logbook-timeline {
        padding-left: 3.5rem;
    }
}

/* ── Timeline Entry ── */
.timeline-entry {
    position: relative;
    margin-bottom: 2.5rem;
    padding-bottom: 2.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}

.timeline-entry:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

/* Diamond marker on the timeline (tachometer-style) */
.timeline-entry::before {
    content: '';
    position: absolute;
    left: calc(-2.5rem - 3px);
    top: 0.45rem;
    width: 9px;
    height: 9px;
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary));
    transform: rotate(45deg);
    z-index: 3;
    transition: transform 0.4s ease, box-shadow 0.4s ease, background 0.4s ease;
}

/* Horizontal connector line (gauge tick) */
.timeline-entry::after {
    content: '';
    position: absolute;
    left: calc(-2.5rem + 8px);
    top: calc(0.45rem + 3.5px);
    width: calc(2.5rem - 12px);
    height: 1px;
    background: linear-gradient(90deg, rgba(231, 34, 46, 0.4), rgba(22, 88, 142, 0.15), transparent);
    z-index: 2;
    transition: opacity 0.4s ease, width 0.4s ease;
}

@media (min-width: 768px) {
    .timeline-entry::before {
        left: calc(-3.5rem - 3px);
    }
    .timeline-entry::after {
        left: calc(-3.5rem + 8px);
        width: calc(3.5rem - 12px);
    }
}

.timeline-entry:hover::before {
    transform: rotate(45deg) scale(1.25);
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-tertiary));
    box-shadow: 0 0 12px rgba(231, 34, 46, 0.5), 0 0 24px rgba(231, 34, 46, 0.2);
}

.timeline-entry:hover::after {
    opacity: 1;
    background: linear-gradient(90deg, rgba(231, 34, 46, 0.6), rgba(22, 88, 142, 0.3), transparent);
}

.timeline-entry__date {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.625rem;
    color: rgba(255,255,255,0.3);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    margin-bottom: 0.5rem;
}

.timeline-entry__card {
    display: flex;
    flex-direction: column;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.06);
    overflow: hidden;
    transition: all 0.4s ease;
    text-decoration: none;
    color: inherit;
}

@media (min-width: 768px) {
    .timeline-entry__card {
        flex-direction: row;
    }
}

.timeline-entry__card:hover {
    border-color: rgba(231, 34, 46, 0.3);
    background: rgba(255,255,255,0.03);
    box-shadow: 0 0 30px rgba(231, 34, 46, 0.08);
    transform: translateX(4px);
}

.timeline-entry__thumb {
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
    flex-shrink: 0;
    position: relative;
    background: rgba(255,255,255,0.03);
}

@media (min-width: 768px) {
    .timeline-entry__thumb {
        width: 260px;
        aspect-ratio: unset;
        align-self: stretch;
        min-height: 140px;
    }
}

.timeline-entry__thumb img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.timeline-entry__card:hover .timeline-entry__thumb img {
    transform: scale(1.08);
}

.timeline-entry__body {
    padding: 1.25rem 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

.timeline-entry__title {
    font-family: 'Russo One', sans-serif;
    font-size: 1rem;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
    line-height: 1.3;
    transition: color 0.3s ease;
}

.timeline-entry__card:hover .timeline-entry__title {
    color: var(--brand-primary);
}

.timeline-entry__excerpt {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.8125rem;
    color: rgba(255,255,255,0.45);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 0.75rem;
}

.timeline-entry__meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: auto;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.625rem;
    color: rgba(255,255,255,0.3);
    text-transform: uppercase;
    letter-spacing: 0.15em;
}

.timeline-entry__meta svg {
    width: 0.875rem;
    height: 0.875rem;
    flex-shrink: 0;
}

.timeline-entry__meta-item {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

/* ── No-Image Placeholder for Timeline ── */
.timeline-entry__thumb--empty {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.02);
}

.timeline-entry__thumb--empty svg {
    width: 2rem;
    height: 2rem;
    color: rgba(255,255,255,0.08);
}

/* ── Car Grid Card (Index Page) ── */
.car-card {
    position: relative;
    overflow: hidden;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.06);
    transition: all 0.5s ease;
    display: flex;
    flex-direction: column;
}

.car-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 0;
    background: linear-gradient(to bottom, var(--brand-primary), var(--brand-secondary), var(--brand-tertiary));
    transition: height 0.5s ease;
    z-index: 3;
}

.car-card:hover::before {
    height: 100%;
}

.car-card:hover {
    border-color: rgba(231, 34, 46, 0.3);
    box-shadow:
        0 0 25px rgba(231, 34, 46, 0.1),
        0 0 60px rgba(22, 88, 142, 0.05);
    transform: translateY(-4px);
}

.car-card__img-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 16/10;
    overflow: hidden;
    background: rgba(255,255,255,0.03);
}

.car-card__img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s ease;
}

.car-card:hover .car-card__img-wrap img {
    transform: scale(1.08);
}

.car-card__img-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.2) 60%, transparent 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1.25rem;
}

.car-card__year {
    font-family: 'Russo One', sans-serif;
    font-size: 0.625rem;
    color: var(--brand-primary);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    margin-bottom: 0.25rem;
}

.car-card__model {
    font-family: 'Russo One', sans-serif;
    font-size: 1.25rem;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    line-height: 1.15;
    margin-bottom: 0.25rem;
    transition: color 0.3s ease;
}

.car-card:hover .car-card__model {
    color: var(--brand-primary);
}

.car-card__engine {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.6875rem;
    color: rgba(255,255,255,0.45);
    letter-spacing: 0.05em;
}

.car-card__footer {
    padding: 0.875rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid rgba(255,255,255,0.04);
    background: rgba(0,0,0,0.5);
}

.car-card__owner {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.625rem;
    color: rgba(255,255,255,0.4);
    text-transform: uppercase;
    letter-spacing: 0.15em;
}

.car-card__posts-count {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.625rem;
    color: rgba(255,255,255,0.3);
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.car-card__posts-count svg {
    width: 0.75rem;
    height: 0.75rem;
}

/* ── Photo Gallery Grid ── */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.25rem;
}

@media (min-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 0.375rem;
    }
}

.gallery-item {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    cursor: pointer;
    background: rgba(255,255,255,0.03);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease, filter 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.08);
    filter: brightness(0.7);
}

.gallery-item__caption {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    padding: 0.75rem;
    background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-item__caption {
    opacity: 1;
}

.gallery-item__caption span {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.6875rem;
    color: rgba(255,255,255,0.8);
    line-height: 1.3;
}

/* ── Photo Lightbox ── */
.lightbox-overlay {
    position: fixed;
    inset: 0;
    z-index: 9000;
    background: rgba(0,0,0,0.95);
    backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
    cursor: zoom-out;
}

.lightbox-overlay.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-overlay img {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border: 1px solid rgba(255,255,255,0.08);
    transition: transform 0.4s ease;
}

.lightbox-overlay.active img {
    transform: scale(1);
}

.lightbox-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.5);
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(0,0,0,0.5);
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 2;
}

.lightbox-close:hover {
    color: var(--brand-primary);
    border-color: var(--brand-primary);
}

.lightbox-caption {
    position: absolute;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'Montserrat', sans-serif;
    font-size: 0.75rem;
    color: rgba(255,255,255,0.5);
    text-align: center;
    max-width: 600px;
    letter-spacing: 0.05em;
}

/* ── Logbook Post Article ── */
.logbook-article {
    font-family: 'Montserrat', sans-serif;
    color: rgba(255,255,255,0.75);
    font-size: 1.0625rem;
    line-height: 1.85;
    letter-spacing: 0.01em;
}

.logbook-article p {
    margin-bottom: 1.5rem;
}

/* ── Post Navigation (Prev/Next) ── */
.post-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.06);
}

.post-nav__link {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 1.5rem;
    background: rgba(10,10,10,0.9);
    text-decoration: none;
    color: inherit;
    transition: background-color 0.3s ease;
}

.post-nav__link:hover {
    background: rgba(231, 34, 46, 0.04);
}

.post-nav__link--next {
    text-align: right;
    align-items: flex-end;
}

.post-nav__dir {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.5625rem;
    color: rgba(255,255,255,0.3);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.post-nav__dir svg {
    width: 0.75rem;
    height: 0.75rem;
    transition: transform 0.3s ease;
}

.post-nav__link:hover .post-nav__dir svg {
    transform: translateX(-3px);
}

.post-nav__link--next:hover .post-nav__dir svg {
    transform: translateX(3px);
}

.post-nav__title {
    font-family: 'Russo One', sans-serif;
    font-size: 0.8125rem;
    color: rgba(255,255,255,0.7);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    line-height: 1.3;
    transition: color 0.3s ease;
}

.post-nav__link:hover .post-nav__title {
    color: var(--brand-primary);
}

.post-nav__placeholder {
    background: rgba(10,10,10,0.9);
}

/* ── Avatar Placeholder ── */
.avatar-circle {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Russo One', sans-serif;
    font-size: 0.75rem;
    color: #fff;
    text-transform: uppercase;
    flex-shrink: 0;
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary));
}

.avatar-circle--sm {
    width: 1.5rem;
    height: 1.5rem;
    font-size: 0.5625rem;
}

/* ── Comment M-Badge (Owner) ── */
.m-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-family: 'Russo One', sans-serif;
    font-size: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    padding: 0.125rem 0.5rem;
    background: linear-gradient(90deg, var(--brand-primary), var(--brand-secondary), var(--brand-tertiary));
    color: #fff;
    line-height: 1.6;
}

/* ── Section Heading with M-Stripe ── */
.section-heading {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.section-heading__stripe {
    width: 4px;
    height: 2.5rem;
    background: linear-gradient(to bottom, var(--brand-primary), var(--brand-secondary), var(--brand-tertiary));
    flex-shrink: 0;
    border-radius: 2px;
}

.section-heading__text {
    font-family: 'Russo One', sans-serif;
    font-size: 1.25rem;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* ── Breadcrumbs Enhanced ── */
.breadcrumbs .sep--stripe {
    display: inline-block;
    width: 20px;
    height: 2px;
    background: linear-gradient(90deg, var(--brand-primary), var(--brand-secondary), var(--brand-tertiary));
    vertical-align: middle;
}

/* ── Empty State Hero (no photo) ── */
.logbook-hero--empty {
    min-height: 30vh;
    background: linear-gradient(135deg, #0a0a0a 0%, #111 50%, #0a0a0a 100%);
    display: flex;
    align-items: flex-end;
}

/* ── Responsive additions for garage ── */
@media (min-width: 640px) {
    .sm\\:w-auto {
        width: auto;
    }
}

.whitespace-pre-line {
    white-space: pre-line;
}

/* ── Logbook search input (detail page) ── */
.logbook-search {
    width: 100%;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    color: #fff;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.8125rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    letter-spacing: 0.03em;
}

.logbook-search::placeholder {
    color: rgba(255,255,255,0.2);
}

.logbook-search:focus {
    outline: none;
    border-color: rgba(231, 34, 46, 0.4);
    box-shadow: 0 0 20px rgba(231, 34, 46, 0.08);
}

@media (min-width: 768px) {
    .logbook-search {
        max-width: 280px;
    }
}

/* ── Aspect Ratio Square ── */
.aspect-square {
    aspect-ratio: 1;
}

/* ── M-Stripe Horizontal Divider (thin) ── */
.m-stripe-divider {
    height: 2px;
    background: linear-gradient(90deg, var(--brand-primary), var(--brand-secondary), var(--brand-tertiary));
    opacity: 0.4;
}

/* ── Logbook Post figures ── */
.logbook-figure {
    margin-bottom: 2rem;
}

.logbook-figure img {
    width: 100%;
    height: auto;
    border: 1px solid rgba(255,255,255,0.05);
}

.logbook-figure figcaption {
    margin-top: 0.75rem;
    padding: 0.75rem 1rem;
    background: rgba(255,255,255,0.02);
    border-left: 2px solid var(--brand-primary);
    font-family: 'Montserrat', sans-serif;
    font-size: 0.75rem;
    color: rgba(255,255,255,0.45);
    font-style: italic;
    line-height: 1.5;
}

/* ── Float image on large screens ── */
.logbook-float-img {
    width: 100%;
    margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
    .logbook-float-img {
        float: left;
        width: 45%;
        margin-right: 2rem;
        margin-bottom: 1rem;
    }
}

.logbook-float-img img {
    width: 100%;
    height: auto;
    border: 1px solid rgba(255,255,255,0.06);
}

.logbook-float-img .caption {
    margin-top: 0.5rem;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.6875rem;
    color: rgba(255,255,255,0.35);
    font-style: italic;
    text-align: center;
}

/* ── Comments section styling ── */
.comment-block {
    background: rgba(255,255,255,0.015);
    border-left: 1px solid rgba(255,255,255,0.06);
    padding: 1.25rem 1.5rem;
    margin-bottom: 0.75rem;
    transition: border-color 0.3s ease;
}

.comment-block:hover {
    border-left-color: rgba(231, 34, 46, 0.4);
}

.comment-block__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.comment-block__author {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.comment-block__name {
    font-family: 'Russo One', sans-serif;
    font-size: 0.75rem;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.comment-block__date {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.625rem;
    color: rgba(255,255,255,0.2);
}

.comment-block__text {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.875rem;
    color: rgba(255,255,255,0.65);
    line-height: 1.65;
    white-space: pre-line;
}

.comment-block__reply-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.5625rem;
    color: rgba(255,255,255,0.25);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    padding: 0.25rem 0;
    cursor: pointer;
    background: none;
    border: none;
    transition: color 0.3s ease;
}

.comment-block__reply-btn:hover {
    color: var(--brand-primary);
}

.comment-block__reply-btn svg {
    width: 0.75rem;
    height: 0.75rem;
    transition: transform 0.3s ease;
}

.comment-block__reply-btn:hover svg {
    transform: translateX(-2px);
}

.comment-block__replies {
    margin-top: 1rem;
    margin-left: 1rem;
    padding-left: 1rem;
    border-left: 1px solid rgba(255,255,255,0.04);
}

@media (min-width: 768px) {
    .comment-block__replies {
        margin-left: 2.5rem;
        padding-left: 1.5rem;
    }
}

/* ── Utility: clear-both ── */
.clear-both {
    clear: both;
}

/* ── Utility: last:mb-0 ── */
.last\\:mb-0:last-child {
    margin-bottom: 0;
}

/* ── Truncate text ── */
.truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ── Additional spacing/layout helpers ── */
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-12 { margin-top: 3rem; }
.mt-16 { margin-top: 4rem; }
.ml-2 { margin-left: 0.5rem; }
.ml-4 { margin-left: 1rem; }
.pl-4 { padding-left: 1rem; }
.pl-6 { padding-left: 1.5rem; }
.pt-20 { padding-top: 5rem; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }
.py-12 { padding-top: 3rem; padding-bottom: 3rem; }
.px-8 { padding-left: 2rem; padding-right: 2rem; }
.border-l { border-left: 1px solid rgba(255,255,255,0.1); }
.border-l-2 { border-left-width: 2px; }
.rounded-sm { border-radius: 0.125rem; }
.items-end { align-items: flex-end; }
.justify-end { justify-content: flex-end; }
.shrink-0 { flex-shrink: 0; }
.leading-snug { line-height: 1.375; }
.leading-none { line-height: 1; }
.tracking-wider { letter-spacing: 0.05em; }
.w-6 { width: 1.5rem; }
.h-6 { height: 1.5rem; }
.w-12 { width: 3rem; }
.h-12 { height: 3rem; }
.gap-1 { gap: 0.25rem; }
.inset-x-0 { left: 0; right: 0; }
.whitespace-pre-line { white-space: pre-line; }
.clear-both { clear: both; }
.aspect-square { aspect-ratio: 1; }
.cursor-help { cursor: help; }
.animate-spin { animation: spin 1s linear infinite; }
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ── Responsive: Logbook grid for index page ── */
.garage-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 1.5rem;
}

@media (min-width: 640px) {
    .garage-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .garage-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.25rem;
    }
}

@media (min-width: 1280px) {
    .garage-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ── Description block styling ── */
.project-desc {
    padding: 2rem;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.04);
    border-left: 3px solid rgba(255,255,255,0.08);
    margin-bottom: 3rem;
}

.project-desc__label {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.5625rem;
    color: rgba(255,255,255,0.3);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    margin-bottom: 0.75rem;
}

.project-desc__text {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9375rem;
    color: rgba(255,255,255,0.6);
    line-height: 1.75;
    white-space: pre-line;
}

/* ══════════════════════════════════════════════════════════
   PARTNER — Work Photos Gallery
   ══════════════════════════════════════════════════════════ */

.work-gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

@media (min-width: 768px) {
    .work-gallery {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.75rem;
    }
}

.work-gallery__item {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    cursor: pointer;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    transition: border-color 0.4s ease, box-shadow 0.4s ease;
}

.work-gallery__item:hover {
    border-color: rgba(231, 34, 46, 0.3);
    box-shadow: 0 0 20px rgba(231, 34, 46, 0.08);
}

.work-gallery__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.work-gallery__item:hover img {
    transform: scale(1.08);
}

.work-gallery__caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0.75rem;
    background: linear-gradient(to top, rgba(0,0,0,0.85), transparent);
    transform: translateY(100%);
    transition: transform 0.35s ease;
}

.work-gallery__item:hover .work-gallery__caption {
    transform: translateY(0);
}

.work-gallery__caption span {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.75rem;
    color: rgba(255,255,255,0.8);
    line-height: 1.4;
}

/* ══════════════════════════════════════════════════════════
   PARTNER — Info Grid Cards
   ══════════════════════════════════════════════════════════ */

.partner-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.75rem;
}

.partner-info-card {
    padding: 1.5rem;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.partner-info-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--brand-primary), var(--brand-secondary), var(--brand-tertiary));
    opacity: 0;
    transition: opacity 0.4s ease;
}

.partner-info-card:hover {
    border-color: rgba(231, 34, 46, 0.2);
    background: rgba(255,255,255,0.04);
}

.partner-info-card:hover::before {
    opacity: 0.6;
}

.partner-info-card__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    background: rgba(231, 34, 46, 0.08);
    border: 1px solid rgba(231, 34, 46, 0.15);
    color: var(--brand-primary);
    margin-bottom: 0.75rem;
}

/* ══════════════════════════════════════════════════════════
   PARTNER — Logo Glow
   ══════════════════════════════════════════════════════════ */

.partner-logo-glow {
    box-shadow:
        0 0 30px rgba(231, 34, 46, 0.08),
        0 0 60px rgba(231, 34, 46, 0.04);
    transition: box-shadow 0.5s ease;
}

.partner-logo-glow:hover {
    box-shadow:
        0 0 40px rgba(231, 34, 46, 0.15),
        0 0 80px rgba(231, 34, 46, 0.08);
}

/* ══════════════════════════════════════════════════════════
   PARTNER — Calendar Date Picker
   ══════════════════════════════════════════════════════════ */

.visit-calendar {
    background: #111111;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 0.5rem;
    box-shadow: 0 20px 40px rgba(0,0,0,0.8);
    max-width: 420px;
    user-select: none;
    z-index: 50;
}

.visit-calendar__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.visit-calendar__title {
    font-family: 'Russo One', sans-serif;
    font-size: 0.875rem;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.visit-calendar__nav {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.visit-calendar__nav:hover {
    color: var(--brand-primary);
    border-color: var(--brand-primary);
    background: rgba(231, 34, 46, 0.08);
}

.visit-calendar__weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    padding: 0.75rem 0.75rem 0;
    gap: 0.25rem;
}

.visit-calendar__weekdays span {
    text-align: center;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.625rem;
    font-weight: 600;
    color: rgba(255,255,255,0.3);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 0.25rem 0;
}

.visit-calendar__days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    padding: 0.5rem 0.75rem;
    gap: 0.25rem;
}

.visit-calendar__day {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.75rem;
    color: rgba(255,255,255,0.7);
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 0;
    position: relative;
}

.visit-calendar__day:hover:not(.visit-calendar__day--disabled):not(.visit-calendar__day--empty) {
    background: rgba(231, 34, 46, 0.15);
    color: #fff;
}

.visit-calendar__day--empty {
    cursor: default;
}

.visit-calendar__day--disabled {
    color: rgba(255,255,255,0.15);
    cursor: not-allowed;
}

.visit-calendar__day--today {
    border: 1px solid rgba(255,255,255,0.2);
    color: #fff;
    font-weight: 600;
}

.visit-calendar__day--selected {
    background: var(--brand-primary) !important;
    color: #000 !important;
    font-weight: 700;
}

.visit-calendar__day--start {
    border-radius: 0;
}

.visit-calendar__day--end {
    border-radius: 0;
}

.visit-calendar__day--range {
    background: rgba(231, 34, 46, 0.12);
    color: rgba(255,255,255,0.9);
}

.visit-calendar__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.25rem;
    border-top: 1px solid rgba(255,255,255,0.06);
}

.visit-calendar__selected {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.75rem;
    color: rgba(255,255,255,0.5);
    letter-spacing: 0.03em;
}

.visit-calendar__clear {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.625rem;
    color: rgba(255,255,255,0.3);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    cursor: pointer;
    background: none;
    border: 1px solid rgba(255,255,255,0.08);
    padding: 0.25rem 0.75rem;
    transition: all 0.3s ease;
}

.visit-calendar__clear:hover {
    color: var(--brand-primary);
    border-color: var(--brand-primary);
}

/* ══════════════════════════════════════════════════════════
   PARTNER — Visit Form Card
   ══════════════════════════════════════════════════════════ */

.visit-form-card {
    position: relative;
}

.visit-form-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--brand-primary), var(--brand-secondary), var(--brand-tertiary));
    opacity: 0.4;
}

/* ══════════════════════════════════════════════════════════
   LIGHTBOX — Navigation Arrows
   ══════════════════════════════════════════════════════════ */

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.4);
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(0,0,0,0.5);
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 2;
}

.lightbox-nav:hover {
    color: var(--brand-primary);
    border-color: var(--brand-primary);
    background: rgba(231, 34, 46, 0.1);
}

.lightbox-nav--prev {
    left: 1.5rem;
}

.lightbox-nav--next {
    right: 1.5rem;
}

@media (max-width: 768px) {
    .lightbox-nav {
        width: 2.5rem;
        height: 2.5rem;
    }
    .lightbox-nav--prev { left: 0.5rem; }
    .lightbox-nav--next { right: 0.5rem; }
}

.lightbox-counter {
    position: absolute;
    top: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'Montserrat', sans-serif;
    font-size: 0.6875rem;
    color: rgba(255,255,255,0.35);
    letter-spacing: 0.15em;
}