/* ==========================================================================
   AGILE AUTOMOTIVE - MASTER STYLESHEET
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. ROOT VARIABLES & BASE RESETS
   -------------------------------------------------------------------------- */
:root {
    --black: #080808;
    --dark: #101010;
    --anthracite: #181818;
    --mid: #222222;
    --light-grey: #999999;
    --off-white: #C8C8C0;
    --white: #FFFFFF;
    --orange: #E07000;
    --orange-bright: #FF7700;
    --font-display: 'Rajdhani', sans-serif;
    --font-body: 'Inter', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--black);
    color: var(--white);
    font-family: var(--font-body);
    overflow-x: hidden;
    line-height: 1.6;
}

/* --------------------------------------------------------------------------
   2. DESKTOP NAVIGATION & HEADER
   -------------------------------------------------------------------------- */
#navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 50px;
    z-index: 1000;
    transition: background 0.3s ease, padding 0.3s ease;
    background: linear-gradient(to bottom, rgba(8,8,8,0.9) 0%, rgba(8,8,8,0) 100%);
}

#navbar.scrolled {
    background: rgba(8, 8, 8, 0.95);
    padding: 15px 50px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.nav-logo img {
    height: 36px;
    width: auto;
    display: block;
    filter: brightness(0) invert(1); /* Gør logoet kridhvidt, så det er synligt på alle mørke baggrunde */
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 32px;
    align-items: center;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.nav-links a {
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--off-white);
    text-decoration: none;
    transition: color 0.2s ease;
}

.nav-links a:hover {
    color: var(--white);
}

/* Desktop Dropdown */
.dropdown {
    position: relative;
}

.dropdown-content {
    display: none;
    position: absolute;
    background: rgba(8, 8, 8, 0.97);
    border: 1px solid rgba(255, 255, 255, 0.10);
    min-width: 160px;
    top: 100%;
    left: -15px;
    padding: 10px 0;
    z-index: 100;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.dropdown-content a {
    padding: 10px 20px;
    display: block;
    font-size: 13px;
    color: var(--off-white);
}

.dropdown-content a:hover {
    color: var(--white);
    background: rgba(255, 255, 255, 0.05);
}

.dropdown:hover .dropdown-content {
    display: block;
}

/* Mobil-knap (skjult på pc/laptop) */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--white);
    font-size: 24px;
    cursor: pointer;
    padding: 5px;
    z-index: 1001;
}

/* --------------------------------------------------------------------------
   3. HERO SEKTION
   -------------------------------------------------------------------------- */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: flex-end;
    padding: 140px 80px 80px 80px;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    z-index: 1;
}

.hero-needle {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--orange), transparent);
    z-index: 3;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
}

.hero-eyebrow {
    font-family: var(--font-display);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.25em;
    color: var(--orange-bright);
    text-transform: uppercase;
    margin-bottom: 16px;
}

.hero-headline {
    font-family: var(--font-display);
    font-size: 64px;
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -0.02em;
    text-transform: uppercase;
    color: var(--white);
    margin-bottom: 24px;
}

.hero-sub {
    font-size: 16px;
    font-weight: 300;
    line-height: 1.7;
    color: var(--off-white);
    margin-bottom: 36px;
    max-width: 580px;
}

.hero-actions {
    display: flex;
    gap: 20px;
}

.btn-primary {
    display: inline-block;
    font-family: var(--font-display);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--black);
    background: var(--white);
    padding: 16px 36px;
    text-decoration: none;
    transition: background 0.2s, color 0.2s, transform 0.2s;
}

.btn-primary:hover {
    background: var(--orange-bright);
    color: var(--white);
}

/* --------------------------------------------------------------------------
   4. STATS RÆKKE & HOVEDINDHOLD
   -------------------------------------------------------------------------- */
.stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    background: var(--anthracite);
    border-top: 1px solid rgba(255,255,255,0.08);
    border-bottom: 1px solid rgba(255,255,255,0.08);
    padding: 40px 80px;
    gap: 40px;
}

.stat-item {
    text-align: left;
}

.stat-num {
    font-family: var(--font-display);
    font-size: 48px;
    font-weight: 700;
    color: var(--white);
    line-height: 1;
    margin-bottom: 8px;
}

