/* Basic CSS - Foundation styling for ICS Calendar Onepager */

/* CSS Variables - can be overridden in design.css */

/* --- Two-column layout for event content (meta left, description right) --- */
.event-card .event-content-row {
    display: flex;
    flex-wrap: nowrap;
    gap: 1.25rem;
    align-items: flex-start;
}

.event-card .event-meta-col {
    flex: 0 0 320px;
    max-width: 380px;
}

.event-card .event-description-col {
    flex: 1 1 auto;
    min-width: 0;
}

/* Ensure inner blocks take full width inside their column */
.event-card .event-meta-col .event-meta,
.event-card .event-description-col .event-description {
    width: 100%;
}

/* Responsive: stack on small screens */
@media (max-width: 768px) {
    .event-card .event-content-row {
        display: block;
    }
    .event-card .event-meta-col,
    .event-card .event-description-col {
        max-width: none;
        flex: 1 1 auto;
    }
    .event-card .event-meta-col { margin-bottom: 1rem; }
}

/* --- Image left/right row layout --- */
.event-card .event-row {
    display: flex;
    flex-wrap: nowrap;
    gap: 1.25rem;
    align-items: flex-start;
    width: 100%;
}

.event-card .event-image-col {
    flex: 0 0 320px;
    max-width: 380px;
}

.event-card .event-content-col {
    flex: 1 1 auto;
    min-width: 0;
}

/* Ensure event image scales within its column */
.event-card .event-image-col picture,
.event-card .event-image-col img {
    display: block;
    max-width: 100%;
    height: auto;
}

/* Width overrides based on layout (body has class layout-*) */
body.layout-image-left-50 .event-card .event-image-col,
body.layout-image-right-50 .event-card .event-image-col { flex: 0 0 50%; max-width: none; }
body.layout-image-left-50 .event-card .event-content-col,
body.layout-image-right-50 .event-card .event-content-col { flex: 0 0 50%; }

body.layout-image-left-40 .event-card .event-image-col,
body.layout-image-right-40 .event-card .event-image-col { flex: 0 0 40%; max-width: none; }
body.layout-image-left-40 .event-card .event-content-col,
body.layout-image-right-40 .event-card .event-content-col { flex: 0 0 60%; }

@media (max-width: 768px) {
    .event-card .event-row {
        display: block;
    }
    .event-card .event-image-col,
    .event-card .event-content-col {
        max-width: none;
        flex: 1 1 auto;
    }
    .event-card .event-image-col { margin-bottom: 1rem; }
}
:root {
    --primary-color: #3498db;
    --secondary-color: #2c3e50;
    --background-color: #ffffff;
    --text-color: #333333;
    --accent-color: #e74c3c;
    --font-family: 'Noto Sans', sans-serif;
    --border-radius: 8px;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.15);
    /* Shared content column (main, header inner, hero text block) */
    --layout-max-width: 1200px;
    --layout-padding-x: 1rem;
}

/* CSS Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Base styles */
html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    color: var(--color-page-text, var(--text-color));
    background-color: var(--color-page-bg, var(--background-color));
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Heading sizes - explicit to avoid deprecated browser behavior */
h1 {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
}

h2 {
    font-size: 2rem;
    font-weight: 600;
    line-height: 1.3;
}

h3 {
    font-size: 1.8rem;
    font-weight: 600;
    line-height: 1.4;
}

h4 {
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.4;
}

h5 {
    font-size: 1.125rem;
    font-weight: 600;
    line-height: 1.5;
}

h6 {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.5;
}

a {
    text-decoration: none;
    color: var(--color-link, var(--accent-color));
}

a:hover {
    text-decoration: underline;
}

/* Screen Reader Only Text */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Skip Link */
.skip-link {
    position: absolute;
    top: -100px;
    left: 0;
    background: var(--color-link, var(--accent-color));
    color: white;
    padding: 1.25rem 2rem;
    text-decoration: none;
    font-weight: 600;
    z-index: 10000;
    border-radius: 0 0 var(--border-radius) 0;
    transition: top 0.2s ease;
    font-size: 1.1rem;
}

.skip-link:focus {
    top: 0;
    outline: 4px solid #ffffff;
    outline-offset: 2px;
    box-shadow: 0 0 0 6px var(--accent-color);
}

.skip-link:focus-visible {
    top: 0;
    outline: 4px solid #ffffff;
    outline-offset: 2px;
    box-shadow: 0 0 0 6px var(--accent-color);
}

/* Container */
.container {
    max-width: var(--layout-max-width);
    margin: 0 auto;
    padding: 2rem var(--layout-padding-x);
    flex: 1;
    width: 100%;
    background-color: var(--color-page-bg, var(--background-color));
}

/* Header: default same outer width as .container (avoids T-layout); body.header-full-bleed for edge-to-edge */
.header {
    background-color: var(--color-header-bg, var(--primary-color));
    color: var(--color-header-text, white);
    text-align: center;
    box-shadow: var(--shadow);
    max-width: var(--layout-max-width);
    margin-inline: auto;
    width: 100%;
    box-sizing: border-box;
}

body.header-full-bleed .header {
    max-width: none;
}

.header__inner {
    max-width: var(--layout-max-width);
    margin-inline: auto;
    width: 100%;
    box-sizing: border-box;
    padding: 2rem var(--layout-padding-x);
}

.header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.header .title-row-content {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.header .title-row-left .title-row-content {
    text-align: left;
}

.header .title-row-right .title-row-content {
    text-align: right;
}

/* Title section below hero (when title not shown on hero) */
.header-title-section {
    background-color: var(--color-header-title-section-bg, var(--primary-color));
    color: var(--color-header-title-section-text, white);
    text-align: center;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
    max-width: var(--layout-max-width);
    margin-inline: auto;
    width: 100%;
    box-sizing: border-box;
}

body.header-full-bleed .header-title-section {
    max-width: none;
}

.header-title-section__inner {
    max-width: var(--layout-max-width);
    margin-inline: auto;
    width: 100%;
    box-sizing: border-box;
    padding: 2rem var(--layout-padding-x);
}

.header-title-section h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: var(--color-header-title-section-title-text, var(--color-header-title-section-text, white));
}

.header-title-section .page-subtitle {
    color: var(--color-page-subtitle-text, var(--color-header-title-section-text, white));
    font-size: 1.2rem;
    margin-top: 0.5rem;
}

/* Title row container in header-title-section - centers the block */
.header-title-section .title-row-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.header-title-section .title-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Logo positioning within header-title-section */
.header-title-section .title-row-left {
    justify-content: flex-start;
    flex-direction: row;
}

.header-title-section .title-row-left .title-row-content {
    text-align: left;
}

.header-title-section .title-row-right {
    justify-content: flex-end;
    flex-direction: row-reverse;
}

.header-title-section .title-row-right .title-row-content {
    text-align: right;
}

.header-title-section .title-row-content {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

/* Logo */
.logo-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    
}
.logo-pos-left { justify-content: flex-start; }
.logo-pos-center { justify-content: center; }
.logo-pos-right { justify-content: flex-end; }

