/* BNI Drive — Custom styles (Tailwind handles base) */

:root {
    --bni-red: #c0232d;
    --bni-dark: #1a1a1a;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #fcfcfc;
    color: var(--bni-dark);
}

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

.bg-bni-red { background-color: var(--bni-red); }
.text-bni-red { color: var(--bni-red); }
.border-bni-red { border-color: var(--bni-red); }

/* Hero stats — first item number is red */
.hero-stats > [data-editor-item]:first-child [data-editor-id="number"] {
    color: var(--bni-red) !important;
}

.glass {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.card-hover {
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}
.card-hover:hover {
    transform: translateY(-10px);
    box-shadow: 0 30px 60px rgba(0,0,0,0.12);
}

.racing-gradient {
    background: linear-gradient(90deg, var(--bni-red) 0%, #6b0f14 100%);
}

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

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

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

/* Navbar — transparent at top, solid on scroll */
#navbar.nav-transparent {
    background: transparent;
    border-bottom-color: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

#navbar.nav-transparent,
#navbar.nav-transparent a,
#navbar.nav-transparent .nav-menu a {
    color: white;
}

#navbar.nav-transparent .hamburger span {
    background: white;
}

#navbar.nav-solid {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

#navbar.nav-solid,
#navbar.nav-solid a,
#navbar.nav-solid .nav-menu a {
    color: var(--bni-dark);
}

#navbar.nav-solid .hamburger span {
    background: var(--bni-dark);
}

/* CTA button keeps its own colors regardless of nav state */
#navbar a[href="#kontakt"] {
    color: white !important;
}

/* Mobile: always show solid navbar (no transparent state) */
@media (max-width: 767px) {
    #navbar.nav-transparent {
        background: rgba(255, 255, 255, 0.95) !important;
        backdrop-filter: blur(12px) !important;
        -webkit-backdrop-filter: blur(12px) !important;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05) !important;
    }
    #navbar.nav-transparent,
    #navbar.nav-transparent a,
    #navbar.nav-transparent .nav-menu a {
        color: var(--bni-dark) !important;
    }
    #navbar.nav-transparent .hamburger span {
        background: var(--bni-dark) !important;
    }
    /* Keep CTA button red with white text */
    #navbar.nav-transparent a[href="#kontakt"] {
        color: white !important;
    }
}

/* Hamburger — hidden on desktop */
.hamburger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    cursor: pointer;
    padding: 8px;
    z-index: 60;
    background: none;
    border: none;
}

@media (min-width: 768px) {
    .hamburger {
        display: none;
    }
}

.hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--bni-dark);
    transition: 0.3s;
    border-radius: 2px;
    transform-origin: center;
}

.hamburger span + span {
    margin-top: 6px;
}

.hamburger.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}
.hamburger.active span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
.hamburger.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* Mobile nav overlay */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: rgba(255,255,255,0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 0;
        opacity: 0;
        visibility: hidden;
        transition: 0.3s;
        z-index: 55;
    }

    .nav-menu.active {
        display: flex !important;
        opacity: 1;
        visibility: visible;
    }

    .nav-menu ul {
        list-style: none;
        padding: 0;
        margin: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0;
    }

    .nav-menu li {
        width: 100%;
        text-align: center;
    }

    .nav-menu a {
        display: block;
        padding: 20px;
        font-size: 1.5rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.1em;
        color: var(--bni-dark);
        text-decoration: none;
    }

    .nav-menu a:hover,
    .nav-menu a:active {
        color: var(--bni-red);
    }
}

/* Desktop nav menu — horizontal list */
.nav-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-menu li {
    white-space: nowrap;
}

.nav-menu a {
    text-decoration: none;
    color: var(--bni-dark);
    transition: color 0.3s;
    position: relative;
    padding-bottom: 4px;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 2px;
    background: var(--bni-red);
    transition: width 0.3s ease;
}

.nav-menu a:hover {
    color: var(--bni-red);
}

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

/* Footer nav links styling */
footer nav ul,
footer .footer-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

footer nav li,
footer .footer-nav li {
    margin-bottom: 1.25rem;
}

footer nav a,
footer .footer-nav a {
    color: rgb(107, 114, 128);
    font-size: 1.125rem;
    text-decoration: none;
    transition: color 0.3s;
}

footer nav a:hover,
footer .footer-nav a:hover {
    color: white;
}

/* Date picker buttons */
.date-picker-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.date-picker-btn {
    background: transparent;
    border: 1.5px solid rgba(0,0,0,0.1);
    border-radius: 2rem;
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--bni-dark);
    white-space: nowrap;
}

.date-picker-btn:hover {
    border-color: var(--bni-red);
    color: var(--bni-red);
}

.date-picker-btn.active {
    background: var(--bni-red);
    border-color: var(--bni-red);
    color: white;
}

