* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
}

body {
    line-height: 1.6;
    background-color: #f4f4f4;
}

/* Header */
header {
    background: #7b3f00;
    color: white;
    padding: 20px;
    text-align: center;
}

h2:first-of-type {
    margin-top: 8px;
	margin-bottom: 8px;
}

/* Z-Index-Konzept */

:root {
    --z-content: 1;
    --z-sticky: 100;
    --z-overlay: 1000;
    --z-floating: 1100;
}

/* ===============================
   Intro mit Text-Umfluss
================================= */

.intro {
    background: white;
    padding: 30px;
    line-height: 1.7;
}

.intro-float-image {
    float: right;
    width: 40%;
    max-width: 400px;
    margin: 0 0 20px 25px;
    border-radius: 12px;
}

/* Clearfix, damit Section korrekt Höhe bekommt */
.intro::after {
    content: "";
    display: block;
    clear: both;
}

@media (max-width: 768px) {
    .intro-float-image {
        float: none;
        width: 100%;
        margin: 20px 0;
    }
}

/* Collapsible Bereich */
.intro-collapsible {
    transform-origin: top;
    transition: transform 0.35s ease, opacity 0.25s ease;
}

.intro-collapsible.collapsed {
    transform: scaleY(0);
    opacity: 0;
}

.intro-collapsible:not(.collapsed) {
    transform: scaleY(1);
    opacity: 1;
}

.intro-collapsible-wrapper {
    overflow: hidden;
}


/* Toggle Button im Tenne Stil */
.intro-toggle-btn {
	margin-top: 15px;
	background: none;
	border: none;
	color: #7b3f00;
	font-weight: 600;
	cursor: pointer;
	font-size: 13px;
	transition: opacity 0.2s ease;
}

.intro-toggle-btn:hover {
	opacity: 0.7;
}

/* Wrapper für Fade */
.intro-collapsible-wrapper {
    position: relative;
}

/* Fade-Effekt unten wenn eingeklappt */
.intro-collapsible-wrapper.collapsed::after {
    content: "";
    position: absolute;
    bottom: 40px;
    left: 0;
    right: 0;
    height: 60px;

    background: linear-gradient(
        to bottom,
        rgba(255,255,255,0),
        rgba(255,255,255,1)
    );
    pointer-events: none;
}

/* Collapsible Bereich */
.intro-collapsible {
    overflow: hidden;
    transition: max-height 0.5s ease, opacity 0.3s ease;
}

.intro-collapsible.collapsed {
    max-height: 0;
    opacity: 0;
}

.intro-collapsible:not(.collapsed) {
    max-height: 1200px;
    opacity: 1;
}

/* Toggle Button */
.intro-toggle-btn {
    margin-top: 15px;
    background: none;
    border: none;
    color: #7b3f00;
    font-weight: 600;
    cursor: pointer;
    font-size: 13px;

    display: flex;
    align-items: center;
    gap: 6px;

    transition: opacity 0.2s ease;
}

.intro-toggle-btn:hover {
    opacity: 0.7;
}

/* Pfeil Animation */
.toggle-arrow {
    display: inline-block;
    transition: transform 0.3s ease;
}

.toggle-arrow.rotated {
    transform: rotate(180deg);
}


/* ===============================
   Öffnungszeiten Box
================================= */

