:root {
    --cream: #faf6f1;
    --keks: #E8D5C0;
    --keks-dk: #d4bfa5;
    --malz: #C8720A;
    --schlamm: #6B7A45;
    --rosa: #F2B8B8;
    --text: #2a1f16;
    --text-lt: #7a6a5a;
    --white: #ffffff;
    --shadow-soft: 0 20px 60px rgba(107, 122, 69, 0.12);
    --shadow-card: 0 18px 40px rgba(42, 31, 22, 0.08);
    --radius-xl: 28px;
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(232, 213, 192, 0.9), transparent 34%),
        linear-gradient(180deg, #fdfaf6 0%, var(--cream) 100%);
    font-family: "Jost", sans-serif;
}

.page-shell {
    min-height: 100vh;
}

.hero-section,
.dashboard-section {
    position: relative;
}

.hero-card,
.thank-you-card,
.filter-card,
.table-card,
.stat-card,
.form-panel,
.auth-panel {
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(212, 191, 165, 0.6);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-soft);
}

.hero-card {
    overflow: hidden;
}

.hero-image-wrap {
    position: relative;
    aspect-ratio: 16 / 7;
    overflow: hidden;
}

.hero-image {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center 35%;
}

.hero-image-wrap::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to top, rgba(20, 12, 5, 0.55) 0%, transparent 55%),
        linear-gradient(to bottom, rgba(20, 12, 5, 0.2) 0%, transparent 30%);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    padding-bottom: 36px;
    text-align: center;
}

.hero-overlay .eyebrow {
    color: var(--rosa);
    margin-bottom: 0;
}

.hero-motto {
    font-family: "Cormorant Garamond", serif;
    font-size: clamp(2.4rem, 6vw, 4.5rem);
    font-style: italic;
    font-weight: 300;
    color: #fff;
    line-height: 1.1;
    margin-top: 8px;
    text-shadow: 0 4px 40px rgba(0, 0, 0, 0.35);
}

.hero-heart-row {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 18px;
}

.hero-heart-row .hero-line {
    height: 1px;
    width: 50px;
    background: rgba(242, 184, 184, 0.55);
}

.hero-heart-row svg {
    width: 16px;
    height: 16px;
    fill: var(--rosa);
}

.hero-copy {
    padding: 3rem 2.25rem;
    background: linear-gradient(160deg, rgba(232, 213, 192, 0.95), rgba(250, 246, 241, 0.75));
}

.form-panel,
.thank-you-card {
    padding: 2rem;
}

.eyebrow {
    display: inline-block;
    margin-bottom: 1rem;
    color: var(--malz);
    letter-spacing: 0.22em;
    text-transform: uppercase;
    font-size: 0.75rem;
    font-weight: 500;
}

.display-title {
    font-family: "Cormorant Garamond", serif;
    font-weight: 600;
    font-size: clamp(2.4rem, 4vw, 4.4rem);
    line-height: 0.95;
    margin-bottom: 1rem;
}

.display-title.small {
    font-size: clamp(2rem, 3vw, 3rem);
}

.lead-copy {
    font-size: 1.05rem;
    line-height: 1.75;
    color: rgba(42, 31, 22, 0.82);
}

.event-meta {
    display: grid;
    gap: 1rem;
    margin-top: 2rem;
}

.event-meta .meta-label {
    display: block;
    color: var(--malz);
    font-size: 0.82rem;
    margin-bottom: 0.15rem;
}

.form-label {
    margin-bottom: 0.55rem;
    font-weight: 500;
}

.form-control,
.form-select {
    min-height: 3.6rem;
    border-radius: 18px;
    border: 1px solid rgba(200, 114, 10, 0.22);
    padding: 0.95rem 1rem;
    box-shadow: none;
    /* Bootstrap 5.3 fokus-Ring-Farbe überschreiben */
    --bs-focus-ring-color: rgba(212, 191, 165, 0.5);
}

textarea.form-control {
    min-height: 8rem;
}

.form-control:focus,
.form-select:focus {
    border-color: rgba(200, 114, 10, 0.5);
    box-shadow: 0 0 0 0.2rem rgba(212, 191, 165, 0.35) !important;
    outline: none;
}

.attendance-group,
.event-grid {
    display: grid;
    gap: 0.85rem;
}

.attendance-option,
.event-check {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 1rem 1.1rem;
    background: var(--white);
    border: 1px solid rgba(200, 114, 10, 0.16);
    border-radius: 18px;
}

.attendance-option input,
.event-check input {
    margin-top: 0;
}

.btn {
    border-radius: 999px;
    padding: 0.9rem 1.4rem;
    font-weight: 500;
}

/* Bootstrap 5.3 verwendet CSS-Custom-Properties intern – diese müssen überschrieben werden */
.btn-primary {
    --bs-btn-bg:               var(--schlamm);
    --bs-btn-border-color:     var(--schlamm);
    --bs-btn-hover-bg:         #5a6739;
    --bs-btn-hover-border-color: #5a6739;
    --bs-btn-active-bg:        #5a6739;
    --bs-btn-active-border-color: #5a6739;
    --bs-btn-disabled-bg:      var(--schlamm);
    --bs-btn-disabled-border-color: var(--schlamm);
    --bs-btn-focus-shadow-rgb: 107, 122, 69;
    background-color: var(--schlamm);
    border-color: var(--schlamm);
    color: #fff;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
    background-color: #5a6739;
    border-color: #5a6739;
    color: #fff;
}

