/* ============================================
   NeNa1 – Bau- & Wohngenossenschaft — Stylesheet
   Nachbau im Look der ursprünglichen Website
   ============================================ */

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --burgund: #962739;
    --burgund-dunkel: #7a1f2e;
    --oliv: #61812c;
    --oliv-dunkel: #4f6a23;
    --heading: #1e1e1e;
    --text: #474747;
    --hell: #f2f2f2;
    --weiss: #ffffff;
    --grau-mittel: #888888;
    --grau-border: #e2e2e2;

    --max-breite: 1100px;
    --header-h: 84px;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.65;
    color: var(--text);
    background-color: var(--weiss);
}

/* Typography */
h1, h2, h3, h4 {
    color: var(--heading);
    font-weight: 700;
    line-height: 1.25;
}

h1 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); }
h2 { font-size: clamp(1.4rem, 2.8vw, 1.9rem); }
h3 { font-size: 1.15rem; }
h4 { font-size: 1.05rem; }

p { margin-bottom: 1rem; }

a {
    color: var(--oliv);
    text-decoration: none;
    transition: color 0.15s ease;
}

a:hover {
    color: var(--burgund);
    text-decoration: underline;
}

.container {
    max-width: var(--max-breite);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ============================================
   Header
   ============================================ */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: var(--weiss);
    border-bottom: 1px solid var(--grau-border);
    transition: box-shadow 0.25s ease;
}

.site-header.scrolled {
    box-shadow: 0 1px 10px rgba(0, 0, 0, 0.08);
}

.header-inner {
    max-width: var(--max-breite);
    margin: 0 auto;
    padding: 0.85rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--heading);
    flex-shrink: 0;
}

.brand:hover {
    text-decoration: none;
}

.brand-logo {
    height: 52px;
    width: auto;
    display: block;
}

.brand-text {
    font-size: 0.92rem;
    line-height: 1.25;
    color: var(--heading);
    font-weight: 400;
}

/* Navigation */
.main-nav {
    display: flex;
    align-items: center;
    gap: 1.75rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 1.5rem;
}

.nav-link {
    color: var(--burgund);
    font-size: 0.98rem;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.nav-link:hover {
    color: var(--oliv);
    text-decoration: none;
}

.lang-switch {
    display: flex;
    gap: 0.2rem;
    padding-left: 1.25rem;
    border-left: 1px solid var(--grau-border);
}

.lang-btn {
    background: none;
    border: 1px solid transparent;
    padding: 0.2rem 0.45rem;
    font-family: inherit;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    color: var(--grau-mittel);
    border-radius: 3px;
    transition: all 0.15s ease;
}

.lang-btn:hover { color: var(--burgund); }

.lang-btn.active {
    color: var(--weiss);
    background-color: var(--burgund);
}

/* Hamburger */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.hamburger {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--burgund);
    position: relative;
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 2px;
    background-color: var(--burgund);
    left: 0;
    transition: transform 0.3s ease;
}

.hamburger::before { top: -7px; }
.hamburger::after { bottom: -7px; }

.nav-toggle.active .hamburger { background-color: transparent; }
.nav-toggle.active .hamburger::before { transform: rotate(45deg); top: 0; }
.nav-toggle.active .hamburger::after { transform: rotate(-45deg); bottom: 0; }

/* ============================================
   Seiten-Intro (Claim)
   ============================================ */
.page-intro {
    position: relative;
    padding: clamp(3rem, 7vw, 5.5rem) 0 clamp(2rem, 4vw, 3.25rem);
}

/* Ganzseitiger, dezenter Tierchen-Hintergrund (nur Startseite) */
.hero-canvas {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

.hero-canvas canvas {
    display: block;
}

/* Inhalt liegt über dem Tierchen-Hintergrund */
body[data-view="home"] main,
body[data-view="home"] .site-footer {
    position: relative;
    z-index: 1;
}

.page-intro .container {
    position: relative;
    z-index: 1;
}

.page-intro h1 {
    margin-bottom: 0.75rem;
}

.intro-lead {
    font-size: 1.15rem;
    color: var(--text);
    max-width: 760px;
    margin-bottom: 0;
}

/* ============================================
   Sections
   ============================================ */
.section {
    padding: 3rem 0;
    border-top: 1px solid var(--grau-border);
}

.section-alt {
    background-color: var(--hell);
}

.section-title {
    margin-bottom: 1.75rem;
    color: var(--heading);
}

/* ============================================
   Konzept
   ============================================ */
.konzept-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 2.5rem;
    align-items: start;
    margin-bottom: 2.5rem;
}