.opening-hours {
    background: linear-gradient(135deg, #fff8f2, #ffffff);
    border: 2px solid #7b3f00;
    border-radius: 14px;
    padding: 20px;
    margin: 25px 0;
    max-width: 420px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
}

.opening-hours h3 {
    margin-bottom: 12px;
    color: #7b3f00;
}

.opening-hours ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.opening-hours li {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: 1px solid #eee;
    font-size: 15px;
}

.opening-hours li:last-child {
    border-bottom: none;
}



/* Events */
.events {
    padding: 24px;
}
.events h2 {
    margin-top: 18px;
}
.event-location {
    font-size: 14px;
	font-style: italic;
    opacity: 0.85;
}

.event-card {
    background: white;
    padding: 8px;
    margin-bottom: 8px;
    border-left: 5px solid #7b3f00;
    border-radius: 6px;
    position: relative;   /* wichtig für absolute Position */
}

/* Footer */
footer {
    background: #333;
    color: white;
    text-align: center;
    padding: 20px;
}

/* Responsive */
@media (max-width: 768px) {
    .intro {
        flex-direction: column;
    }
}

.past-event {
    opacity: 0.7;
    background: #f5f5f5;
}

.badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: bold;
    margin-bottom: 6px;
}

.badge-live {
    background: #e6f6ec;
    color: #1e7e34;
}

.badge-yesterday {
    background: #fff4e5;
    color: #a65c00;
}

/* =========================================
   GLAS COOKIE LAYER
========================================= */

.cookie-layer {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: var(--z-overlay);

    opacity: 1;
    visibility: visible;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.cookie-layer.hidden {
    opacity: 0;
    visibility: hidden;
}

/* ================= Desktop Version ================= */

.cookie-box {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.3);

    padding: 35px;
    border-radius: 18px;
    text-align: center;
    max-width: 420px;
    width: 90%;
    box-shadow: 0 20px 50px rgba(0,0,0,0.25);

    transform: scale(1);
    transition: transform 0.4s ease;
}

.cookie-layer.hidden .cookie-box {
    transform: scale(0.95);
}

.cookie-box p {
    font-size: 16px;
    color: #333;
}

.cookie-box button {
    margin-top: 20px;
    padding: 12px 25px;
    border: none;
    background: #7b3f00;
    color: white;
    border-radius: 10px;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.3s ease;
}

.cookie-box button:hover {
    background: #5e2f00;
    transform: translateY(-2px);
}

/* ===============================
   gesamter Events-Bereich
================================= */

.sticky-stack {
    position: relative;
    top: 0;
    z-index: var(--z-sticky);

    background: rgba(255,255,255,0.97);
    backdrop-filter: blur(6px);

    padding: 2px 0 2px 0;
    border-bottom: 1px solid #eee;
	
	transition: all 0.25s ease;
}

.sticky-stack.scrolled {
    padding-top: 2px;
    padding-bottom: 2px;
    box-shadow: 0 8px 22px rgba(0,0,0,0.15);
}

.sticky-stack.scrolled .next-event-sticky {
    padding: 4px 7px;
	border-radius: 10px;
}

.sticky-stack.scrolled .next-event-sticky h3 {
    font-size: 16px;
}

.view-toggle {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 2px 0 3px 0;
}

.view-btn {
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid #d8c8ba;
    background: white;
    color: #6b3b15;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
}

.view-btn.active {
    background: #7b3f00;
    color: white;
    border-color: #7b3f00;
}

/* ===============================
   Hervorhebung nächstes Event
================================= */