.btn-outline-primary {
    --bs-btn-color:             var(--schlamm);
    --bs-btn-border-color:      rgba(107, 122, 69, 0.5);
    --bs-btn-hover-bg:          var(--schlamm);
    --bs-btn-hover-border-color: var(--schlamm);
    --bs-btn-hover-color:       #fff;
    --bs-btn-active-bg:         var(--schlamm);
    --bs-btn-active-border-color: var(--schlamm);
    --bs-btn-active-color:      #fff;
    --bs-btn-focus-shadow-rgb:  107, 122, 69;
    color: var(--schlamm);
    border-color: rgba(107, 122, 69, 0.5);
}

.btn-outline-secondary {
    --bs-btn-color:             var(--malz);
    --bs-btn-border-color:      rgba(200, 114, 10, 0.4);
    --bs-btn-hover-bg:          rgba(200, 114, 10, 0.12);
    --bs-btn-hover-border-color: var(--malz);
    --bs-btn-hover-color:       var(--schlamm);
    --bs-btn-active-bg:         rgba(200, 114, 10, 0.2);
    --bs-btn-focus-shadow-rgb:  200, 114, 10;
    color: var(--malz);
    border-color: rgba(200, 114, 10, 0.4);
}

.dashboard-header,
.dashboard-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
}

.stat-card {
    padding: 1.4rem 1.5rem;
}

.stat-card span {
    display: block;
    color: var(--malz);
    font-size: 0.9rem;
}

.stat-card strong {
    font-size: 2rem;
    font-family: "Cormorant Garamond", serif;
    font-weight: 600;
}

.stat-card-sub {
    display: flex;
    gap: 0.75rem;
    margin-top: 0.35rem;
}

.stat-card-sub span {
    display: inline;
    font-size: 0.78rem;
    color: var(--malz);
    opacity: 0.8;
}

.filter-card,
.table-card {
    padding: 1.5rem;
}

.table thead th {
    color: var(--malz);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border-bottom-width: 1px;
}

.table td,
.table th {
    padding: 1rem 0.9rem;
}

@media (min-width: 992px) {
    .attendance-group {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .event-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 991.98px) {
    .hero-image-wrap {
        aspect-ratio: 4 / 3;
    }

    .hero-copy {
        padding-bottom: 1rem;
    }
}

/* ---- Fotoupload ---- */
.upload-zone {
    border: 2.5px dashed rgba(200,114,10,0.35);
    border-radius: var(--radius-xl);
    min-height: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: rgba(255,255,255,0.5);
    transition: border-color 0.2s, background 0.2s;
    padding: 1.25rem 2rem;
    text-align: center;
}
.upload-zone.drag-over {
    border-color: var(--schlamm);
    background: rgba(212,191,165,0.18);
}
.upload-zone .upload-icon { font-size: 2.5rem; opacity: 0.5; }
.upload-zone .upload-hint { color: var(--malz); font-size: 0.92rem; }
.file-list { list-style: none; padding: 0; margin: 0.75rem 0 0; width: 100%; }
.file-list li {
    font-size: 0.85rem;
    color: var(--schlamm);
    padding: 0.2rem 0.5rem;
    border-top: 1px solid rgba(200,114,10,0.15);
    word-break: break-all;
}
.file-list li:first-child { border-top: none; }

/* ---- Foto-Galerie Admin ---- */
.photo-thumb { width:56px; height:56px; object-fit:cover; border-radius:8px; }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px,1fr)); gap:1rem; }
.gallery-card { background:rgba(255,255,255,0.88); border:1px solid rgba(212,191,165,0.6); border-radius:var(--radius-xl); overflow:hidden; box-shadow:var(--shadow-card); }
.gallery-card img { width:100%; aspect-ratio:1/1; object-fit:cover; cursor:pointer; transition: opacity 0.15s; }
.gallery-card img:hover { opacity:0.88; }
.gallery-card .card-body { padding:0.75rem; }
.gallery-card .card-filename { font-size:0.78rem; color:var(--text); font-weight:500; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.gallery-card .card-meta { font-size:0.72rem; color:var(--malz); }

.gallery-chip-row { display:flex; flex-wrap:wrap; gap:0.35rem; }
.gallery-chip {
    display:inline-flex; align-items:center; border-radius:999px;
    padding:0.18rem 0.6rem; background:rgba(107,122,69,0.12);
    color:var(--schlamm); font-size:0.72rem; font-weight:500; white-space:nowrap;
}
.gallery-chip-category {
    background:rgba(200,114,10,0.12); color:var(--malz); font-weight:600;
}

/* ---- Download-Schutz (Fotobetrachter / iOS) ---- */
.no-save {
    -webkit-touch-callout: none;  /* iOS: verhindert "Bild sichern" bei Long-Press */
    -webkit-user-select: none;
    user-select: none;
    pointer-events: none;
}
.no-save-wrap {
    /* Wrapper-Element über dem Bild — fängt Touch-Events ab */
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}
