/* ========================================
   HERO SUBPAGE - Für Übersichts- und Detailseiten
   ======================================== */

.hero-subpage {
    background: linear-gradient(135deg, #522CA2 0%, #412383 100%);
    padding: 3rem 0 3rem;
    margin-bottom: 3rem;
    position: relative;
    overflow: hidden;
}

/* Termine-spezifische Farbe (Magenta/Pink) */
.hero-termine {
    background: linear-gradient(135deg, #8C0E73 0%, #6B0A58 100%);
}

/* Dezentes Hintergrundmuster */
.hero-subpage::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

.hero-subpage .container {
    position: relative;
    z-index: 1;
}

.hero-subpage h1 {
    color: var(--color-white, #fff);
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 0 0.75rem 0;
    line-height: 1.2;
}

.hero-subpage p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
    margin: 0;
    max-width: 600px;
}

/* Datum bei Neuigkeiten-Detail im Hero */
.news-meta {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.news-date,
.news-source {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.9);
}

.news-date svg,
.news-source svg {
    flex-shrink: 0;
    opacity: 0.8;
}

.news-source {
    font-weight: 500;
}

/* ========================================
   TERMINE - Hero Meta-Informationen
   ======================================== */

.termin-meta-hero {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.meta-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    color: rgba(255, 255, 255, 0.95);
}

.meta-item svg {
    flex-shrink: 0;
    margin-top: 0.2rem;
    opacity: 0.9;
}

.meta-label {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.25rem;
}

.meta-value {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.4;
}

.meta-date-large .meta-value {
    font-size: 1.1rem;
}

/* Termine-Liste spezifisch */
.termine-list-simple {
    margin-top: 2rem;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    gap: 1.25rem;
}

.termine-list-simple .termine-list-item {
    display: -ms-grid;
    display: grid;
    -ms-grid-columns: 100px 1.5rem 1fr;
    grid-template-columns: 100px 1fr;
    gap: 1.5rem;
    padding: 1.25rem;
    background: #fff;
    border-radius: 12px;
    -webkit-box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 1px solid #f0f0f0;
    -webkit-transition: box-shadow 0.2s ease, transform 0.2s ease;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.termine-list-simple .termine-list-item:hover {
    -webkit-box-shadow: 0 4px 16px rgba(140, 14, 115, 0.12);
    box-shadow: 0 4px 16px rgba(140, 14, 115, 0.12);
    -webkit-transform: translateY(-2px);
    -ms-transform: translateY(-2px);
    transform: translateY(-2px);
}

/* Grid-Bereiche für IE/Edge */
.termine-list-simple .termine-list-item .termin-item-date {
    -ms-grid-row: 1;
    -ms-grid-column: 1;
}

.termine-list-simple .termine-list-item .termin-item-content {
    -ms-grid-row: 1;
    -ms-grid-column: 3;
}

.termin-item-date {
    background: -webkit-linear-gradient(315deg, #8C0E73 0%, #6B0A58 100%);
    background: linear-gradient(135deg, #8C0E73 0%, #6B0A58 100%);
    color: white;
    border-radius: 12px;
    padding: 1rem 0.75rem;
    text-align: center;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-shadow: 0 3px 10px rgba(140, 14, 115, 0.3);
    box-shadow: 0 3px 10px rgba(140, 14, 115, 0.3);
    min-height: 90px;
}

.date-day {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
}

.date-month {
    font-size: 0.9rem;
    text-transform: uppercase;
    margin-top: 0.25rem;
    opacity: 0.9;
}

.date-year {
    font-size: 0.85rem;
    margin-top: 0.25rem;
    opacity: 0.8;
}

.termin-item-content {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    min-width: 0;
}

.termin-item-title {
    margin: 0;
    font-size: 1.2rem;
    line-height: 1.4;
    font-weight: 600;
}

.termin-item-title a {
    color: var(--color-text, #333);
    text-decoration: none;
    transition: color 0.2s ease;
}

.termin-item-title a:hover {
    color: #8C0E73;
}

.termin-item-meta {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    font-size: 0.9rem;
    color: var(--color-text-light, #666);
}

.meta-time,
.meta-location {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.meta-time svg,
.meta-location svg {
    flex-shrink: 0;
    color: #8C0E73;
}

.termin-item-source {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}

/* Vergangene Termine dezenter darstellen */
.termine-list-item.is-past {
    opacity: 0.65;
}

.termine-list-item.is-past .termin-item-date {
    background: -webkit-linear-gradient(315deg, #888 0%, #666 100%);
    background: linear-gradient(135deg, #888 0%, #666 100%);
    -webkit-box-shadow: 0 2px 8px rgba(100, 100, 100, 0.2);
    box-shadow: 0 2px 8px rgba(100, 100, 100, 0.2);
}

.termine-list-item.is-past:hover {
    opacity: 0.85;
}

/* Responsive Termine-Liste */
@media (max-width: 600px) {
    .termine-list-simple .termine-list-item {
        -ms-grid-columns: 80px 1rem 1fr;
        grid-template-columns: 80px 1fr;
        gap: 1rem;
        padding: 1rem;
    }
    
    .termin-item-date {
        min-height: 75px;
        padding: 0.75rem 0.5rem;
    }
    
    .date-day {
        font-size: 1.5rem;
    }
    
    .date-month {
        font-size: 0.8rem;
    }
    
    .date-year {
        font-size: 0.75rem;
    }
    
    .termin-item-title {
        font-size: 1.05rem;
    }
    
    .termin-item-meta {
        gap: 0.75rem;
        font-size: 0.85rem;
    }
}

/* Karten-Container */
.map-container {
    margin: 1.5rem 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Responsive */
@media (max-width: 768px) {
    .hero-subpage {
        padding: 2rem 0 2rem;
        margin-bottom: 2rem;
    }
    
    .hero-subpage h1 {
        font-size: 1.8rem;
    }
    
    .hero-subpage p {
        font-size: 1rem;
    }
    
    .news-meta {
        gap: 1rem;
        font-size: 0.85rem;
    }
    
    .block-text {
        font-size: 1rem;
    }
    
    .content-block {
        margin-bottom: 2rem;
    }
    
    .page-navigation-buttons {
        flex-direction: column;
    }
    
    .page-navigation-buttons .btn {
        width: 100%;
        justify-content: center;
    }
}

/* ========================================
   NEUIGKEITEN - Styling für Detail- und Übersichtsseiten
   ======================================== */

/* Content-Blöcke für Detailseite */
.content-block {
    margin-bottom: 2.5rem;
}

.content-block:last-child {
    margin-bottom: 3rem;
}

/* Banner-Bild oben */
.content-block.position-oben {
    margin-bottom: 3rem;
}

.block-image {
    margin: 0 0 2rem 0; /* Abstand nach unten hinzugefügt */
}

.block-image img {
    width: 100%;
    max-width: 900px; /* Maximale Breite begrenzen */
    height: auto;
    display: block;
    margin: 0 auto; /* Zentrieren */
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.block-image figcaption {
    margin-top: 0.75rem;
    text-align: center;
    font-size: 0.9rem;
    color: var(--color-text-light, #666);
    font-style: italic;
}

/* Text-Blöcke */
.block-text {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--color-text, #333);
}

.block-text p {
    margin-bottom: 1.25rem;
}

.block-text p:last-child {
    margin-bottom: 0;
}

.block-text h2,
.block-text h3,
.block-text h4 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--color-text, #333);
}

.block-text ul,
.block-text ol {
    margin: 1.25rem 0;
    padding-left: 2rem;
}

.block-text li {
    margin-bottom: 0.5rem;
}

.block-text a {
    color: var(--color-primary, #4a9c4a);
    text-decoration: underline;
}

.block-text a:hover {
    color: var(--color-primary-dark, #3a7d3a);
}

/* Navigationt-Buttons */
.page-navigation-buttons {
    margin-top: 3rem;
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.page-navigation-buttons .btn {
    padding: 12px 24px;
    border-radius: 8px;
    font-family: "FS Me W01 Bold", Arial, sans-serif;
    font-weight: bold;
    font-size: 1rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.page-navigation-buttons .btn-solid {
    background-color: var(--color-primary, #4a9c4a);
    color: var(--color-white, #fff);
    border: none;
}

.page-navigation-buttons .btn-solid:hover {
    background-color: var(--color-primary-dark, #3a7d3a);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(74, 156, 74, 0.3);
}

.page-navigation-buttons .btn-outline {
    background-color: transparent;
    color: var(--color-primary, #4a9c4a);
    border: 2px solid var(--color-primary, #4a9c4a);
}

.page-navigation-buttons .btn-outline:hover {
    background-color: var(--color-primary, #4a9c4a);
    color: var(--color-white, #fff);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(74, 156, 74, 0.3);
}

.page-navigation-buttons .btn-outline:active,
.page-navigation-buttons .btn-solid:active {
    transform: translateY(0);
}

/* Video Container für eingebettete Videos */
.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
    margin: 2rem 0;
}

.video-container iframe,
.video-container object,
.video-container embed {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.video-description {
    text-align: center;
    color: var(--color-text-light, #666);
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

/* Bildergalerie für zusätzliche Bilder */
.image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.gallery-item {
    margin: 0;
}

.gallery-item img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item img:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

/* ========================================
   NEUIGKEITEN-ÜBERSICHT - Einfache Listen-Ansicht
   ======================================== */

.news-list-simple {
    margin: 2rem 0;
    background: var(--color-white, #fff);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.news-list-item {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 1.5rem;
    align-items: flex-start;
    padding: 1.25rem 1.75rem;
    border-bottom: 1px solid var(--color-background-light, #f0f0f0);
    transition: background-color 0.2s ease;
    
    /* Verhindert Layout-Sprünge in Safari */
    min-height: 0;
}

.news-list-item:last-child {
    border-bottom: none;
}

.news-list-item:hover {
    background-color: var(--color-background-light, #f8f8f8);
}

.news-item-date {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--color-primary, #4a9c4a);
    white-space: nowrap;
    padding-top: 0.2rem;
    
    /* Verhindert Text-Breaking in Safari */
    word-break: keep-all;
}

.news-item-content {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-width: 0; /* Wichtig für Flexbox-Overflow in Firefox */
}

.news-item-title {
    margin: 0;
    font-size: 1.1rem;
    line-height: 1.4;
    font-weight: 500;
    word-wrap: break-word; /* Für lange Wörter in allen Browsern */
    overflow-wrap: break-word;
}

.news-item-title a {
    color: var(--color-text, #333);
    text-decoration: none;
    transition: color 0.2s ease;
    
    /* Verhindert unerwünschte Outline-Styles in Firefox */
    outline-offset: 2px;
}

.news-item-title a:hover {
    color: var(--color-primary, #4a9c4a);
}

.news-item-title a:focus {
    outline: 2px solid var(--color-primary, #4a9c4a);
    outline-offset: 2px;
}

.news-item-source {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap; /* Für kleine Bildschirme */
}

.source-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    white-space: nowrap;
    
    /* Verhindert User-Selection für bessere UX */
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.source-landesverband {
    background-color: #4a9c4a;
    color: var(--color-white, #fff);
}

.source-gruppe {
    background-color: #e8f5e9;
    color: #2e7d32;
}

.source-ort {
    font-weight: 400;
    opacity: 0.8;
}

/* Responsive Layout für kleinere Bildschirme */
@media (max-width: 768px) {
    .news-list-item {
        grid-template-columns: 1fr;
        gap: 0.75rem;
        padding: 1rem 1.25rem;
    }
    
    .news-item-date {
        font-size: 0.85rem;
        padding-top: 0;
    }
    
    .news-item-title {
        font-size: 1rem;
    }
    
    .source-badge {
        font-size: 0.75rem;
    }
}

/* Print-Styles */
@media print {
    .news-list-item {
        page-break-inside: avoid;
        break-inside: avoid;
    }
    
    .news-list-item:hover {
        background-color: transparent;
    }
    
    .news-item-title a {
        color: var(--color-text, #333);
        text-decoration: underline;
    }
}

/* ========================================
   FILTER-BEREICH
   ======================================== */

.news-filter,
.termine-filter {
    background: var(--color-white, #fff);
    padding: 1.75rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-bottom: 2rem;
}

/* Termine-Filter mit Magenta-Akzent */
.termine-filter .filter-icon {
    color: #8C0E73;
}

.termine-filter .filter-select:focus {
    border-color: #8C0E73;
    -webkit-box-shadow: 0 0 0 3px rgba(140, 14, 115, 0.1);
    box-shadow: 0 0 0 3px rgba(140, 14, 115, 0.1);
}

.termine-filter .filter-actions .btn-solid {
    background-color: #8C0E73;
}

.termine-filter .filter-actions .btn-solid:hover {
    background-color: #6B0A58;
}

.termine-filter .filter-actions .btn-outline {
    color: #8C0E73;
    border-color: #8C0E73;
}

.termine-filter .filter-actions .btn-outline:hover {
    background-color: #8C0E73;
    color: #fff;
}

.termine-filter .results-count {
    color: #8C0E73;
}

.filter-form {
    margin-bottom: 0;
}

.filter-grid {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 1.25rem;
    align-items: end;
}

.filter-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--color-text, #333);
}

.filter-icon {
    color: var(--color-primary, #4a9c4a);
    flex-shrink: 0;
}

.filter-select {
    width: 100%;
    padding: 0.65rem 2.5rem 0.65rem 1rem; /* Extra padding rechts für Pfeil */
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit; /* Verwendet die Schriftart der Seite */
    line-height: 1.5;
    background-color: var(--color-white, #fff);
    color: var(--color-text, #333);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
    
    /* Cross-Browser Dropdown-Pfeil */
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23333' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1.25rem;
}

/* Safari-spezifische Fixes */
@supports (-webkit-appearance: none) {
    .filter-select {
        background-position: right 0.75rem center;
    }
}

.filter-select:hover {
    border-color: #c0c0c0;
}

.filter-select:focus {
    outline: none;
    border-color: var(--color-primary, #4a9c4a);
    box-shadow: 0 0 0 3px rgba(74, 156, 74, 0.1);
}

/* Firefox-spezifische Dropdown-Option Styles */
.filter-select option {
    padding: 0.5rem;
    background-color: var(--color-white, #fff);
    color: var(--color-text, #333);
}

.filter-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.filter-actions .btn {
    white-space: nowrap;
    margin: 0;
    padding: 10px 20px;
    border-radius: 8px;
    font-family: "FS Me W01 Bold", Arial, sans-serif;
    font-weight: bold;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    line-height: 1.5;
    
    /* Verhindert Text-Selection beim Klicken */
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.filter-actions .btn-solid {
    background-color: var(--color-secondary, #4a9c4a);
    color: var(--color-white, #fff);
}

.filter-actions .btn-solid:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.filter-actions .btn-solid:active {
    transform: translateY(0);
}

.filter-actions .btn-outline {
    background-color: transparent;
    color: var(--color-secondary, #4a9c4a);
    border: 2px solid var(--color-secondary, #4a9c4a);
}

.filter-actions .btn-outline:hover {
    background-color: var(--color-secondary, #4a9c4a);
    color: var(--color-white, #fff);
    transform: translateY(-2px);
}

.filter-actions .btn-outline:active {
    transform: translateY(0);
}

.filter-results {
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.results-count {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-primary, #4a9c4a);
    line-height: 1;
}

.results-text {
    color: var(--color-text, #333);
    font-size: 1rem;
}

.results-divider {
    color: #ccc;
    margin: 0 0.25rem;
}

.results-filters {
    color: var(--color-text-light, #666);
    font-size: 0.95rem;
}

/* Responsive Filter */
@media (max-width: 992px) {
    .filter-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .filter-actions {
        width: 100%;
    }
    
    .filter-actions .btn {
        flex: 1;
    }
}

@media (max-width: 768px) {
    .news-filter {
        padding: 1.25rem;
    }
    
    .filter-results {
        font-size: 0.9rem;
    }
    
    .results-count {
        font-size: 1.25rem;
    }
    
    .filter-select {
        font-size: 16px; /* Verhindert Zoom auf iOS beim Fokus */
    }
}

/* ========================================
   PAGINATION
   ======================================== */

.pagination {
    margin: 3rem 0;
    display: flex;
    justify-content: center;
}

.pagination-list {
    display: flex;
    gap: 0.5rem;
    list-style: none;
    padding: 0;
    margin: 0;
    flex-wrap: wrap;
    justify-content: center;
}

.pagination-item {
    margin: 0;
}

.pagination-link {
    display: inline-block;
    padding: 0.6rem 1rem;
    background: var(--color-white, #fff);
    border: 2px solid var(--color-primary, #3d807f);
    color: var(--color-primary, #3d807f);
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.pagination-link:hover {
    background: var(--color-primary, #3d807f);
    color: var(--color-white, #fff);
    transform: translateY(-2px);
}

.pagination-current {
    background: var(--color-primary, #3d807f);
    color: var(--color-white, #fff);
    cursor: default;
}

.pagination-current:hover {
    transform: none;
}

/* Info-Message für leere Listen */
.info-message {
    text-align: center;
    padding: 3rem 1rem;
    background: var(--color-background-light, #f5f5f5);
    border-radius: 8px;
    margin: 2rem 0;
}

.info-message p {
    color: var(--color-text-light, #666);
    font-size: 1.1rem;
}