/* Title row container - centers the block (logo + title) */
.title-row-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

/* Title row combines logo and title inline when logo is left/right */
.title-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Container for title and subtitle when next to logo */
.title-row-content {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    align-items: center;
}

.title-row-content h1 {
    margin: 0;
}

.title-row-content .subtitle,
.title-row-content .page-subtitle {
    margin: 0;
}

/* Logo position relative to title within the centered block */
.title-row-left { 
    justify-content: flex-start; 
    flex-direction: row; /* Logo left, title right */
}

.title-row-left .title-row-content {
    text-align: left;
}

.title-row-right { 
    justify-content: flex-end; 
    flex-direction: row-reverse; /* Logo right, title left */
}

.title-row-right .title-row-content {
    text-align: right;
}

.site-logo {
    height: auto;
    width: auto;
    max-width: 100%;
    display: block;
}
/* Default sizes for header */
.site-logo--small { max-height: 64px; }
.site-logo--medium { max-height: 128px; }
.site-logo--large { max-height: 256px; }
.site-logo--auto { max-height: 128px; } /* Default for regular header */

.header-image {
    margin-bottom: 1rem;
    overflow: hidden;
    border-radius: var(--border-radius);
    max-height: 300px;
}

.header-image img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

/* Info Text Section */
.info-text-container {
    background: var(--color-info-container-bg, #f8f9fa);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    margin: 0 0 2rem 0;
}

.info-text {
    padding: 1.5rem 20%;
    line-height: 1.6;
    color: var(--color-info-text, var(--text-color));
}

/* Text-only: Textblock horizontal zentrieren */
.info-text-container > .info-text:only-child {
    max-width: max-content;
    margin-inline: auto;
}

.info-text h1,
.info-text h2,
.info-text h3 {
    color: var(--color-info-heading-text, var(--secondary-color));
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

.info-text h1:first-child,
.info-text h2:first-child,
.info-text h3:first-child {
    margin-top: 0;
}

.info-text p {
    margin-bottom: 1rem;
}

.info-text ul {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.info-text a {
    color: var(--color-info-link, var(--primary-color));
    text-decoration: underline;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s;
}

.info-text a:hover {
    border-bottom-color: var(--color-info-link-border, var(--color-info-link, var(--primary-color)));
}

/* Info-Text mit Bild: gemeinsame Basis */
.info-text-container.info-text-with-image {
    display: flex;
    gap: 2rem;
    padding: 1.5rem;
}

.info-text-with-image .info-text {
    padding: 0;
    flex: 1 1 auto;
    min-width: 0;
}

.info-text-with-image .info-text > :first-child {
    margin-top: 0;
}

/* Oben/Unten: vertikales Layout */
.info-text-with-image.info-text-position-top,
.info-text-with-image.info-text-position-bottom {
    flex-direction: column;
}

/* Oben/Unten: Bild standardmaessig volle Breite */
.info-text-with-image.info-text-position-top .info-text-image,
.info-text-with-image.info-text-position-bottom .info-text-image {
    max-width: 100%;
}

/* Horizontale Ausrichtung via margin-auto:
   robust in Flex-column (absorbiert Cross-Axis-Raum, ueberschreibt align-self)
   und in klassischem Block-Kontext (Block mit definierter width). */
.info-text-with-image.info-text-position-top.info-text-align-left .info-text-image,
.info-text-with-image.info-text-position-bottom.info-text-align-left .info-text-image {
    margin: 0 auto 0 0;
}

.info-text-with-image.info-text-position-top.info-text-align-center .info-text-image,
.info-text-with-image.info-text-position-bottom.info-text-align-center .info-text-image {
    margin: 0 auto;
}

.info-text-with-image.info-text-position-top.info-text-align-right .info-text-image,
.info-text-with-image.info-text-position-bottom.info-text-align-right .info-text-image {
    margin: 0 0 0 auto;
}

/* Konfigurierbare Breite bei top/bottom + align != full.
   width (nicht nur max-width) noetig, damit margin-auto-Ausrichtung greift
   und der Flex-Item nicht auf Inhaltsbreite des <picture>-Containers kollabiert. */
.info-text-with-image.info-text-position-top:not(.info-text-align-full) .info-text-image,
.info-text-with-image.info-text-position-bottom:not(.info-text-align-full) .info-text-image {
    width: 50%;
    max-width: 50%;
}

.info-text-with-image.info-text-position-top:not(.info-text-align-full).info-text-width-25 .info-text-image,
.info-text-with-image.info-text-position-bottom:not(.info-text-align-full).info-text-width-25 .info-text-image {
    width: 25%;
    max-width: 25%;
}

.info-text-with-image.info-text-position-top:not(.info-text-align-full).info-text-width-75 .info-text-image,
.info-text-with-image.info-text-position-bottom:not(.info-text-align-full).info-text-width-75 .info-text-image {
    width: 75%;
    max-width: 75%;
}

/* Links/Rechts mit Block-Layout: zwei Spalten */
.info-text-container.info-text-with-image.info-text-layout-block.info-text-position-left,
.info-text-container.info-text-with-image.info-text-layout-block.info-text-position-right {
    flex-direction: row;
    align-items: flex-start;
}

.info-text-layout-block.info-text-position-left .info-text-image,
.info-text-layout-block.info-text-position-right .info-text-image {
    flex: 0 0 45%;
}

/* Links/Rechts mit Float-Layout: Text-Umfluss */
.info-text-container.info-text-with-image.info-text-layout-float {
    display: block;
}

.info-text-container.info-text-with-image.info-text-layout-float::after {
    content: "";
    display: block;
    clear: both;
}

.info-text-layout-float .info-text-image {
    width: 35%;
}

.info-text-layout-float.info-text-position-left .info-text-image {
    float: left;
    margin: 0 2rem 1rem 0;
}

.info-text-layout-float.info-text-position-right .info-text-image {
    float: right;
    margin: 0 0 1rem 2rem;
}

/* Bild-Rahmen: border-radius greift auch auf <picture> */
.info-text-image {
    border-radius: var(--border-radius);
    overflow: hidden;
}

.info-text-image img,
.info-text-image picture,
.info-text-image picture img {
    width: 100%;
    height: auto;
    display: block;
}

/* Mobile Breakpoint */
@media (max-width: 768px) {
    .info-text {
        padding: 1.5rem 5%;
    }

    .info-text-container.info-text-with-image {
        padding: 1rem;
        gap: 1rem;
    }

    .info-text-container.info-text-with-image.info-text-layout-block.info-text-position-left,
    .info-text-container.info-text-with-image.info-text-layout-block.info-text-position-right {
        flex-direction: column;
    }

    .info-text-layout-block.info-text-position-left .info-text-image,
    .info-text-layout-block.info-text-position-right .info-text-image {
        flex: 0 0 auto;
        width: 100%;
    }

    .info-text-layout-float .info-text-image {
        float: none;
        width: 100%;
        margin: 0 0 1rem 0;
    }

    .info-text-with-image.info-text-position-top .info-text-image,
    .info-text-with-image.info-text-position-bottom .info-text-image {
        width: 100%;
        max-width: 100%;
        margin: 0;
    }
}

/* Subscribe Section */
.subscribe-section {
    margin: 2rem 0 2rem 0;
}

/* Button Styles (General) */
.button,
.subscribe-button {
    display: inline-block;
    padding: 1rem 2rem;
    background-color: var(--color-abo-bg, var(--accent-color));
    color: var(--color-abo-text, white);
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    border: 1px solid var(--color-abo-border, transparent);
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s, color 0.2s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.button:hover,
.subscribe-button:hover {
    transform: translateY(-2px);
    background-color: var(--color-abo-hover-bg, var(--accent-color));
    color: var(--color-abo-hover-text, white);
    border-color: var(--color-abo-hover-border, transparent);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    text-decoration: none;
}

.button:focus,
.subscribe-button:focus {
    outline: 4px solid var(--color-link, var(--primary-color));
    outline-offset: 2px;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.3);
}

.button:focus-visible,
.subscribe-button:focus-visible {
    outline: 4px solid var(--color-link, var(--primary-color));
    outline-offset: 2px;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.3);
}

/* Button variants */
.button-primary {
    background-color: var(--color-abo-bg, var(--primary-color));
    color: var(--color-abo-text, white);
    border-color: var(--color-abo-border, var(--primary-color));
}

.button-primary:hover {
    background-color: var(--color-abo-hover-bg, var(--accent-color));
    color: var(--color-abo-hover-text, white);
    border-color: var(--color-abo-hover-border, var(--accent-color));
}

.button-secondary {
    padding: 0.75rem 1.5rem;
    background-color: var(--color-abo-bg, var(--secondary-color));
    color: var(--color-abo-text, white);
    border-color: var(--color-abo-border, var(--secondary-color));
}

.button-secondary:hover {
    background-color: var(--color-abo-hover-bg, var(--primary-color));
    color: var(--color-abo-hover-text, white);
    border-color: var(--color-abo-hover-border, var(--primary-color));
}

.button-sm {
    padding: 0.25rem 0.75rem;
    font-size: 0.85rem;
}

/* Subscribe Button Wrapper - for button + info icon layout */
.subscribe-button-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    justify-content: center;
}

/* Subscribe Info Icon Button */
.subscribe-info-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background-color: var(--color-abo-bg, var(--accent-color));
    color: var(--color-abo-text, white);
    border: 1px solid var(--color-abo-border, transparent);
    border-radius: 50%;
    font-size: 1.4rem;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s, color 0.2s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.subscribe-info-icon:hover {
    transform: translateY(-2px) scale(1.05);
    background-color: var(--color-abo-hover-bg, var(--accent-color));
    color: var(--color-abo-hover-text, white);
    border-color: var(--color-abo-hover-border, transparent);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.subscribe-info-icon:focus {
    outline: 4px solid var(--color-link, var(--primary-color));
    outline-offset: 2px;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.3);
}

.subscribe-info-icon:focus-visible {
    outline: 4px solid var(--color-link, var(--primary-color));
    outline-offset: 2px;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.3);
}

