/* ==========================================================================
   1. CSS VARIABLEN (High-End Sports Style "Ruckus")
   ========================================================================== */
:root {
    --bbc-green: #0c5729;       
    --bbc-green-glow: rgba(12, 87, 41, 0.4); 

    --bg-body: #050505; 
    --bg-card: rgba(255, 255, 255, 0.03); 
    --text-main: #ffffff;
    --text-muted: #bbbbbb; 
    --card-border: rgba(255, 255, 255, 0.08);
    --shadow: 0 20px 40px rgba(0,0,0,0.7);
    
    --btn-color: #ffffff;
    --btn-text: #000000;
}

@media (prefers-color-scheme: light) {
    :root {
        --bg-body: #f4f4f4;
        --bg-card: rgba(255, 255, 255, 0.8); 
        --text-main: #111111;
        --text-muted: #555555;
        --card-border: rgba(0, 0, 0, 0.1);
        --shadow: 0 15px 30px rgba(0,0,0,0.08);
        --btn-color: #111111;
        --btn-text: #ffffff;
    }
}

/* ==========================================================================
   2. GRUNDLAGEN & TYPOGRAFIE
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--text-main);
    background-color: var(--bg-body);
    line-height: 1.6;
    overflow-x: hidden; 
    transition: background-color 0.3s, color 0.3s; 
}

h1, h2, h3, h4 {
    text-transform: uppercase;
    font-weight: 900;
    letter-spacing: -0.03em;
    line-height: 1.05;
}

h1 {
    font-size: clamp(2rem, 6vw, 4.5rem); 
    color: var(--text-main);
    margin-bottom: 1rem;
    hyphens: none;
}

h1 span, h2 span {
    color: var(--bbc-green);
}

h2 { font-size: clamp(2rem, 5vw, 4rem); margin-bottom: 1.5rem; }
h3 { font-size: clamp(1.2rem, 3vw, 2rem); margin-bottom: 1rem; color: var(--text-main); }

/* ==========================================================================
   3. KOPFZEILE, LOGO & NAVIGATION
   ========================================================================== */
header {
    background-color: rgba(5, 5, 5, 0.6); 
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--card-border);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1400px; 
    margin: 0 auto;
    padding: 0.6rem 2rem; 
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.header-logo {
    height: 65px; 
    width: auto;
    display: block;
    transition: transform 0.3s ease;
    filter: drop-shadow(0 0 10px rgba(255,255,255,0.1)); 
}

.header-logo:hover {
    transform: scale(1.03);
}

.mobile-menu-toggle { display: none; }

.hamburger {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    z-index: 1002;
}

.hamburger span {
    width: 30px;
    height: 3px;
    background-color: var(--text-main);
    border-radius: 3px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.main-menu {
    list-style: none;
    display: flex;
    gap: 2rem;
    z-index: 1001;
}

.main-menu li { position: relative; }

.main-menu a {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    padding: 0.5rem 0;
    display: block;
    transition: color 0.2s;
}

.main-menu a:hover { color: var(--bbc-green); }

.dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: rgba(5, 5, 5, 0.98);
    backdrop-filter: blur(15px);
    min-width: 240px;
    box-shadow: var(--shadow);
    list-style: none;
    z-index: 1001;
    border-radius: 0 0 12px 12px;
    border: 1px solid var(--card-border);
    border-top: 3px solid var(--bbc-green);
    overflow: hidden;
}

.main-menu li:hover > .dropdown { display: block; }
.dropdown li { position: relative; }
.dropdown a {
    padding: 1rem 1.2rem;
    border-bottom: 1px solid var(--card-border);
    font-size: 0.85rem;
}
.dropdown a:hover { background-color: rgba(255,255,255,0.05); }
.dropdown .dropdown {
    top: 0;
    left: 100%;
    border-top: none;
    border-left: 3px solid var(--bbc-green);
    border-radius: 0 12px 12px 12px;
}

/* ==========================================================================
   4. BENTO-GRID & GLASSMORPHISM
   ========================================================================== */
main {
    max-width: 1400px;
    margin: 4rem auto;
    padding: 0 2rem;
}

.bento-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 2rem;
    grid-auto-flow: dense; 
}

.bento-box {
    background-color: var(--bg-card);
    backdrop-filter: blur(35px); 
    -webkit-backdrop-filter: blur(35px);
    border: 1px solid var(--card-border);
    border-radius: 24px; 
    padding: 3rem;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
    transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), border-color 0.4s ease, backdrop-filter 0.4s ease;
}

.bento-box:hover {
    transform: translateY(-8px);
    border-color: rgba(12, 87, 41, 0.5); 
    backdrop-filter: blur(40px);
}