.stat-unit {
    font-size: 24px;
    color: var(--orange-bright);
    margin-left: 2px;
}

.stat-label {
    font-family: var(--font-display);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--light-grey);
}

.content-section {
    padding: 100px 80px;
    background: var(--black);
}

.content-section.alt {
    background: var(--dark);
}

.content-header {
    max-width: 720px;
    margin-bottom: 60px;
}

.eyebrow {
    font-family: var(--font-display);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.25em;
    color: var(--orange-bright);
    text-transform: uppercase;
    margin-bottom: 12px;
}

h2 {
    font-family: var(--font-display);
    font-size: 40px;
    font-weight: 700;
    line-height: 1.15;
    text-transform: uppercase;
    color: var(--white);
    margin-bottom: 24px;
}

.content-header p {
    font-size: 16px;
    font-weight: 300;
    line-height: 1.7;
    color: var(--off-white);
}

/* --------------------------------------------------------------------------
   5. SPLIT SEKTIONER & FEATURE GRIDS
   -------------------------------------------------------------------------- */
.split {
    display: flex;
    min-height: 550px;
    background: var(--anthracite);
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.split-image {
    width: 50%;
    position: relative;
    min-height: 400px;
}

.split-img-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
}

.split-body {
    width: 50%;
    padding: 80px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.split-eyebrow {
    font-family: var(--font-display);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.25em;
    color: var(--orange-bright);
    text-transform: uppercase;
    margin-bottom: 12px;
}

.split-headline {
    font-family: var(--font-display);
    font-size: 36px;
    font-weight: 700;
    line-height: 1.2;
    text-transform: uppercase;
    color: var(--white);
    margin-bottom: 24px;
}

.split-body p {
    font-size: 15px;
    font-weight: 300;
    line-height: 1.7;
    color: var(--off-white);
    margin-bottom: 16px;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2px;
    background: var(--mid);
}

.feature-item {
    background: var(--anthracite);
    padding: 48px;
    position: relative;
}

.feature-item.alt {
    background: var(--dark);
}

.feature-bar {
    width: 30px;
    height: 2px;
    background: var(--orange);
    margin-bottom: 20px;
}

.feature-title {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--white);
    margin-bottom: 12px;
}

.feature-text {
    font-size: 14px;
    font-weight: 300;
    line-height: 1.7;
    color: var(--light-grey);
}

/* --------------------------------------------------------------------------
   6. TABELLER & FORMATIONER
   -------------------------------------------------------------------------- */
.spec-table {
    width: 100%;
    border-collapse: collapse;
}

.spec-table td {
    padding: 14px 0;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    font-size: 13px;
    font-weight: 300;
    color: var(--off-white);
}

.spec-table td:first-child {
    font-family: var(--font-display);
    font-weight: 600;
    letter-spacing: 0.1em;
    color: var(--white);
    width: 40%;
}

/* --------------------------------------------------------------------------
   7. FOOTER
   -------------------------------------------------------------------------- */
footer {
    background: var(--black);
    border-top: 1px solid rgba(255,255,255,0.08);
    padding: 80px 80px 40px 80px;
}

.footer-grid-custom {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 48px;
}

.footer-brand {
    margin-bottom: 24px;
}

.footer-brand img {
    height: 40px;
    margin-bottom: 24px;
    opacity: 1;
}

.footer-text-block {
    margin-bottom: 24px;
}

.footer-text-block p {
    font-size: 15px;
    line-height: 1.8;
    max-width: 480px;
    color: var(--light-grey);
}

.footer-contact p {
    font-size: 15px;
    color: var(--light-grey);
    line-height: 1.8;
}

.footer-contact a {
    color: var(--light-grey);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-contact a:hover {
    color: var(--white);
}

.social-links {
    display: flex;
    gap: 20px;
}

.social-links a {
    color: var(--light-grey);
    font-size: 24px;
    transition: color 0.2s;
}

.social-links a:hover {
    color: var(--white);
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.05);
    padding-top: 30px;
    font-size: 12px;
    color: var(--light-grey);
}