.subscribe-info-icon.active {
    background-color: var(--color-abo-hover-bg, var(--primary-color));
    color: var(--color-abo-hover-text, white);
    transform: scale(1.1);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

/* Archive Toggle Section */
.archive-toggle-section {
    text-align: center;
    margin: 0 0 2rem 0;
}

.archive-toggle-button {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background-color: var(--color-abo-bg, var(--accent-color));
    color: var(--color-abo-text, white);
    border: 1px solid var(--color-abo-border, transparent);
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s, color 0.2s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.archive-toggle-button:hover {
    transform: translateY(-2px);
    background-color: var(--color-abo-hover-bg, var(--accent-color));
    color: var(--color-abo-hover-text, white);
    border-color: var(--color-abo-hover-border, transparent);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.archive-toggle-button:focus {
    outline: 4px solid var(--color-link, var(--primary-color));
    outline-offset: 2px;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.3);
}

.archive-toggle-button:focus-visible {
    outline: 4px solid var(--color-link, var(--primary-color));
    outline-offset: 2px;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.3);
}

.archive-toggle-button:active {
    transform: translateY(0);
}

/* Hidden past events and group headings */
.event-card.past-event-hidden,
.group-heading.past-event-hidden {
    display: none !important;
}

.subscribe-url-display {
    margin-bottom: 1rem;
}

/* URL Display (now inside details) */
.subscribe-instructions .subscribe-url-display {
    margin-top: 0;
    margin-bottom: 1.25rem;
    padding: 1.25rem;
    background: var(--color-card-bg, white);
    border: 2px solid var(--color-subscribe-url-border, var(--primary-color));
    border-radius: 10px;
    text-align: left;
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.1);
}

.subscribe-url-display label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    font-weight: 700;
    color: var(--color-subscribe-url-label, var(--secondary-color));
    font-size: 1rem;
}

.url-copy-container {
    display: flex;
    gap: 0.5rem;
    align-items: stretch;
}

.url-input {
    flex: 1;
    padding: 0.875rem 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    background: var(--color-card-bg, white);
    cursor: text;
    color: var(--color-page-text);
    transition: all 0.2s ease;
}

.url-input:focus {
    outline: 4px solid var(--color-subscribe-url-border);
    outline-offset: 2px;
    border-color: var(--color-subscribe-url-border);
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
    background: var(--color-meta-bg, #fafafa);
}

.url-input:focus-visible {
    outline: 4px solid var(--color-subscribe-url-border);
    outline-offset: 2px;
    border-color: var(--color-subscribe-url-border);
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
    background: var(--color-meta-bg, #fafafa);
}

.url-copy-btn {
    padding: 0.875rem 1.5rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    font-size: 0.9rem;
    box-shadow: 0 2px 6px rgba(52, 152, 219, 0.3);
}

.url-copy-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.4);
}

.url-copy-btn:focus {
    outline: 4px solid var(--color-subscribe-url-border);
    outline-offset: 2px;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.3);
}

.url-copy-btn:focus-visible {
    outline: 4px solid var(--color-subscribe-url-border);
    outline-offset: 2px;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.3);
}

.url-copy-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(52, 152, 219, 0.3);
}