.span-2 { grid-column: span 2; }
.span-full { grid-column: 1 / -1; }

.desktop-spacer { display: block; pointer-events: none; }
.mobile-window-spacer { display: none; pointer-events: none; }

/* KUGELSICHERE WILLKOMMENS-KACHEL (Mobile First!) */
.welcome-header { 
    display: flex; 
    flex-direction: column; 
    gap: 1.5rem; 
}

.welcome-header h1 { 
    margin-bottom: 0; 
}

.welcome-text-btn { 
    display: flex; 
    flex-direction: column; 
    gap: 1.5rem; 
    width: 100%;
}

.welcome-text-btn p { 
    margin-bottom: 0 !important; 
}

.welcome-text-btn .btn {
    width: 100%; /* Auf dem Handy IMMER 100% Breite, kein Abschneiden! */
    text-align: center;
    justify-content: center;
}

/* Tablet (z.B. ab 768px): Text und Button rutschen nebeneinander */
@media (min-width: 768px) {
    .welcome-text-btn {
        flex-direction: row;
        align-items: center;
    }
    .welcome-text-btn p {
        flex: 1 1 auto;
    }
    .welcome-text-btn .btn {
        width: auto;
        flex-shrink: 0;
    }
}

/* Desktop (z.B. ab 1300px): Alles in eine einzige flache Reihe */
@media (min-width: 1300px) {
    .welcome-header {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 3rem;
    }
    .welcome-header h1 {
        flex-shrink: 0;
    }
    .welcome-text-btn {
        flex: 1 1 auto;
    }
}

.bento-box p { 
    color: var(--text-muted); 
    margin-bottom: 2rem; 
    flex-grow: 1; 
    font-size: clamp(0.95rem, 2.5vw, 1.1rem);
}

.bento-image-header {
    margin: -3rem -3rem 2rem -3rem;
    width: calc(100% + 6rem);
    height: auto;
    display: block; 
    border-bottom: 1px solid var(--card-border);
    transition: transform 0.5s ease;
}

.bento-box:hover .bento-image-header {
    transform: scale(1.03); 
}

/* ==========================================================================
   5. BUTTONS (Ruckus Style)
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: var(--btn-color);
    color: var(--btn-text);
    padding: 1rem 2.5rem;
    border-radius: 50px; 
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: 1px;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: clamp(0.85rem, 2vw, 0.95rem);
    white-space: normal;
    text-align: center;
    word-wrap: break-word;
    max-width: 100%;
}

.btn:hover { 
    background-color: var(--bbc-green); 
    color: #ffffff;
    box-shadow: 0 0 20px var(--bbc-green-glow);
}

.btn-primary { 
    background-color: var(--bbc-green); 
    color: #ffffff;
}
.btn-primary:hover { 
    background-color: var(--text-main); 
    color: var(--bg-body);
    box-shadow: 0 0 20px rgba(255,255,255,0.2);
}

.nachruf-text {
    white-space: normal;
    font-size: clamp(0.95rem, 2.5vw, 1.1rem);
    color: var(--text-muted) !important;
}

/* ==========================================================================
   6. SCROLL-DRIVEN ANIMATIONS (Kacheln)
   ========================================================================== */
@keyframes fade-in-up {
    from { opacity: 0; transform: translateY(60px); filter: blur(10px); }
    to { opacity: 1; transform: translateY(0); filter: blur(0); }
}

@supports (animation-timeline: view()) {
    .animate-on-scroll {
        animation: fade-in-up cubic-bezier(0.2, 0.8, 0.2, 1) both;
        animation-timeline: view();
        animation-range: entry 10% cover 25%; 
    }
}

/* ==========================================================================
   7. NEUER FESTER HINTERGRUND & MITTIGER SPIELER
   ========================================================================= */
.background-wrapper {
    position: fixed; 
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: -2; 
    pointer-events: none; 
    overflow: hidden;
    background-image: url('assets/img/hintergrund.jpg');
    background-size: cover;
    background-position: center;
}

.background-wrapper::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5); 
    z-index: 0;
}

.interactive-bg-link {
    position: fixed; 
    bottom: 0; 
    left: 50%; 
    transform: translateX(-50%); 
    z-index: -1; 
    pointer-events: auto; 
    cursor: pointer;
    display: block; 
}

.static-player {
    height: 95vh; 
    width: auto;
    min-height: 500px;
    max-height: 1000px; 
    opacity: 0.95; 
    filter: drop-shadow(0 0 40px rgba(0,0,0,1)); 
    display: block;
    transition: filter 0.3s ease, transform 0.3s ease, opacity 0.3s ease;
}