.konzept-intro .lead {
    font-size: 1.2rem;
    color: var(--heading);
    line-height: 1.55;
}

.konzept-bild .bild-wrapper {
    aspect-ratio: 3 / 2;
    overflow: hidden;
}

.konzept-untertitel {
    color: var(--burgund);
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--grau-border);
}

.markenzeichen-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.markenzeichen-card {
    border-top: 3px solid var(--oliv);
    padding-top: 1rem;
}

.markenzeichen-nr {
    display: inline-block;
    color: var(--burgund);
    font-weight: 700;
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
}

.markenzeichen-card h4 {
    color: var(--burgund);
    margin-bottom: 0.5rem;
}

.markenzeichen-card p {
    font-size: 0.95rem;
    margin-bottom: 0;
}

/* ============================================
   Vorstand (Kacheln)
   ============================================ */
.vorstand-intro {
    max-width: 760px;
    margin-bottom: 2rem;
    font-size: 1.05rem;
}

.vorstand-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.75rem;
    align-items: start;
}

.person-card {
    text-align: left;
    min-width: 0;
}

.person-bild {
    aspect-ratio: 1 / 1;
    width: 100%;
    height: auto;
    overflow: hidden;
    background: var(--weiss);
    margin-bottom: 0.75rem;
}

.person-name {
    color: var(--heading);
    margin-bottom: 0.1rem;
}

.person-rolle {
    color: var(--oliv);
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
}

.person-email {
    display: block;
    font-size: 0.85rem;
    word-break: break-word;
}

/* ============================================
   Anlässe
   ============================================ */
.anlaesse-liste {
    list-style: none;
    max-width: 820px;
}

.anlass {
    display: flex;
    gap: 1.5rem;
    padding: 1.25rem 0;
    border-bottom: 1px solid var(--grau-border);
}

.anlass:first-child { padding-top: 0; }
.anlass:last-child { border-bottom: none; }

.anlass-datum {
    flex-shrink: 0;
    width: 78px;
    text-align: center;
    background: var(--burgund);
    color: var(--weiss);
    padding: 0.6rem 0.25rem;
    align-self: flex-start;
}

.anlass-tag {
    display: block;
    font-size: 1.7rem;
    font-weight: 700;
    line-height: 1;
}

.anlass-monat {
    display: block;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-top: 0.2rem;
}

.anlass-titel { color: var(--heading); margin-bottom: 0.2rem; }

.anlass-ort {
    color: var(--oliv);
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 0.4rem;
}

.anlass-beschreibung { font-size: 0.95rem; margin-bottom: 0; }

.anlaesse-leer { color: var(--grau-mittel); font-style: italic; }

/* ============================================
   Bilder / Platzhalter
   ============================================ */
.bild-wrapper { width: 100%; height: 100%; }

.bild-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.placeholder-img {
    width: 100%;
    height: 100%;
    min-height: 140px;
    background-color: #ddd6d7;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 1rem;
}

.placeholder-img span {
    font-size: 0.9rem;
    color: var(--burgund);
    font-weight: 700;
}

/* ============================================
   Kontakt
   ============================================ */
.kontakt-grid {
    display: grid;
    grid-template-columns: 1fr 1.6fr;
    gap: 3rem;
    align-items: start;
}

.kontakt-info { font-size: 0.98rem; line-height: 1.8; }
.kontakt-info p { margin-bottom: 1rem; }

.kontakt-form { max-width: 620px; }

.form-group { margin-bottom: 1.1rem; }

.form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--heading);
    margin-bottom: 0.35rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.7rem;
    border: 1px solid var(--grau-border);
    background-color: var(--weiss);
    font-family: inherit;
    font-size: 1rem;
    color: var(--text);
    transition: border-color 0.15s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--burgund);
}