/* Subscription Info Block (Collapsible) - Modern Design */
.subscribe-info {
    background: var(--color-card-bg, white);
    border-radius: 12px;
    padding: 0;
    margin: 2rem auto;
    max-width: 900px;
    box-shadow: var(--shadow);
    border: 1px solid var(--color-card-border, #e0e0e0);
    overflow: hidden;
    display: block;
}

/* Hidden state for icon-toggle mode */
.subscribe-info.hidden {
    display: none;
}

.subscribe-info details {
    padding: 0;
}

.subscribe-info summary {
    cursor: pointer;
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--color-meta-text, var(--color-card-text, var(--text-color)));
    padding: 1.25rem 1.75rem;
    list-style: none;
    user-select: none;
    transition: all 0.3s ease;
    background: var(--color-meta-bg, #f1f5f9);
    border-bottom: 2px solid transparent;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.subscribe-info summary::-webkit-details-marker {
    display: none;
}

.subscribe-info summary::before {
    content: '▶';
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: var(--color-subscribe-info-marker-bg, var(--primary-color));
    color: var(--color-subscribe-info-marker-text, var(--color-abo-text, white));
    border-radius: 6px;
    font-size: 0.7em;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.subscribe-info details[open] summary::before {
    transform: rotate(90deg);
    background: var(--color-subscribe-info-marker-active-bg, var(--accent-color));
    color: var(--color-subscribe-info-marker-active-text, var(--color-abo-text, white));
}

.subscribe-info summary:hover {
    background: var(--color-card-bg, white);
    padding-left: 2rem;
    border-bottom-color: var(--color-subscribe-info-border, var(--primary-color));
}

.subscribe-info details[open] summary {
    border-bottom: 2px solid var(--color-subscribe-info-border, var(--primary-color));
}

.subscribe-instructions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    padding: 1.75rem;
}

/* URL Display in Instructions */
.subscribe-instructions .subscribe-url-display {
    grid-column: 1 / -1;
    margin-bottom: 0.5rem;
}

.instruction-item {
    background: var(--color-card-bg, white);
    padding: 1.5rem;
    border-radius: 10px;
    border: 1px solid var(--color-card-border, #e9ecef);
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.instruction-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--color-subscribe-info-border);
    transition: width 0.3s ease;
}

.instruction-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
    border-color: var(--color-subscribe-info-border, var(--primary-color));
}

.instruction-item:hover::before {
    width: 6px;
}

.instruction-item strong {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    color: var(--color-subscribe-instructions-heading-text, var(--secondary-color));
    font-size: 1.15rem;
    font-weight: 700;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #f0f0f0;
}

.instruction-item ol {
    margin: 0;
    padding-left: 1.75rem;
    list-style: none;
    counter-reset: step-counter;
}

.instruction-item li {
    position: relative;
    margin-bottom: 0.75rem;
    line-height: 1.7;
    padding-left: 2rem;
    color: var(--color-subscribe-instructions-text, var(--color-card-text, var(--text-color)));
}

.instruction-item li::before {
    content: counter(step-counter);
    counter-increment: step-counter;
    position: absolute;
    left: 0;
    top: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: var(--color-subscribe-info-marker-bg);
    color: var(--color-subscribe-info-marker-text);
    border-radius: 50%;
    font-size: 0.85rem;
    font-weight: 600;
    flex-shrink: 0;
}

.instruction-note {
    background: var(--color-meta-bg, #f1f5f9);
    padding: 1.25rem 1.5rem;
    border-radius: 10px;
    border-left: 4px solid var(--color-subscribe-info-border, var(--primary-color));
    margin-top: 0.75rem;
    grid-column: 1 / -1;
    box-shadow: var(--shadow);
}

.instruction-note p {
    margin: 0;
    color: var(--color-meta-text, var(--text-color));
    font-weight: 500;
    line-height: 1.6;
}

.instruction-note strong {
    color: var(--color-subscribe-info-border, var(--primary-color));
    font-weight: 700;
}

.subscribe-info.active {
    display: block;
    animation: slideDown 0.3s ease;
}

/* Force details to open when .active class is added */
.subscribe-info.active details {
    display: block;
}

.subscribe-info.active details summary {
    display: flex;
}

.subscribe-info.active details .subscribe-instructions {
    display: grid !important;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Group Headings */
.group-heading {
    font-size: 1.8rem;
    background: var(--color-group-heading-bg, transparent);
    color: var(--color-group-heading-text, var(--secondary-color));
    margin: 2rem 0 1rem;
    padding: 0.5rem 1rem;
    border-bottom: 2px solid var(--color-group-heading-border, var(--primary-color));
}

/* Event Card */
.event-card {    
    background: var(--color-card-bg, white);
    color: var(--color-card-text);
    border-color: var(--color-card-border);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 1.5rem;
    margin-bottom: 2rem;
    transition: box-shadow 0.3s, transform 0.3s;
}

.event-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

.event-title {
    font-size: 2rem;
    color: var(--color-event-title-text, var(--primary-color));
    margin-bottom: 1rem;
}

.event-time {
    font-weight: 400;
    font-size: 1em;
}

.event-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 1rem;
    background-color: var(--color-meta-bg, #f8f9fa);
    color: var(--color-meta-text);
    border-radius: var(--border-radius);
}

.event-meta>div {
    flex: 1 1 auto;
    min-width: 200px;
}

/* Event Download Link (styled like other event details) */
.event-download {
    flex: 1 1 100%;
}

.event-download a {
    color: var(--text-color);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    transition: color 0.2s;
}

.event-download a:hover {
    color: var(--color-link, var(--primary-color));
    text-decoration: underline;
}

.event-download .cp-icon,
.event-download svg,
.event-download i {
    font-size: 1.2em;
    flex-shrink: 0;
}

.event-date,
.event-location,
.event-organizer {
    font-size: 0.95rem;
}

.event-time {
    font-weight: 400;
    font-size: 0.9em;
}

.event-description {
    margin-top: 1rem;
    line-height: 1.8;
}

.event-description h1,
.event-description h2,
.event-description h3,
.event-description h4,
.event-description h5,
.event-description h6 {
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    color: var(--color-info-heading-text);
}

.event-description p {
    margin-bottom: 1rem;
}

.event-description ul {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.event-description li {
    margin-bottom: 0.5rem;
}

.event-description a {
    color: var(--color-link);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s;
}

.event-description a:hover {
    border-bottom-color: var(--color-link-hover);
}

.event-description code {
    background-color: var(--color-meta-bg, #f4f4f4);
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

.event-description strong {
    font-weight: 600;
}

/* Markdown Images */
.markdown-image {
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    display: block;
    margin: 1rem 0;
    box-shadow: var(--shadow);
}

.event-description a .markdown-image {
    transition: transform 0.3s, box-shadow 0.3s;
}

.event-description a .markdown-image:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-hover);
}

/* YouTube Links with Thumbnails */
.youtube-link-container {
    margin: 1.5rem 0;
    max-width: 100%;
}

.youtube-link {
    display: block;
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
    text-decoration: none;
}

.youtube-link:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.youtube-thumbnail {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.youtube-link-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.4) 50%, transparent 100%);
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.youtube-play-icon {
    font-size: 1.5rem;
    color: #ff0000;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    flex-shrink: 0;
}

.youtube-play-icon i {
    font-size: 1.5rem;
    color: #ff0000;
}

.youtube-link-text {
    color: #ffffff;
    font-weight: 600;
    font-size: 1rem;
    line-height: 1.4;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .youtube-link-overlay {
        padding: 0.75rem;
    }

    .youtube-play-icon {
        font-size: 1.25rem;
    }

    .youtube-play-icon i {
        font-size: 1.25rem;
    }

    .youtube-link-text {
        font-size: 0.9rem;
    }
}

/* Attachments */

.attachment-image img {
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius);
}

.attachment-file {
    margin: 0.5rem 0;
}

.attachment-file a {
    display: inline-block;
    padding: 0.5rem 1rem;
    background-color: var(--color-abo-bg, var(--accent-color));
    color: var(--color-abo-text, white);
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    border: 1px solid var(--color-abo-border, transparent);
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s, color 0.2s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.attachment-file a:hover {
    background-color: var(--color-abo-hover-bg, var(--accent-color));
    color: var(--color-abo-hover-text, white);
    border-color: var(--color-abo-hover-border, transparent);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Footer */
.footer {
    background-color: var(--color-footer-bg, var(--secondary-color));
    color: var(--color-footer-text, white);
    text-align: center;
    padding: 1.5rem;
    margin-top: auto;
}

.footer-imprint-short {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.footer-links {
    margin: 0.5rem 0;
}

.footer-links a {
    color: var(--color-footer-link, var(--color-footer-text, white));
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s;
}

.footer-links a:hover {
    color: var(--color-footer-link-hover, var(--color-footer-link, var(--color-footer-text, white)));
    border-bottom-color: var(--color-footer-link-hover, var(--color-footer-link-border, var(--color-footer-link, var(--color-footer-text, white))));
}

.footer-timezone {
    margin: 0.5rem 0;
    font-size: 0.9rem;
    opacity: 0.9;
}

.footer-generated {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    opacity: 0.8;
}
.footer-generated a {
    color: var(--color-footer-link, var(--color-footer-text, white));
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s;
}
.footer-generated a:hover {
    color: var(--color-footer-link-hover, var(--color-footer-link, var(--color-footer-text, white)));
    border-bottom-color: var(--color-footer-link-hover, var(--color-footer-link-border, var(--color-footer-link, var(--color-footer-text, white))));
}

/* ============================================================================
   SOCIAL LINKS (Link in Bio Style)
   ============================================================================ */

.social-links-section {
    margin: 2rem auto;
    padding: 1.5rem 0;
}

/* Button Style (Link in Bio Classic) */
.social-links-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: center;
    max-width: 500px;
    margin: 0 auto;
}

.social-link-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    padding: 1rem 1.5rem;
    background: var(--color-social-button-bg, var(--primary-color));
    color: var(--color-social-button-text, #ffffff);
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    border: 1px solid var(--color-social-button-border, transparent);
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s, color 0.2s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.social-link-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    background: var(--color-social-button-hover-bg, var(--accent-color));
    color: var(--color-social-button-hover-text, #ffffff);
    border-color: var(--color-social-button-hover-border, transparent);
}

.social-link-button .social-link-icon {
    font-size: 1.5rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.social-link-button .social-link-icon i {
    font-size: 1.5rem;
}

.social-link-button .social-link-icon .social-icon-emoji {
    font-size: 1.5rem;
}

.social-link-button .social-link-label {
    font-size: 1rem;
}

/* Icon Style (Compact) */
.social-links-icons {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    align-items: center;
}

.social-link-icon-item {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: var(--color-social-button-bg, var(--primary-color));
    color: var(--color-social-button-text, #ffffff);
    text-decoration: none;
    border-radius: 50%;
    font-size: 2rem;
    border: 1px solid var(--color-social-button-border, transparent);
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s, color 0.2s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.social-link-icon-item i {
    font-size: 2rem;
}

.social-link-icon-item .social-icon-emoji {
    font-size: 2rem;
}

.social-link-icon-item:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    background: var(--color-social-button-hover-bg, var(--accent-color));
    color: var(--color-social-button-hover-text, #ffffff);
    border-color: var(--color-social-button-hover-border, transparent);
    text-decoration: none;
}

/* List Style */
.social-links-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-width: 400px;
    margin: 0 auto;
}

.social-link-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: var(--color-social-list-bg, #ffffff);
    color: var(--color-social-list-text, var(--text-color));
    text-decoration: none;
    border: 1px solid var(--color-social-list-border, #dee2e6);
    border-radius: 8px;
    transition: background 0.2s, box-shadow 0.2s;
}

.social-link-item:hover {
    background: var(--color-social-list-hover-bg, #f8f9fa);
    color: var(--color-social-list-hover-text, inherit);
    border-color: var(--color-social-list-hover-border, transparent);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.social-link-item .social-link-icon {
    font-size: 1.5rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 1.5rem;
}

.social-link-item .social-link-icon i {
    font-size: 1.5rem;
}

.social-link-item .social-link-icon .social-icon-emoji {
    font-size: 1.5rem;
}

.social-link-item .social-link-label {
    font-weight: 500;
}

/* Social Links in Footer */
.footer .social-links-section {
    margin: 1rem auto;
    padding: 1rem 0;
}

.footer .social-links-icons {
    gap: 0.75rem;
}

.footer .social-link-icon-item {
    width: 50px;
    height: 50px;
    font-size: 1.75rem;
    background: rgba(255, 255, 255, 0.1);
}

.footer .social-link-icon-item i {
    font-size: 1.75rem;
}

.footer .social-link-icon-item .social-icon-emoji {
    font-size: 1.75rem;
}

.footer .social-link-icon-item:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Imprint Section */
.imprint-section {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 2rem;
}

.imprint-section h1,
.imprint-section h2,
.imprint-section h3 {
    color: var(--color-imprint-heading-text, var(--secondary-color));
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.imprint-section h1:first-child,
.imprint-section h2:first-child,
.imprint-section h3:first-child {
    margin-top: 0;
}

.imprint-section p {
    margin-bottom: 1rem;
    line-height: 1.8;
}

.imprint-section ul {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
    line-height: 1.8;
}

.imprint-section a {
    color: var(--color-imprint-link, var(--primary-color));
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s;
}

.imprint-section a:hover {
    border-bottom-color: var(--color-imprint-link-border, var(--color-imprint-link, var(--primary-color)));
}

/* Page Subtitle */
.page-subtitle {
    text-align: center;
    font-size: 1.2rem;
    color: var(--color-page-subtitle-text, var(--secondary-color));
    margin-top: 0.5rem;
    margin-bottom: 0;
}

/* Hero Header: default same outer width as .container; body.header-full-bleed for full viewport */
.hero-header {
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: var(--layout-max-width);
    margin-inline: auto;
    width: 100%;
    box-sizing: border-box;
}

body.header-full-bleed .hero-header {
    max-width: none;
}

/* Hero without background image (logo-only) */
.hero-header.hero-logo-only {
    background-color: var(--color-hero-bg, var(--primary-color));
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-header.hero-logo-only .site-logo {
    max-height: 90%;
    width: auto;
}

/* Respect user-selected logo sizes in hero-logo-only mode */
.hero-header.hero-logo-only .site-logo--small {
    max-height: 64px;
}
.hero-header.hero-logo-only .site-logo--medium {
    max-height: 128px;
}
.hero-header.hero-logo-only .site-logo--large {
    max-height: 256px;
}
.hero-header.hero-logo-only .site-logo--auto {
    max-height: 90%; /* Automatic: adapts to hero height */
}

/* Hero transparent (no background color) */
.hero-header.hero-transparent {
    background-color: transparent !important;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    max-width: var(--layout-max-width);
    margin-inline: auto;
    width: 100%;
    box-sizing: border-box;
    padding-top: clamp(1rem, calc(var(--hero-height, 400px) * 0.05), 2.5rem);
    padding-bottom: clamp(1rem, calc(var(--hero-height, 400px) * 0.05), 2.5rem);
    padding-inline: var(--layout-padding-x);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
}

/* Logo-only hero: center and let logo use hero height */
.hero-content.logo-only {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}
.hero-content.logo-only .site-logo {
    max-height: calc(var(--hero-height, 400px));
    width: auto;
    height: auto;
}

/* Respect user-selected logo sizes in logo-only mode */
.hero-content.logo-only .site-logo--small {
    max-height: 64px;
}
.hero-content.logo-only .site-logo--medium {
    max-height: 128px;
}
.hero-content.logo-only .site-logo--large {
    max-height: 256px;
}
.hero-content.logo-only .site-logo--auto {
    max-height: calc(var(--hero-height, 400px)); /* Automatic: adapts to hero height */
}

/* Title row container in hero - centers the block */
.hero-content .title-row-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    flex-direction: column;
    gap: clamp(0.25rem, calc(var(--hero-height, 400px) * 0.015), 1rem);
    max-width: 100%;
}

.hero-content .title-row-container .title-row {
    display: flex;
    align-items: center;
    gap: clamp(0.75rem, calc(var(--hero-height, 400px) * 0.025), 1.5rem);
    flex-wrap: wrap;
    justify-content: center;
}

.hero-content .title-row-left .title-row-content {
    text-align: left;
}

.hero-content .title-row-right .title-row-content {
    text-align: right;
}

/* Center-aligned title content in hero */
.hero-content .title-row-content {
    text-align: center;
    gap: clamp(0.125rem, calc(var(--hero-height, 400px) * 0.01), 0.5rem);
}

/* Responsive adjustments for logos */
@media (max-width: 768px) {
    .site-logo--small { max-height: 64px; }
    .site-logo--medium { max-height: 96px; }
    .site-logo--large { max-height: 128px; }
    .site-logo--auto { max-height: 96px; }
}

/* Hero content: Logo auto size adapts to hero height */
.hero-content .site-logo--auto {
    max-height: clamp(64px, calc(var(--hero-height, 400px) * 0.3), 200px);
}

.hero-content h1 {
    font-size: clamp(
        1.5rem,
        max(calc(var(--hero-height, 400px) * 0.09), 3vw),
        4.25rem
    );
    margin: 0;
    font-weight: 700;
    line-height: 1.1;
}

.hero-content .subtitle {
    font-size: clamp(
        1rem,
        max(calc(var(--hero-height, 400px) * 0.048), 1.5vw),
        1.9rem
    );
    margin: 0;
    opacity: 0.95;
    line-height: 1.3;
}

/* Location Link Styling */
.event-location a {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px dashed currentColor;
}

.event-location a:hover {
    border-bottom-style: solid;
}

/* Event Image Wrapper (for main event image in grid layout) */
.event-image-wrapper {
    width: 100%;
    margin: 0;
}

.event-image-wrapper img {
    width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    display: block;
}

/* Attachment Image Styling */
.attachment-image {
    margin: 1rem 0;
}

.attachment-image img {
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius);
}

/* Attachment File Small Text */
.attachment-file small {
    color: var(--color-meta-text, #666);
    display: block;
    margin-top: 0.25rem;
}

/* Back Link */
.back-link {
    margin-bottom: 2rem;
}

.back-link a {
    color: var(--color-back-link-text, var(--primary-color));
    text-decoration: none;
}

.back-link a:hover {
    text-decoration: underline;
}

/* Imprint Section Spacing */
.imprint-section+.imprint-section {
    margin-top: 3rem;
}

/* Responsive Design - Optimierte Paddings/Margins für Mobile */
@media (max-width: 768px) {
    body {
        margin: 0;
        padding: 0;
    }

    .container {
        margin: 0;
        padding: 1rem;
        border-radius: 0;
    }

    .header__inner {
        padding: 1.5rem var(--layout-padding-x);
        margin: 0;
        border-radius: 0;
    }

    .header h1 {
        font-size: 1.75rem;
        margin: 0;
    }

    .header-title-section {
        margin: 0 0 1rem 0;
        border-radius: 0;
    }

    .header-title-section__inner {
        padding: 1.5rem var(--layout-padding-x);
    }

    .header-title-section h1 {
        font-size: 1.75rem;
        margin: 0;
    }

    .hero-header {
        margin: 0;
        border-radius: 0;
    }

    .hero-content {
        padding-top: clamp(0.75rem, calc(var(--hero-height, 60vh) * 0.03), 1.5rem);
        padding-bottom: clamp(0.75rem, calc(var(--hero-height, 60vh) * 0.03), 1.5rem);
        padding-inline: var(--layout-padding-x);
    }
    
    .hero-content h1 {
        font-size: clamp(
            1.35rem,
            max(calc(var(--hero-height, 60vh) * 0.08), 3.5vw),
            2.875rem
        );
    }
    
    .hero-content .subtitle {
        font-size: clamp(
            0.875rem,
            max(calc(var(--hero-height, 60vh) * 0.042), 1.75vw),
            1.4rem
        );
    }

    .hero-content.logo-only .site-logo {
        max-height: calc(var(--hero-height, 60vh));
    }
    
    /* Respect user-selected logo sizes in logo-only mode on mobile */
    .hero-content.logo-only .site-logo--small {
        max-height: 64px;
    }
    .hero-content.logo-only .site-logo--medium {
        max-height: 96px;
    }
    .hero-content.logo-only .site-logo--large {
        max-height: 128px;
    }
    
    /* Mobile: smaller logos in hero with title */
    .hero-content .site-logo--small { 
        max-height: clamp(32px, calc(var(--hero-height, 60vh)), 64px);
    }
    .hero-content .site-logo--medium { 
        max-height: clamp(64px, calc(var(--hero-height, 60vh)), 128px);
    }
    .hero-content .site-logo--large { 
        max-height: clamp(96px, calc(var(--hero-height, 60vh)), 256px);
    }
    .hero-content .site-logo--auto { 
        max-height: clamp(48px, calc(var(--hero-height, 60vh) * 0.3), 120px);
    }
    
    /* Mobile: Stack title row vertically */
    .hero-content .title-row-container .title-row {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .hero-content .title-row-container {
        gap: 0.375rem;
    }

    .event-card {
        padding: 1rem;
        margin-bottom: 1rem;
        border-radius: 8px;
    }

    .event-meta {
        flex-direction: column;
        gap: 0.5rem;
        padding: 0.75rem;
    }

    .event-meta>div {
        min-width: 100%;
    }

    .event-download-button {
        padding: 0.75rem;
        font-size: 1.1rem;
        width: auto;
    }

    .event-description {
        padding: 1rem;
    }

    .group-heading {
        font-size: 1.25rem;
        padding: 0.75rem 1rem;
        margin: 0.5rem 0;
    }

    .subscribe-url-display {
        padding: 0.75rem;
        margin-top: 1rem;
        margin-bottom: 1rem;
    }

    .url-copy-container {
        flex-direction: column;
    }

    .url-copy-btn {
        width: 100%;
    }

    .subscribe-info {
        margin: 1.5rem 0.5rem;
        max-width: 100%;
    }

    .subscribe-info summary {
        font-size: 1.2rem;
        padding: 1rem 1.25rem;
    }

    .subscribe-info summary::before {
        width: 24px;
        height: 24px;
        font-size: 0.65em;
    }

    .subscribe-instructions {
        grid-template-columns: 1fr;
        gap: 1.25rem;
        padding: 1.25rem;
    }

    .instruction-item {
        padding: 1.25rem;
    }

    .instruction-item strong {
        font-size: 1.05rem;
    }

    .instruction-item li {
        padding-left: 1.75rem;
        font-size: 0.95rem;
    }

    .instruction-item li::before {
        width: 22px;
        height: 22px;
        font-size: 0.8rem;
    }

    .subscribe-url-display {
        padding: 0.75rem !important;
        margin-bottom: 1rem;
    }

    .instruction-note {
        padding: 1rem;
    }

    .info-text {
        padding: 1rem;
        margin: 1rem 0;
    }

    .footer {
        padding: 1.5rem 1rem;
    }

    /* Social Links Mobile */
    .social-links-buttons {
        max-width: 100%;
        padding: 0 0.5rem;
    }

    .social-link-button {
        font-size: 0.95rem;
        padding: 0.875rem 1.25rem;
    }

    .social-links-list {
        max-width: 100%;
        padding: 0 0.5rem;
    }

    .imprint-section {
        padding: 1rem;
        margin-bottom: 1rem;
    }

    .page-subtitle {
        font-size: 1rem;
        margin: 0.5rem 0;
    }

    /* Fix: Skip-Link bleibt versteckt, außer bei explizitem Focus */
    .skip-link {
        top: -100px !important;
    }
    
    .skip-link:focus,
    .skip-link:focus-visible {
        top: 0 !important;
    }

    /* Fix: Subscribe-Info details standardmäßig geschlossen */
    .subscribe-info details:not([open]) .subscribe-instructions {
        display: none;
    }
    
    .subscribe-info details[open] .subscribe-instructions {
        display: grid;
    }
}

@media (max-width: 480px) {
    :root {
        --layout-padding-x: 0.75rem;
    }

    .container {
        padding: 0.75rem;
    }

    .header__inner {
        padding: 1rem var(--layout-padding-x);
    }

    .header h1 {
        font-size: 1.5rem;
    }

    .header-title-section {
        margin: 0 0 1rem 0;
    }

    .header-title-section__inner {
        padding: 1rem var(--layout-padding-x);
    }

    .hero-content {
        padding-inline: var(--layout-padding-x);
    }

    .header-title-section h1 {
        font-size: 1.5rem;
    }

    .event-card {
        padding: 0.75rem;
    }

    .event-meta {
        padding: 0.5rem;
    }

    .event-description {
        padding: 0.75rem;
    }

    .subscribe-button {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
    }

    .archive-toggle-button {
        padding: 0.65rem 1.25rem;
        font-size: 0.85rem;
    }

    .group-heading {
        font-size: 1.125rem;
        padding: 0.5rem 0.75rem;
    }

    .info-text {
        padding: 0.75rem;
    }

    .footer {
        padding: 1rem 0.75rem;
    }

    .imprint-section {
        padding: 0.75rem;
    }

    /* Fix: Skip-Link bleibt versteckt, außer bei explizitem Focus */
    .skip-link {
        top: -100px !important;
    }
    
    .skip-link:focus,
    .skip-link:focus-visible {
        top: 0 !important;
    }

    /* Fix: Subscribe-Info details standardmäßig geschlossen */
    .subscribe-info details:not([open]) .subscribe-instructions {
        display: none;
    }
    
    .subscribe-info details[open] .subscribe-instructions {
        display: grid;
    }
}

/* Print Styles */
@media print {

    .subscribe-section,
    .footer {
        display: none;
    }

    .event-card {
        page-break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }

    body {
        background: white;
    }
}

/* ============================================================================
   EVENT LAYOUT OPTIONS
   ============================================================================ */

/* Event Attachments Container (used for grid layouts) */
.event-attachments {
    width: 100%;
    overflow: hidden;
}

/* Layout: 50/50 Bild links */
body.layout-image-left-50 .event-card {
    display: block;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: start;
}

body.layout-image-left-50 .event-title {
    grid-column: 1 / -1;
}

body.layout-image-left-50 .event-content {
    order: 2;
}

body.layout-image-left-50 .event-attachments {
    order: 1;
}

/* Layout: 50/50 Bild rechts */
body.layout-image-right-50 .event-card {
    display: block;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: start;
}

body.layout-image-right-50 .event-title {
    grid-column: 1 / -1;
}

body.layout-image-right-50 .event-content {
    order: 1;
}

body.layout-image-right-50 .event-attachments {
    order: 2;
}

/* Layout: 40/60 Bild links */
body.layout-image-left-40 .event-card {
    display: block;
    grid-template-columns: 40% 60%;
    gap: 2rem;
    align-items: start;
}

body.layout-image-left-40 .event-title {
    grid-column: 1 / -1;
}

body.layout-image-left-40 .event-content {
    order: 2;
}

body.layout-image-left-40 .event-attachments {
    order: 1;
}

/* Layout: 60/40 Text links, Bild rechts */
body.layout-image-right-40 .event-card {
    display: block;
    grid-template-columns: 60% 40%;
    gap: 2rem;
    align-items: start;
}

body.layout-image-right-40 .event-title {
    grid-column: 1 / -1;
}

body.layout-image-right-40 .event-content {
    order: 1;
}

body.layout-image-right-40 .event-attachments {
    order: 2;
}

/* Layout: Abwechselnd */
body.layout-alternating article.event-card:nth-of-type(odd) {
    display: block;
    grid-template-columns: 40% 60%;
    gap: 2rem;
    align-items: start;
}

body.layout-alternating article.event-card:nth-of-type(odd) .event-title {
    grid-column: 1 / -1;
}

body.layout-alternating article.event-card:nth-of-type(odd) .event-content {
    order: 2;
}

body.layout-alternating article.event-card:nth-of-type(odd) .event-attachments {
    order: 1;
}

body.layout-alternating article.event-card:nth-of-type(even) {
    display: block;
    grid-template-columns: 60% 40%;
    gap: 2rem;
    align-items: start;
}

body.layout-alternating article.event-card:nth-of-type(even) .event-title {
    grid-column: 1 / -1;
}

body.layout-alternating article.event-card:nth-of-type(even) .event-content {
    order: 1;
}

body.layout-alternating article.event-card:nth-of-type(even) .event-attachments {
    order: 2;
}

/* Mobile: Grid-Layouts zurück zu vertikal (HTML-Reihenfolge wird beibehalten) */
@media (max-width: 768px) {
    body[class*="layout-"] .event-card {
        grid-template-columns: 1fr !important;
        display: block !important;
    }

    body[class*="layout-"] .event-content {
        display: flex !important;
        flex-direction: column;
    }
}
/* =================================================================== */
/* EPK (Electronic Press Kit) Page Styles                             */
/* =================================================================== */

/* EPK uses standard .container and .event-card classes for consistency */
/* Only grid layout and table styles are EPK-specific */

/* Section Header */
.section-header {
    margin: 2rem 0 1rem 0;
    color: var(--color-page-text, var(--text-color));
    font-size: 1.75rem;
    font-weight: 600;
}

/* EPK Package Highlight */
.download-pkg-highlight {
    text-align: center;
    background: var(--color-meta-bg, #f1f5f9);
    border: 2px solid var(--color-abo-bg, var(--accent-color, #e74c3c));
}

.download-pkg-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.download-pkg-title {
    margin: 0 0 0.5rem 0;
    color: var(--color-group-heading-text, var(--color-card-text, var(--text-color)));
}

.download-pkg-description {
    color: var(--color-meta-text, var(--color-page-text, #666));
    margin-bottom: 1.5rem;
}

/* File Grid Layout (Cards Display) */
.download-file-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.download-file-card {
    display: flex;
    flex-direction: column;
    text-align: center;
}

.download-file-preview {
    margin-bottom: 1rem;
    background: var(--color-meta-bg, #f8f9fa);
    border-radius: 6px;
    padding: 1rem;
    text-align: center;
    min-height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.download-file-preview img {
    max-width: 100%;
    height: auto;
    max-height: 200px;
    border-radius: 4px;
}

.download-file-icon {
    font-size: 4rem;
    margin: 1rem 0;
    text-align: center;
}

.download-file-info {
    flex: 1;
    margin-bottom: 1rem;
    text-align: center;
}

.download-file-name {
    display: block;
    word-break: break-word;
    color: var(--color-link, var(--primary-color));
    text-decoration: none;
    transition: color 0.2s;
}

.download-file-name:hover {
    color: var(--color-link-hover, var(--accent-color));
    text-decoration: underline;
}

.download-file-name strong {
    font-weight: 600;
}

.download-file-meta {
    color: var(--color-meta-text, var(--color-page-text, #666));
}

.download-file-download {
    margin-top: auto;
}

.download-empty-state {
    text-align: center;
    color: var(--color-meta-text, var(--color-page-text, #666));
}

/* File Table (List Display) */
.download-file-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: auto;
}

.download-file-table thead {
    background: var(--color-group-heading-bg, var(--color-primary, #3498db));
    color: var(--color-group-heading-text, white);
}

.download-file-table th {
    padding: 0.75rem 1rem;
    text-align: left;
    font-weight: 600;
    white-space: nowrap;
}

.download-file-table th:nth-child(1) { /* Datei */
    width: auto;
    min-width: 250px;
}

.download-file-table th:nth-child(2) { /* Typ */
    width: 100px;
    min-width: 80px;
}

.download-file-table th:nth-child(3) { /* Größe */
    width: 120px;
    min-width: 100px;
}

.download-file-table th:nth-child(4) { /* Download */
    width: 150px;
    min-width: 130px;
}

.download-file-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--color-card-border, #e0e0e0);
}

.download-file-table td:nth-child(1) { /* Datei name - allow wrapping */
    word-break: break-word;
}

.download-file-table td:nth-child(1) a {
    color: var(--color-link, var(--primary-color));
    text-decoration: none;
}

.download-file-table td:nth-child(1) a:hover {
    color: var(--color-link-hover, var(--accent-color));
    text-decoration: underline;
}

.download-file-table td:nth-child(2),
.download-file-table td:nth-child(3),
.download-file-table td:nth-child(4) {
    white-space: nowrap;
}

.download-file-table tbody tr:hover {
    background: var(--color-meta-bg, #f8f9fa);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .download-file-grid {
        grid-template-columns: 1fr;
    }
    
    /* Transform table to card layout on mobile */
    .download-file-table thead {
        display: none;
    }
    
    .download-file-table,
    .download-file-table tbody,
    .download-file-table tr,
    .download-file-table td {
        display: block;
        width: 100%;
    }
    
    .download-file-table tr {
        margin-bottom: 1rem;
        padding: 1rem;
        background: var(--color-card-bg, white);
        border: 1px solid var(--color-card-border, #e0e0e0);
        border-radius: 8px;
    }
    
    .download-file-table td {
        padding: 0.5rem 0;
        border: none;
        white-space: normal;
    }
    
    .download-file-table td::before {
        content: attr(data-label);
        font-weight: 600;
        display: block;
        margin-bottom: 0.25rem;
        color: var(--color-card-text, var(--text-color, #333));
    }
    
    .download-file-table td:nth-child(4)::before {
        display: none;
    }
    
    .download-file-table td:nth-child(4) .button {
        width: 100%;
        margin-top: 0.5rem;
    }
}

/* =================================================================== */
/* SVG Icon Styling (CalPager Icon System)                            */
/* =================================================================== */

/* Base SVG icon styles */
.cp-icon {
    width: 1em;
    height: 1em;
    vertical-align: -0.125em;
    fill: currentColor;
    stroke: currentColor;
    display: inline-block;
    flex-shrink: 0;
}

/* SVG icons in event meta */
.event-meta .cp-icon {
    margin-right: 0.25rem;
}

/* SVG icons in buttons */
.button .cp-icon,
.subscribe-button .cp-icon {
    margin-right: 0.5rem;
}

/* SVG icons in section headers */
.section-header .cp-icon {
    margin-right: 0.5rem;
    color: var(--color-abo-bg, var(--primary-color));
}

/* SVG icons in file listings */
.download-file-table .cp-icon,
.file-card .cp-icon,
.attachment-file .cp-icon {
    margin-right: 0.25rem;
    width: 1.2em;
}

/* SVG icons in subscribe info button */
.subscribe-info-icon .cp-icon {
    width: 1.1rem;
    height: 1.1rem;
}

/* =================================================================== */
/* Font Awesome Icon Styling                                          */
/* =================================================================== */

/* EPK Icons */
.download-pkg-icon i,
.download-file-icon i {
    display: inline-block;
}

/* Button Icons */
.button i,
.subscribe-button i {
    margin-right: 0.5rem;
}

/* Section Header Icons */
.section-header i {
    margin-right: 0.5rem;
    color: var(--color-abo-bg, var(--primary-color));
}

/* File Type Icons in Tables/Cards */
.download-file-table i,
.file-card i {
    margin-right: 0.25rem;
    width: 1.2em;
    text-align: center;
}