.interactive-bg-link:hover .static-player {
    filter: drop-shadow(0 0 50px rgba(12, 87, 41, 0.9)); 
    transform: scale(1.02) translateY(-10px); 
    opacity: 1; 
}

/* ==========================================================================
   8. FOOTER
   ========================================================================== */
footer {
    background-color: rgba(5, 5, 5, 0.98);
    backdrop-filter: blur(20px);
    color: #ffffff;
    padding: 5rem 2rem 2rem;
    margin-top: 6rem;
    border-top: 1px solid var(--card-border);
}

.footer-grid {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 3rem;
    align-items: flex-start;
}

.footer-logo {
    height: 130px;
    width: auto;
    filter: drop-shadow(0 0 15px rgba(255,255,255,0.15));
}

.footer-grid h4 { 
    margin-bottom: 1.5rem; 
    color: var(--bbc-green); 
    font-size: 1.2rem;
}

.footer-grid p, .footer-grid a {
    color: var(--text-muted);
    text-decoration: none;
    display: block;
    margin-bottom: 0.8rem;
    transition: color 0.2s;
    font-size: 0.95rem;
}

.footer-grid a:hover { color: #ffffff; }

.copyright {
    text-align: center;
    margin-top: 5rem;
    padding-top: 2rem;
    border-top: 1px solid var(--card-border);
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ==========================================================================
   9. RESPONSIVE / MOBILE ANSICHTEN
   ========================================================================== */
/* Tablet & kleine Laptops (bricht auf 2 Spalten um) */
@media (max-width: 1200px) {
    .bento-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .span-2 { grid-column: span 1; }
    .span-full { grid-column: 1 / -1; } 
    
    .desktop-spacer { display: none; }
    
    .mobile-window-spacer { 
        display: block; 
        grid-column: 1 / -1; 
        height: 15vh; 
        min-height: 120px;
    }
}

/* Handys (alles untereinander) */
@media (max-width: 992px) {
    .header-logo { height: 50px; } 

    .hamburger { display: flex; }

    .main-menu {
        display: none; 
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: rgba(5, 5, 5, 0.99);
        padding: 2rem;
        border-bottom: 1px solid var(--card-border);
    }

    .mobile-menu-toggle:checked ~ .main-menu { display: flex; }

    .mobile-menu-toggle:checked ~ .hamburger span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
    .mobile-menu-toggle:checked ~ .hamburger span:nth-child(2) { opacity: 0; }
    .mobile-menu-toggle:checked ~ .hamburger span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

    .main-menu li:hover > .dropdown {
        display: block;
        position: static;
        box-shadow: none;
        border: none;
        border-left: 2px solid var(--bbc-green);
        padding-left: 1.5rem;
        margin-top: 1rem;
        border-radius: 0;
        background: transparent;
    }
    
    .bento-grid {
        grid-template-columns: 1fr; 
    }
    .span-2, .span-full { grid-column: span 1; }
    
    .bento-box { padding: 1.5rem; }
    
    .bento-image-header {
        margin: -1.5rem -1.5rem 1.5rem -1.5rem;
        width: calc(100% + 3rem);
    }

    .static-player {
        height: 75vh; 
        max-height: 700px;
        opacity: 0.85; 
    }
}

/* ==========================================================================
   10. KONTAKT-MODAL (POPUP FORMULAR)
   ========================================================================== */
.modal-overlay {
    display: none; 
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    z-index: 3000;
    justify-content: center;
    align-items: center;
    padding: 1.5rem;
}

.modal-content {
    background-color: rgba(10, 10, 10, 0.95);
    border: 1px solid var(--bbc-green);
    border-radius: 24px;
    padding: 3rem;
    width: 100%;
    max-width: 550px;
    position: relative;
    box-shadow: 0 0 50px rgba(12, 87, 41, 0.3);
    color: var(--text-main);
}

.close-modal {
    position: absolute;
    top: 1.5rem;
    right: 2rem;
    font-size: 2.5rem;
    color: var(--text-muted);
    cursor: pointer;
    background: none;
    border: none;
    line-height: 1;
    transition: color 0.3s;
}

.close-modal:hover {
    color: var(--bbc-green);
}

.form-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.form-group input, 
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border-radius: 12px;
    border: 1px solid var(--card-border);
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s, background 0.3s;
}

.form-group input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(1);
    cursor: pointer;
}

.form-group input:focus, 
.form-group textarea:focus {
    outline: none;
    border-color: var(--bbc-green);
    background: rgba(255, 255, 255, 0.1);
}