.form-group textarea { resize: vertical; min-height: 120px; }

.captcha-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

#captcha-frage, #m-captcha-frage { font-weight: 700; color: var(--burgund); }

/* Mitglieder-Formular */
.form-group select {
    width: 100%;
    padding: 0.7rem;
    border: 1px solid var(--grau-border);
    background-color: var(--weiss);
    font-family: inherit;
    font-size: 1rem;
    color: var(--text);
    transition: border-color 0.15s ease;
}

.form-group select:focus {
    outline: none;
    border-color: var(--burgund);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 1.1rem;
}

.checkbox-group .checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    font-weight: 400;
    font-size: 0.95rem;
    color: var(--text);
    cursor: pointer;
}

.checkbox-group .checkbox-label input[type="checkbox"] {
    width: auto;
    margin-top: 0.25rem;
    flex-shrink: 0;
    accent-color: var(--burgund);
}

@media (max-width: 560px) {
    .form-row { grid-template-columns: 1fr; }
}

.btn-submit {
    display: inline-block;
    padding: 0.75rem 2rem;
    background-color: var(--burgund);
    color: var(--weiss);
    border: 1px solid var(--burgund);
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-submit:hover {
    background-color: var(--oliv);
    border-color: var(--oliv);
}

.btn-submit:disabled { opacity: 0.6; cursor: not-allowed; }

.form-status {
    margin-top: 1.1rem;
    padding: 0.9rem;
    font-size: 0.95rem;
    display: none;
}

.form-status.success {
    display: block;
    background-color: #eef4e3;
    border: 1px solid var(--oliv);
    color: var(--oliv-dunkel);
}

.form-status.error {
    display: block;
    background-color: #fbecee;
    border: 1px solid var(--burgund);
    color: var(--burgund-dunkel);
}

/* ============================================
   Footer
   ============================================ */
.site-footer {
    background-color: var(--hell);
    margin-top: 0;
}

.footer-cols {
    display: grid;
    grid-template-columns: 1fr 1fr 1.4fr;
    gap: 2.5rem;
    padding-top: 3rem;
    padding-bottom: 3rem;
}

.footer-col h3 {
    color: var(--heading);
    font-size: 1.05rem;
    margin-bottom: 1rem;
}

.footer-col p { font-size: 0.92rem; margin-bottom: 0.5rem; }

.footer-nav { list-style: none; }

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

.footer-nav a { font-size: 0.92rem; }

.footer-bar {
    background-color: var(--burgund);
    color: var(--weiss);
    text-align: center;
    padding: 0.85rem 0;
    font-size: 0.85rem;
}

.footer-bar a,
.footer-bar span { color: var(--weiss); }

.footer-sep { opacity: 0.6; }

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 1024px) {
    .konzept-grid,
    .kontakt-grid {
        grid-template-columns: 1fr;
        gap: 1.75rem;
    }

    .vorstand-grid { grid-template-columns: repeat(2, 1fr); }
    .markenzeichen-grid { grid-template-columns: 1fr; gap: 1.5rem; }
    .footer-cols { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    .nav-toggle { display: block; }

    .main-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 82%;
        max-width: 340px;
        height: 100vh;
        background-color: var(--weiss);
        flex-direction: column;
        justify-content: flex-start;
        align-items: stretch;
        gap: 1rem;
        padding: 5rem 1.75rem 2rem;
        overflow-y: auto;
        box-shadow: -4px 0 16px rgba(0, 0, 0, 0.12);
        transition: right 0.3s ease;
    }

    .main-nav.active { right: 0; }

    .nav-menu { flex-direction: column; gap: 1.25rem; }

    .nav-link { font-size: 1.2rem; }

    .lang-switch { padding-left: 0; border-left: none; }
}

@media (max-width: 560px) {
    .vorstand-grid { grid-template-columns: 1fr 1fr; }
    .footer-cols { grid-template-columns: 1fr; gap: 1.75rem; }
    .anlass-datum { width: 64px; }
    .btn-submit { width: 100%; }
}

/* ============================================
   Navigation: Dropdown-Untermenüs
   ============================================ */
.nav-item { position: relative; }

