/**
 * Spatzabrettle Modern Design System
 * Based on index_test.php aesthetics
 */

:root {
    --primary-color: #E31E24;
    --primary-hover: #b01318;
    --text-dark: #1a1a1a;
    --text-muted: #64748b;
    --bg-light: #f8fafc;
    --nav-height: 90px;
    --nav-height-scrolled: 80px;
    --font-main: 'Open Sans', system-ui, -apple-system, sans-serif;
}

/* =========================================================================
   GLOBAL OVERRIDES
   ========================================================================= */
body {
    font-family: var(--font-main);
    color: #2d3748;
    background-color: #ffffff;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { transition: all 0.3s; text-decoration: none; }

/* Hide legacy Siquando elements across all views and devices */
#filltop, 
.site-header,
#extra,
#header,
#logo,
.topheader {
    display: none !important;
    height: 0 !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* =========================================================================
   MODERN NAVIGATION (Glass-Nav)
   ========================================================================= */
.glass-nav {
    position: fixed; top: 0; left: 0; right: 0; height: var(--nav-height);
    background: transparent;
    display: flex; justify-content: space-between; align-items: center;
    padding: 0 5%; z-index: 1000;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.nav-links {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}
.glass-nav.is-scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 4px 30px rgba(0,0,0,0.08);
    height: var(--nav-height-scrolled);
}
.glass-nav .logo img {
    height: 50px; width: auto;
    transition: transform 0.3s;
}
.glass-nav.is-scrolled .logo img { filter: none !important; background: transparent !important; }
.glass-nav .logo:hover img { transform: scale(1.05); }

.nav-links { display: flex; gap: 2.5rem; list-style: none; margin: 0; padding: 0; }
.nav-links li { margin: 0; }
.nav-links a {
    color: #ffffff; font-weight: 700; text-transform: uppercase;
    font-size: 0.9rem; letter-spacing: 1px;
    text-decoration: none;
}
.glass-nav.is-scrolled .nav-links a { color: #1a1a1a; }
.nav-links a:hover { color: var(--primary-color); }
.nav-links a { text-decoration: none !important; }

/* Remove logo glow/white glare */
.glass-nav .logo img {
    filter: none !important;
    background: transparent !important;
    box-shadow: none !important;
}

.mobile-toggle { display: none; background: transparent; border: none; cursor: pointer; width: 30px; height: 24px; position: relative; z-index: 1001; }
.mobile-toggle span { display: block; width: 100%; height: 3px; background: #ffffff; position: absolute; left: 0; transition: all 0.3s ease; border-radius: 2px; }
.glass-nav.is-scrolled .mobile-toggle span { background: #1a1a1a; }
.mobile-toggle span:nth-child(1) { top: 0; }
.mobile-toggle span:nth-child(2) { top: 10.5px; }
.mobile-toggle span:nth-child(3) { bottom: 0; }
.mobile-toggle.is-active span { background: #1a1a1a !important; }
.mobile-toggle.is-active span:nth-child(1) { transform: translateY(10.5px) rotate(45deg); }
.mobile-toggle.is-active span:nth-child(2) { opacity: 0; }
.mobile-toggle.is-active span:nth-child(3) { transform: translateY(-10.5px) rotate(-45deg); }

/* =========================================================================
   CINEMATIC HERO
   ========================================================================= */
.hero-cinematic {
    height: 100vh; min-height: 600px;
    display: flex; align-items: center; justify-content: center;
    position: relative; text-align: center; color: #ffffff;
    overflow: hidden;
}
.hero-bg {
    position: absolute; inset: 0;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    z-index: 1;
}
.hero-bg::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.3) 50%, rgba(0,0,0,0.8) 100%);
}
.hero-content {
    position: relative; z-index: 2; max-width: 900px; padding: 0 20px;
    animation: fadeUp 1s ease-out forwards;
}
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}
.hero-kicker {
    font-size: 2rem; font-weight: 800; letter-spacing: 4px; text-transform: uppercase;
    color: var(--primary-color); margin-bottom: 1.5rem; display: block;
    text-shadow: 0 1px 4px rgba(0,0,0,0.7), 0 0 12px rgba(0,0,0,0.5);
}
.hero-content h1 {
    font-size: clamp(3rem, 8vw, 6rem); font-weight: 900; line-height: 1;
    margin-bottom: 1.5rem; text-transform: uppercase; letter-spacing: -2px;
}
.hero-content p {
    font-size: clamp(1.1rem, 2vw, 1.4rem); font-weight: 300; margin-bottom: 3rem;
    color: #e2e8f0; line-height: 1.6;
}

/* =========================================================================
   MODERN PROGRAMM GRID
   ========================================================================= */
.section-programm { padding: 4rem 5%; max-width: 1600px; margin: 0 auto; }
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    list-style: none;
    padding: 0;
}
.gallery-item {
    display: flex;
    flex-direction: column;
    position: relative;
    background: #ffffff;
    height: 100%;
    padding: 0;
    margin: 0;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
}

.g-content-wrap {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    padding: 0 1rem 1.25rem;
}

.g-image {
    width: 100%; aspect-ratio: 4 / 3;
    border-radius: 0; overflow: hidden; margin-bottom: 1.5rem;
    position: relative;
    background: linear-gradient(135deg, #e5e7eb 0%, #d1d5db 100%);
    display: block;
}
.g-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.7s cubic-bezier(0.25, 1, 0.5, 1); }
.gallery-item:hover .g-image img { transform: scale(1.05); }

.g-date-badge {
    position: absolute; top: 15px; left: 15px;
    background: rgba(255,255,255,0.95); backdrop-filter: blur(5px);
    padding: 8px 12px; border-radius: 6px; font-weight: 900; font-size: 0.85rem;
    color: #1a1a1a; text-transform: uppercase; letter-spacing: 1px;
    z-index: 1;
}
.g-extra-badge {
    position: absolute; bottom: 12px; right: 12px;
    background: #16a34a; color: #fff;
    font-size: 0.65rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em;
    padding: 4px 8px; border-radius: 3px; z-index: 2;
    white-space: nowrap;
}

/* Kachel: ganzes Card per Overlay klickbar */
.g-card-link {
    position: absolute; inset: 0; z-index: 0;
    display: block;
}
.gallery-item a:not(.g-card-link),
.gallery-item button { position: relative; z-index: 1; }
.g-artist { font-size: 0.8rem; font-weight: 800; color: var(--primary-color); text-transform: uppercase; letter-spacing: 2px; margin-bottom: 0.3rem; display: block; }
.g-title  { font-size: 1.4rem; font-weight: 900; color: #1a1a1a; margin-bottom: 0.8rem; line-height: 1.2; letter-spacing: -0.5px; min-height: 2.4em; display: flex; align-items: center; }
.g-desc   { font-size: 0.95rem; color: var(--text-muted); margin-bottom: 1.5rem; line-height: 1.6; flex-grow: 1; }

.g-status {
    display: block; padding: 6px 12px; border-radius: 4px;
    font-size: 0.75rem; font-weight: 800; text-transform: uppercase; letter-spacing: 1px;
    margin: 0 1rem 1rem; border: 1px solid;
    box-sizing: border-box; text-align: center;
}
.status-ok     { color: #10b981; border-color: rgba(16,185,129,0.3); background: rgba(16,185,129,0.05); }
.status-low    { color: #f59e0b; border-color: rgba(245,158,11,0.3); background: rgba(245,158,11,0.05); }
.status-urgent { color: #ef4444; border-color: rgba(239,68,68,0.3);  background: rgba(239,68,68,0.05); }

.btn-primary, .btn-outline {
    display: inline-block; text-align: center; border: 2px solid transparent; border-radius: 4px;
    font-weight: 800; text-transform: uppercase; letter-spacing: 1px;
    transition: all 0.3s;
}
.btn-primary {
    background: var(--primary-color); color: #ffffff !important;
    padding: 18px 40px; font-size: 1rem;
    box-shadow: 0 10px 25px rgba(227,30,36,0.4);
}
.btn-primary:hover { background: var(--primary-hover); transform: translateY(-3px); box-shadow: 0 15px 35px rgba(227,30,36,0.5); }

.btn-outline {
    padding: 12px; border-color: #e2e8f0;
    font-size: 0.85rem; color: #1a1a1a;
    display: block; margin: 0 1rem 1rem;
}
.btn-outline:hover { border-color: #1a1a1a; background: #1a1a1a; color: #ffffff; }
.btn-outline.red { background: var(--primary-color); color: #ffffff !important; border-color: var(--primary-color); }
.btn-outline.red:hover { background: var(--primary-hover); border-color: var(--primary-hover); }

/* Fix Contact Form Submit Button Visibility */
.ngform input[type="submit"].btn-primary {
    display: block;
    width: 100%;
    margin-top: 2rem;
    cursor: pointer;
    border: none;
    background: var(--primary-color) !important;
    color: #ffffff !important;
    padding: 20px !important;
    font-size: 1.1rem !important;
    box-shadow: 0 10px 25px rgba(227,30,36,0.4) !important;
    opacity: 1 !important;
    visibility: visible !important;
}
.ngform input[type="submit"].btn-primary:hover {
    background: var(--primary-hover) !important;
    transform: translateY(-2px);
}

.gallery-item.past {
    opacity: 0.45;
    pointer-events: none;
    filter: grayscale(100%);
}
.gallery-item.past .g-date-badge { background: #1a1a1a; color: #ffffff; }

/* =========================================================================
   SECTIONS
   ========================================================================= */
.section-header { text-align: center; margin-bottom: 5rem; }

/* Erste Überschrift nach dem Hero — einheitlicher Abstand */
.page-subtitle {
    font-size: clamp(1.5rem, 4vw, 3rem);
    font-weight: 900;
    color: #1a1a1a;
    text-transform: uppercase;
    letter-spacing: -1px;
    text-align: center;
    overflow-wrap: break-word;
    margin: 0 0 2rem;
}
/* Legacy-Siquando-Wrapper: kein eigenes padding → Abstand über content-wrapper */
#content > .content-wrapper { padding-top: 2.5rem; }
.section-header h2 { font-size: clamp(1.5rem, 4vw, 3rem); font-weight: 900; color: #1a1a1a; text-transform: uppercase; letter-spacing: -1px; overflow-wrap: break-word; }
.section-header .line { width: 60px; height: 4px; background: var(--primary-color); margin: 20px auto 0; }

.intro-section { padding: 0 5% 4rem; text-align: center; }
.intro-wrapper { max-width: 800px; margin: 0 auto; }
.intro-wrapper h3 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 900; color: #ffffff; margin-bottom: 2rem; letter-spacing: -1px; }
.intro-wrapper p { font-size: 1.15rem; color: #475569; line-height: 1.8; margin-bottom: 1.5rem; }
.intro-wrapper strong { color: #1a1a1a; font-weight: 800; }
.intro-teaser-link { color: var(--primary-color); font-weight: 700; border-bottom: 2px solid rgba(227,30,36,0.3); transition: border-color 0.2s; }
.intro-teaser-link:hover { border-color: var(--primary-color); }

/* =========================================================================
   FOOTER
   ========================================================================= */
.minimal-footer { background: #0f172a; color: #94a3b8; padding: 6rem 5% 3rem; font-size: 0.95rem; margin-top: 4rem; }
.footer-mobile-contact { display: none; }
.footer-mobile-contact a { font-weight: 600; }
.footer-mobile-contact a:hover { color: #ffffff; }
.footer-mobile-sep { margin: 0 0.5rem; color: rgba(255,255,255,0.25); }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 4rem; max-width: 1400px; margin: 0 auto 4rem; }
.footer-col { text-align: left; }
.minimal-footer .footer-col p { text-align: left; }

/* Mobil: Adress- und Kontaktspalte ausblenden (bereits im footer-mobile-contact) */
@media (max-width: 1023px) {
    .footer-col:first-child,
    .footer-col:last-child { display: none; }
    .footer-desktop-only { display: none !important; }
    .footer-col h4 { display: none; }
    .minimal-footer .footer-col a { color: #94a3b8; }
}
.footer-col h4 { color: #ffffff; font-size: 1.1rem; font-weight: 800; margin-bottom: 1.5rem; text-transform: uppercase; letter-spacing: 2px; }
.minimal-footer .footer-col a { color: #94a3b8; display: block; margin-bottom: 0.8rem; font-weight: 500; }
.minimal-footer .footer-col p a { display: inline; }
.minimal-footer .footer-col a:hover { color: #ffffff; }
.footer-bottom { text-align: center; padding-top: 2rem; border-top: 1px solid rgba(255,255,255,0.05); }

/* =========================================================================
   RESPONSIVE
   ========================================================================= */
@media (max-width: 1200px) {
    .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 4rem 2rem; }
}
@media (max-width: 992px) {
    .nav-links { position: fixed; top: 0; left: 0; right: 0; bottom: 0; transform: translateY(-100%); background: #ffffff; flex-direction: column; justify-content: center; align-items: center; gap: 3rem; opacity: 0; transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1); z-index: -1; }
    .nav-links.nav-active { transform: translateY(0); opacity: 1; }
    .nav-links a { color: #1a1a1a; font-size: 1.5rem; font-weight: 900; }
    .mobile-toggle { display: block; }
}
@media (max-width: 768px) {
    .gallery-grid { grid-template-columns: 1fr; }
    .footer-mobile-contact { display: block; }
    .intro-section { padding: 1rem 5%; }
    .section-programm { padding: 2rem 5%; }

    /* Parallax-Sticky: "DAS AKTUELLE PROGRAMM" klebt oben */
    .section-header {
        position: sticky;
        top: 80px;
        z-index: 40;
        background: #fff;
        padding: 0.75rem 0 0.5rem;
        margin-bottom: 0.75rem;
        transition: opacity 0.3s, padding 0.2s;
    }
    .section-header.is-stuck {
        padding: 1.25rem 0 1rem;
    }
    .section-header h2 { font-size: clamp(1.1rem, 4.5vw, 1.4rem); margin: 0; overflow-wrap: break-word; }
    .hero-content h1 { font-size: clamp(1.6rem, 7vw, 3rem); overflow-wrap: break-word; }
    .hero-kicker { font-size: clamp(0.9rem, 3.5vw, 1.5rem); letter-spacing: 2px; }
    .section-header .line { margin-top: 8px; }
    .section-header.cta-active {
        opacity: 0;
        pointer-events: none;
    }

    /* CTA klebt unten, Intro scrollt drunter durch */
    .cta-center {
        position: sticky !important;
        bottom: 0;
        z-index: 40;
        background: #fff;
        padding: 0.75rem 1.5rem !important;
        box-shadow: 0 -4px 20px rgba(0,0,0,0.1);
        margin-top: 0 !important;
    }
    .cta-center .btn-primary {
        width: 100%;
        box-sizing: border-box;
        padding: 15px 20px;
    }
}