.highlight-event {
    border: 2px solid #7b3f00;
    background: linear-gradient(135deg, #fff8f2, #ffffff);
    box-shadow: 0 10px 25px rgba(123, 63, 0, 0.2);
    transform: scale(1.02);
    transition: all 0.3s ease;
}

.highlight-event h3::before {
    content: "⭐ Nächstes Event";
    color: #7b3f00;
}


/* Filter wrapper */
.filter-wrapper {
    margin-bottom: 4px;
}

.filter-wrapper.scrolled {
    backdrop-filter: blur(8px);
    background: rgba(255,255,255,0.9);
}


/* ===============================
   Sticky nächstes Event
================================= */

.next-event-sticky {
    position: relative;
    z-index: 900;

    background: linear-gradient(135deg, #7b3f00, #a0522d);
    color: white;
    padding: 12px 14px;
    border-radius: 12px;
	margin-top: 4px;
    margin-bottom: 6px;
    box-shadow: 0 6px 14px rgba(0,0,0,0.15);
}

.next-event-sticky h3 {
    margin-bottom: 3px;
}

.countdown {
    margin-top: 8px;
    font-weight: bold;
    font-size: 14px;
}

.hidden {
    display: none;
}

/* ===============================
   in eigenen Kalender einfügen
================================= */
.calendar-btn {
    background: #7b3f00;
    color: white;
    border: none;
    border-radius: 50%;

    width: 40px;
    height: 40px;

    font-size: 16px;
    cursor: pointer;

    display: flex;
    align-items: center;
    justify-content: center;

    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    transition: all 0.25s ease;
}

.calendar-btn:hover {
    background: #5e2f00;
    transform: scale(1.1);
}

.next-event-sticky button {
    display: inline-block;
}

/* ================= Mobile Bottom Slide ================= */

@media (max-width: 768px) {

    .cookie-layer {
        align-items: flex-end;
    }

    .cookie-box {
        width: 100%;
        max-width: 100%;
        border-radius: 20px 20px 0 0;
        padding: 25px;

        transform: translateY(0);
        transition: transform 0.4s ease;
    }

    .cookie-layer.hidden .cookie-box {
        transform: translateY(100%);
    }
}


.archive-year {
    margin-top: 20px;
}

.archive-year h3 {
    cursor: pointer;
    background: #eee;
    padding: 10px;
    border-radius: 6px;
    user-select: none;
}

.archive-year-content {
    display: none;
    margin-top: 10px;
}

.archive-year.open .archive-year-content {
    display: block;
}

.install-btn {
    position: fixed;
    align-items: center;
    gap: 8px;
    top: 15px;
    left: 15px;
    z-index: 2000;
    background: white;
    color: #7b3f00;
    border: 2px solid #d8c8ba;
    padding: 10px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
}

.ios-hint {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #fff8f2;
    padding: 12px 18px;
    border-radius: 10px;
    border: 2px solid #7b3f00;
    font-size: 12px;
    text-align: center;
    max-width: 300px;
}

.hidden {
    display: none;
}


/* ===============================
   Dezentes App-Badge
================================= */

.fab-share {
    position: fixed;       /* bleibt unten rechts */
    bottom: 20px;
    right: 20px;
    z-index: 2000;

    width: 60px;
    height: 60px;

    border-radius: 50%;
    border: 3px solid #d8c8ba;

    background: white;
    color: #7b3f00;

    font-size: 24px;
    cursor: pointer;

    display: flex;
    align-items: center;
    justify-content: center;

    box-shadow: 0 6px 18px rgba(0,0,0,0.25);
}

.fab-badge-dot {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 8px;
    height: 8px;
    background: #c0392b;
    border-radius: 50%;
}


/* ===============================
   Event Action Buttons
================================= */

.event-card {
    position: relative;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.event-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

.event-actions {
    position: absolute;
    bottom: 12px;
    right: 12px;

    display: flex;
    gap: 8px;
}

.event-actions button {
    width: 36px;
    height: 36px;

    border-radius: 50%;
    border: none;

    background: #7b3f00;
    color: white;

    font-size: 14px;
    cursor: pointer;

    display: flex;
    align-items: center;
    justify-content: center;

    box-shadow: 0 3px 8px rgba(0,0,0,0.15);
    transition: transform 0.2s ease, background 0.2s ease;
}

.event-actions button:hover {
    background: #5e2f00;
    transform: scale(1.08);
}

.event-actions svg {
    width: 18px;
    height: 18px;
}

.update-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;

  background: #7b3f00;
  color: white;
  padding: 12px;
  text-align: center;
}

/* ===== Segmented Control – Zur Tenne Stil ===== */

.segmented-control {
    position: relative;
    display: flex;
    justify-content: center;   /* zentriert */
    align-items: center;

    width: fit-content;
    margin: 15px auto 10px auto;  /* weniger Abstand unten */

    padding: 4px;
    gap: 6px;

    background: #f3ece6;  /* warmes Beige */
    border-radius: 30px;

    box-shadow: inset 0 0 0 1px #e0d4c8;
}

/* Buttons */
.segmented-control .segment {
    position: relative;
    z-index: 2;

    padding: 8px 18px;
    border-radius: 20px;

    border: 1px solid #d8c8ba;
    background: white;

    color: #6b3b15;  /* dunkles Braun */
    font-size: 14px;
    font-weight: 500;

    cursor: pointer;
    transition: all 0.2s ease;
}

/* Hover */
.segmented-control .segment:hover {
    background: #f7f2ed;
    border-color: #c8b3a3;
}

/* Aktiver Button (Text weiß, Slider darunter) */
.segmented-control .segment.active {
    background: transparent;
    color: white;
    border-color: transparent;
}

/* Beweglicher Slider */
.segment-indicator {
    position: absolute;
    top: 4px;
    left: 4px;
    height: calc(100% - 8px);
    width: 0;

    background: linear-gradient(135deg, #7b3f00, #a0522d);
    border-radius: 20px;

    transition: all 0.3s ease;
    z-index: 1;
}


/* ===============================
   Event Kalender
================================= */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
}

.calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-align: center;
    font-weight: 600;
    margin: 10px 0 8px 0;
    font-size: 16px;
}

.calendar-nav {
    background: none;
    border: 1px solid #d8c8ba;
    color: #7b3f00;
    cursor: pointer;
    padding: 6px;
    border-radius: 8px;
    transition: background 0.2s ease, transform 0.1s ease;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.calendar-nav:hover {
    background: rgba(123,63,0,0.08);
}

.calendar-nav:active {
    transform: scale(0.9);
}

.calendar-weekday {
    text-align: center;
    font-size: 12px;
    font-weight: 600;
	padding-bottom: 4px;
    opacity: 0.7;
}

.calendar-day {
	position: relative;
    padding: 8px 0;
    text-align: center;
    border-radius: 8px;
    background: #f7f2ed;
    font-size: 13px;
}

.calendar-day.selected {
    outline: 2px solid #7b3f00;
    background: rgba(123,63,0,0.08);
}

.calendar-day.has-event {
    background: #7b3f00;
    color: white;
    font-weight: bold;
}

.calendar-day.today {
    border: 2px solid #7b3f00;
    font-weight: bold;
}

.calendar-count {
    position: absolute;
    bottom: 4px;
    right: 6px;
    background: white;
    color: #7b3f00;
    font-size: 11px;
    font-weight: 600;
    border-radius: 10px;
    padding: 1px 5px;
}

@media (max-width: 480px) {

    .calendar-grid {
        gap: 4px;
    }

    .calendar-day {
        padding: 6px 0;
        font-size: 12px;
    }

    .calendar-weekday {
        font-size: 11px;
    }

    .calendar-header {
        font-size: 14px;
    }

}

/* ===============================
   Event-Disclaimer
================================= */
.disclaimer-btn {
    position: absolute;
    top: 8px;
    right: 12px;

    width: 34px;
    height: 34px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;
    border: none;

    background: rgba(123,63,0,0.1);
    color: #7b3f00;

    cursor: pointer;
    transition: background 0.2s ease, transform 0.1s ease;
}

.disclaimer-btn:hover {
    background: rgba(123,63,0,0.2);
}

.disclaimer-btn:active {
    transform: scale(0.9);
}

.disclaimer-layer {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);

    display: flex;
    align-items: center;
    justify-content: center;

    z-index: 1100;
}

.disclaimer-content {
    background: white;
    padding: 24px;
    border-radius: 14px;
    max-width: 400px;
    width: 90%;
    position: relative;

    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

.close-disclaimer {
    position: absolute;
    top: 8px;
    right: 10px;

    border: none;
    background: none;
    font-size: 20px;
    cursor: pointer;
}

.hidden {
    display: none;
}