/* Form styles matching design */
.nwl-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.nwl-form .nwl-form-field {
    display: flex;
    flex-direction: column;
}

.nwl-form .nwl-form-field label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 700;
    color: rgb(156, 163, 175);
    margin-bottom: 0.5rem;
    display: block;
}

.nwl-form .nwl-form-field input,
.nwl-form .nwl-form-field textarea,
.nwl-form .nwl-form-field select {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 3px solid rgba(0,0,0,0.1);
    border-radius: 0;
    padding: 0.6rem 0;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s;
    font-family: 'Inter', sans-serif;
    color: var(--bni-dark);
}

.nwl-form .nwl-form-field input:focus,
.nwl-form .nwl-form-field textarea:focus,
.nwl-form .nwl-form-field select:focus {
    border-color: var(--bni-red);
}

.nwl-form .nwl-form-field input::placeholder,
.nwl-form .nwl-form-field textarea::placeholder {
    color: rgb(180, 180, 180);
}

.nwl-form button[type="submit"],
.nwl-form .nwl-btn {
    width: 100%;
    background: var(--bni-red);
    color: white;
    padding: 1.25rem;
    border-radius: 2rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
    margin-top: 0.75rem;
    transition: background 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.nwl-form button[type="submit"]:hover,
.nwl-form .nwl-btn:hover {
    background: #7a161d;
}

/* Legal / prose content */
.prose h2 {
    font-family: 'Inter', sans-serif;
    font-size: 1.75rem;
    font-weight: 700;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    color: var(--bni-dark);
}

.prose h2:first-child {
    margin-top: 0;
}

.prose p {
    margin-bottom: 1rem;
    line-height: 1.8;
}

.prose ul {
    list-style-type: disc;
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

.prose li {
    margin-bottom: 0.5rem;
    line-height: 1.7;
}

.prose strong {
    font-weight: 700;
    color: var(--bni-dark);
}

.prose em {
    font-style: italic;
    color: rgb(107, 114, 128);
}

/* Mobile responsive fixes */
@media (max-width: 768px) {
    /* Prevent horizontal scroll */
    html, body {
        overflow-x: hidden;
    }

    /* Hero — prevent content overflow */
    section[id="hero"] {
        min-height: auto;
    }
    section[id="hero"] h1 {
        font-size: 3.5rem;
        word-break: break-word;
    }
    section[id="hero"] .px-6 {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    section[id="hero"] .text-xl {
        font-size: 1rem;
    }
    section[id="hero"] a {
        font-size: 0.75rem;
        padding: 1rem 1.5rem;
    }

    /* Hero counters — smaller on mobile */
    section[id="hero"] [data-editor-id="stats"] {
        gap: 0;
        flex-wrap: nowrap;
    }
    section[id="hero"] [data-editor-id="stats"] > div {
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
        flex: 1;
        min-width: 0;
    }
    section[id="hero"] [data-editor-id="stats"] > div:first-child {
        padding-left: 0 !important;
    }
    section[id="hero"] [data-editor-id="stats"] > div:last-child {
        padding-right: 0 !important;
    }
    section[id="hero"] [data-editor-id="stats"] .text-5xl {
        font-size: 1.75rem;
    }
    section[id="hero"] [data-editor-id="stats"] .text-\[10px\] {
        font-size: 7px;
        letter-spacing: 0.05em;
    }

    /* Contact section — full-width, no border-radius, no top gap on mobile */
    section[id="kontakt"] {
        padding: 0;
    }
    section[id="kontakt"] > .max-w-7xl {
        padding-left: 0;
        padding-right: 0;
        max-width: 100%;
    }
    section[id="kontakt"] .bg-bni-red {
        border-radius: 0;
        padding: 2rem 1.25rem;
    }

    /* Form card — less rounding on mobile */
    section[id="kontakt"] .bg-white.rounded-\[50px\] {
        border-radius: 1.5rem;
        padding: 1.5rem;
    }

    /* CTA branch section — full-width, flush with dark section above */
    section[data-editor-id="cta-branch"] {
        padding: 0;
        background: transparent;
    }
    section[data-editor-id="cta-branch"] > .max-w-7xl {
        padding: 0;
        max-width: 100%;
    }
    section[data-editor-id="cta-branch"] .rounded-\[80px\] {
        border-radius: 0;
    }
    section[data-editor-id="cta-branch"] .p-16 {
        padding: 2.5rem 1.25rem;
    }
    section[data-editor-id="cta-branch"] h3 {
        font-size: 2rem;
    }
    section[data-editor-id="cta-branch"] p {
        font-size: 1rem;
    }
    section[data-editor-id="cta-branch"] a {
        padding: 1rem 2rem;
        font-size: 0.85rem;
    }

    /* Stats bar — smaller numbers + remove gap between hero & stats */
    .racing-gradient .serif.italic {
        font-size: 2.5rem;
    }
    .racing-gradient {
        margin-top: -1px;
    }
}
