/* ========================================
   ÜBERSICHT - Styling für Übersichtsseiten
   Farbschema: Türkis/Teal (Hauptfarbe der Website)
   ======================================== */

/* ========================================
   HERO SUBPAGE
   ======================================== */

.hero-uebersicht {
    background: #e8f4f4;
    background: -webkit-linear-gradient(315deg, #e8f4f4 0%, #d4ebeb 100%);
    background: linear-gradient(135deg, #e8f4f4 0%, #d4ebeb 100%);
    padding: 3rem 0;
    margin-bottom: 3rem;
    position: relative;
    overflow: hidden;
    border-bottom: 4px solid #3d807f;
}

.hero-uebersicht::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(61, 128, 127, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(61, 128, 127, 0.08) 0%, transparent 50%);
    pointer-events: none;
}

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

.hero-uebersicht h1 {
    color: #2a5a59;
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.2;
}

/* ========================================
   PAGE CONTENT
   ======================================== */

.page-content {
    max-width: 1100px;
    margin: 0 auto;
    padding-bottom: 3rem;
}

/* Banner */
.page-banner {
    margin-bottom: 2rem;
    border-radius: 12px;
    overflow: hidden;
    -webkit-box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.page-banner img {
    width: 100%;
    height: auto;
    display: block;
}

/* Intro Text */
.intro-text {
    font-size: 1.1rem;
    line-height: 1.7;
    color: #333;
    margin-bottom: 2.5rem;
    max-width: 900px;
}

.intro-text p {
    margin: 0 0 1rem 0;
}

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

/* ========================================
   BOXES GRID - Karten für Unterseiten
   ======================================== */

.boxes-grid {
    display: -ms-grid;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin: 2rem 0 3rem 0;
}

/* Spezielle Layouts je nach Boxanzahl */
.boxes-grid.boxes-single {
    grid-template-columns: 1fr;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.boxes-grid.boxes-two {
    grid-template-columns: repeat(2, 1fr);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.boxes-grid.boxes-four {
    grid-template-columns: repeat(2, 1fr);
}

/* Box Card */
.box-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    -webkit-box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid #e8e8e8;
    -webkit-transition: box-shadow 0.3s ease, transform 0.3s ease;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.box-card:hover {
    -webkit-box-shadow: 0 8px 24px rgba(61, 128, 127, 0.15);
    box-shadow: 0 8px 24px rgba(61, 128, 127, 0.15);
    -webkit-transform: translateY(-4px);
    -ms-transform: translateY(-4px);
    transform: translateY(-4px);
}

/* Box Card Link - Gesamte Karte klickbar */
.box-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
    height: 100%;
}

/* Box Card Image */
.box-card-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 10;
    background: linear-gradient(135deg, #e8f4f4 0%, #d4ebeb 100%);
}

/* Fallback für Browser ohne aspect-ratio */
@supports not (aspect-ratio: 16 / 10) {
    .box-card-image {
        padding-bottom: 62.5%;
        height: 0;
    }
    
    .box-card-image img {
        position: absolute;
        top: 0;
        left: 0;
    }
}

.box-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    -webkit-transition: transform 0.4s ease;
    transition: transform 0.4s ease;
}

.box-card:hover .box-card-image img {
    -webkit-transform: scale(1.05);
    -ms-transform: scale(1.05);
    transform: scale(1.05);
}

/* Box Card Content */
.box-card-content {
    padding: 1.25rem 1.5rem 1.5rem 1.5rem;
}

.box-card-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #2a5a59;
    margin: 0 0 0.5rem 0;
    line-height: 1.3;
}

.box-card-text {
    font-size: 0.95rem;
    color: #666;
    line-height: 1.5;
    margin: 0 0 1rem 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* "Mehr erfahren" Link */
.box-card-action {
    display: -webkit-inline-box;
    display: -ms-inline-flexbox;
    display: inline-flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: #3d807f;
    -webkit-transition: color 0.2s ease;
    transition: color 0.2s ease;
}

.box-card-action svg {
    -webkit-transition: transform 0.2s ease;
    transition: transform 0.2s ease;
}

.box-card:hover .box-card-action {
    color: #2a5a59;
}

.box-card:hover .box-card-action svg {
    -webkit-transform: translateX(4px);
    -ms-transform: translateX(4px);
    transform: translateX(4px);
}

/* Karten ohne Bild - Anpassung */
.box-card:not(:has(.box-card-image)) .box-card-content {
    padding-top: 1.5rem;
}

/* Fallback für Browser ohne :has() */
.box-card-content:first-child {
    padding-top: 1.5rem;
}

/* ========================================
   VIDEO SECTION
   ======================================== */

.video-section {
    margin: 3rem 0;
}

.video-description {
    text-align: center;
    color: #555;
    font-size: 1rem;
    margin-bottom: 1rem;
    font-style: italic;
}

.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    overflow: hidden;
    max-width: 100%;
    background: #000;
    border-radius: 12px;
    -webkit-box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* ========================================
   OUTRO TEXT
   ======================================== */

.outro-text {
    font-size: 1.05rem;
    line-height: 1.7;
    color: #333;
    margin-top: 2rem;
    max-width: 900px;
    padding-top: 2rem;
    border-top: 1px solid #e0e0e0;
}

.outro-text p {
    margin: 0 0 1rem 0;
}

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

/* ========================================
   MELDUNGEN
   ======================================== */

.meldung {
    padding: 2rem;
    border-radius: 12px;
    margin: 2rem 0;
    text-align: center;
}

.meldung-warning {
    background: linear-gradient(135deg, #fff8e6 0%, #fff3d6 100%);
    border: 1px solid #f0d58c;
    color: #8a6d3b;
}

.meldung-warning h2 {
    color: #8a6d3b;
    margin: 0 0 0.75rem 0;
}

.meldung-warning .btn-solid {
    margin-top: 1rem;
    background: #8a6d3b;
    color: #fff;
    padding: 12px 24px;
    border-radius: 6px;
    text-decoration: none;
    display: inline-block;
}

.meldung-warning .btn-solid:hover {
    background: #6d5630;
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 992px) {
    .boxes-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .boxes-grid.boxes-four {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .hero-uebersicht {
        padding: 2rem 0;
        margin-bottom: 2rem;
    }

    .hero-uebersicht h1 {
        font-size: 1.8rem;
    }
    
    .page-content {
        padding-bottom: 2rem;
    }
    
    .intro-text {
        font-size: 1rem;
        margin-bottom: 2rem;
    }
    
    .boxes-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
    
    .boxes-grid.boxes-two,
    .boxes-grid.boxes-four {
        grid-template-columns: 1fr;
        max-width: 100%;
    }
    
    .box-card-content {
        padding: 1rem 1.25rem 1.25rem 1.25rem;
    }
    
    .box-card-title {
        font-size: 1.1rem;
    }
    
    .box-card-text {
        font-size: 0.9rem;
    }
}

/* ========================================
   PRINT
   ======================================== */

@media print {
    .hero-uebersicht {
        background: none;
        border-bottom: 2px solid #333;
        padding: 1rem 0;
    }
    
    .hero-uebersicht h1 {
        color: #000;
    }
    
    .boxes-grid {
        display: block;
    }
    
    .box-card {
        break-inside: avoid;
        margin-bottom: 1rem;
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    .box-card:hover {
        transform: none;
    }
    
    .video-section {
        display: none;
    }
}