/* ==========================================================================
   8. RESPONSIV MOBIL & PORTRAIT STYLING (< 768px)
   ========================================================================== */
@media (max-width: 768px) {
    
    /* Navigation & Burgermenu */
    #navbar {
        padding: 15px 20px !important;
        justify-content: space-between !important;
    }

    .nav-toggle {
        display: block !important;
    }

    .nav-links {
        position: fixed !important;
        top: 65px;
        left: 0 !important;
        transform: none !important;
        width: 100%;
        background: rgba(8, 8, 8, 0.98) !important;
        flex-direction: column !important;
        align-items: center !important;
        padding: 25px 0 !important;
        gap: 20px !important;
        display: none !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        box-shadow: 0 10px 30px rgba(0,0,0,0.8);
    }

    .nav-links.mobile-active {
        display: flex !important;
    }

    /* Mobil Undermenu Opdeling & Åbn/Luk funktion */
    .dropdown {
        width: 100%;
        text-align: center;
    }

    /* Deaktiverer desktop-hover på mobil for at undgå konflikt med tryk */
    .dropdown:hover .dropdown-content {
        display: none !important;
    }

    .dropdown-content {
        position: static !important;
        display: none !important; /* Skjult som standard på mobil */
        background: rgba(255, 255, 255, 0.04) !important;
        border: 1px solid rgba(224, 112, 0, 0.3) !important;
        border-radius: 4px;
        margin: 12px auto !important;
        padding: 6px 0 !important;
        width: 85% !important;
    }

    /* Vises KUN når punktet er aktivt/åbent på mobil via .is-open */
    .dropdown.is-open .dropdown-content {
        display: block !important;
    }

    .dropdown-content a {
        font-size: 12px !important;
        color: var(--orange-bright) !important;
        padding: 10px 0 !important;
        letter-spacing: 0.16em !important;
        font-weight: 600 !important;
    }

    .dropdown-content a:hover {
        color: var(--white) !important;
        background: rgba(255, 255, 255, 0.05) !important;
    }

    /* Hero & Typografi Skalering */
    .hero {
        padding: 120px 20px 60px 20px !important;
        min-height: 80vh !important;
    }

    .hero-headline {
        font-size: 32px !important;
        line-height: 1.15 !important;
        letter-spacing: -0.01em !important;
    }

    .hero-eyebrow {
        font-size: 11px !important;
        letter-spacing: 0.18em !important;
    }

    .hero-sub {
        font-size: 14px !important;
        line-height: 1.6 !important;
    }

    h2, .split-headline {
        font-size: 26px !important;
        line-height: 1.2 !important;
    }

    .eyebrow {
        font-size: 11px !important;
    }

    /* Generelle Sektioner & Grid Stabling */
    .content-section, .gallery-header-section {
        padding: 50px 20px !important;
    }

    .stats-row {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 20px !important;
        padding: 30px 20px !important;
    }

    .stat-num {
        font-size: 32px !important;
    }

    .split {
        flex-direction: column !important;
        grid-template-columns: 1fr !important;
    }

    .split-image {
        width: 100% !important;
        height: 260px !important;
        min-height: 260px !important;
    }

    .split-body {
        padding: 40px 20px !important;
        width: 100% !important;
    }

    .feature-grid, 
    .dealers-grid-custom, 
    .cars-grid-full, 
    .cup-rounds-grid, 
    .track-performance-grid, 
    .contact-box-grid,
    .specs-grid {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }

    .dealer-card-full, .car-card-full, .cup-round-card, .track-perf-card, .contact-box {
        padding: 24px 20px !important;
    }

    .gallery-masonry {
        column-count: 1 !important;
        padding: 0 20px 40px 20px !important;
    }

    footer {
        padding: 50px 20px 30px 20px !important;
    }

    .footer-grid-custom {
        flex-direction: column !important;
        gap: 30px !important;
        align-items: flex-start !important;
    }

    .social-links {
        justify-content: flex-start !important;
    }
}

/* Små mobilskærme (< 400px) */
@media (max-width: 400px) {
    .stats-row {
        grid-template-columns: 1fr !important;
    }
    
    .hero-headline {
        font-size: 28px !important;
    }
}