.nav-top {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    cursor: pointer;
}

.caret { font-size: 0.7em; opacity: 0.8; }

.nav-item.active > .nav-top { color: var(--oliv); }

.submenu {
    list-style: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 230px;
    background: var(--weiss);
    border: 1px solid var(--grau-border);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
    padding: 0.4rem 0;
    margin: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
    z-index: 1100;
}

.nav-item.has-children:hover .submenu,
.nav-item.has-children:focus-within .submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.submenu li a {
    display: block;
    padding: 0.5rem 1.1rem;
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text);
}

.submenu li a:hover {
    background: var(--hell);
    color: var(--burgund);
    text-decoration: none;
}

.submenu li a.current { color: var(--burgund); }

/* ============================================
   Kachel-Startseite
   ============================================ */
.tiles-section {
    border-top: none;
    padding-top: 1rem;
}

.tiles-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.tile {
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: var(--weiss);
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    color: var(--text);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.tile:hover {
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
    transform: translateY(-3px);
    text-decoration: none;
}

.tile-img {
    aspect-ratio: 4 / 3;
    overflow: hidden;
}

.tile-img img {
    transition: transform 0.45s ease;
}

.tile:hover .tile-img img {
    transform: scale(1.05);
}

.tile-body {
    padding: 1rem 1.1rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    flex: 1;
}

.tile-body h3 { color: var(--heading); font-size: 1.1rem; }
.tile-body p { font-size: 0.92rem; margin: 0; flex: 1; }

.tile-link {
    color: var(--burgund);
    font-weight: 700;
    font-size: 0.88rem;
    margin-top: 0.25rem;
}

.tile:hover .tile-link { color: var(--oliv); }

/* ============================================
   Breadcrumb & Inhaltsseite
   ============================================ */
.breadcrumb {
    background: var(--hell);
    border-bottom: 1px solid var(--grau-border);
    font-size: 0.85rem;
    padding: 0.6rem 0;
}

.breadcrumb .container {
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.breadcrumb-sep { color: var(--grau-mittel); }
#crumb-title { color: var(--grau-mittel); }

.page { padding: 2.5rem 0 3.5rem; }
.page-title { margin-bottom: 1.5rem; }

.page .block { margin-bottom: 1.25rem; }
.block-text { max-width: 760px; }
.block-text p:last-child { margin-bottom: 0; }

.block-heading { margin-top: 2rem; margin-bottom: 0.75rem; color: var(--heading); }
h4.block-heading { color: var(--burgund); }

.block-image { margin: 1.75rem 0; max-width: 760px; }
.block-image .bild-wrapper {
    height: auto;
}
.block-image .bild-wrapper img {
    height: auto;
    max-height: 520px;
    object-fit: contain;
}
.block-image .bild-credit {
    font-size: 0.8rem;
    color: var(--grau-mittel);
    margin-top: 0.4rem;
}

.block-list { max-width: 760px; padding-left: 1.25rem; }
.block-list li { margin-bottom: 0.4rem; }

.block-links { list-style: none; max-width: 760px; }
.block-links li { border-bottom: 1px solid var(--grau-border); }
.block-links li a { display: block; padding: 0.75rem 0; font-weight: 600; }

.page .vorstand-grid { margin: 1.75rem 0; }
.page .anlaesse-liste { margin: 1rem 0; }
.page .kontakt-grid { margin-top: 1.5rem; }

/* ============================================
   Responsive: Nav-Dropdowns, Kacheln, Seite
   ============================================ */
@media (max-width: 1024px) {
    .tiles-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .nav-menu {
        flex-direction: column;
        align-items: stretch;
        gap: 0.25rem;
        width: 100%;
    }

    .nav-item { width: 100%; }

    .nav-top { width: 100%; justify-content: space-between; font-size: 1.1rem; }
    .caret { margin-left: auto; }

    .submenu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: none;
        min-width: 0;
        padding: 0 0 0.5rem 1rem;
        display: none;
    }

    .nav-item.open .submenu { display: block; }
    .submenu li a { font-size: 1rem; padding: 0.5rem 0; }
}

@media (max-width: 560px) {
    .tiles-grid { grid-template-columns: 1fr; }
}
