/* === Reset & Basis === */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f8f9fa;
}

/* === Navigation === */
.main-nav {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 12px 8px;
    background: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
    flex-wrap: wrap;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #333;
    padding: 4px;
    border-radius: 8px;
    transition: background 0.2s;
    min-width: 0;
}

.nav-item:hover {
    background: #f0f0f0;
}

.nav-item img {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #ddd;
    transition: border-color 0.2s;
}

.nav-item:hover img {
    border-color: #667eea;
}

.nav-item span {
    margin-top: 4px;
    font-size: 11px;
    font-weight: 500;
    text-align: center;
    max-width: 60px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* === Page Header (H1) === */
.page-header {
    padding: 16px 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 1px solid #ddd;
    text-align: center;
}

.page-header h1 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2b5a34;
    margin: 0;
}

.page-header .page-subtitle {
    font-size: 0.85rem;
    color: #666;
    margin: 4px 0 0 0;
}

/* === Sections Grid === */
.sections-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 20px;
    max-width: 1400px;
    margin: 0 auto;
}

/* Tablet: 2 Spalten */
@media (min-width: 600px) {
    .sections-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Desktop: 3 Spalten */
@media (min-width: 1000px) {
    .sections-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 24px;
        padding: 32px;
    }
}

/* === Content Section === */
.content-section {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
    transition: transform 0.2s, box-shadow 0.2s;
}

.content-section:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.content-section h2 {
    font-size: 1.2rem;
    font-weight: 600;
    padding: 16px 16px 12px;
    color: #333;
    text-align: center;
}

.content-section img {
    width: 100%;
    aspect-ratio: 16/10;
    object-fit: cover;
    background: white;
}

/* Portrait-Bilder: Höhe beibehalten, Breite auto, zentriert */
.content-section img.img-portrait {
    object-fit: contain;
    object-position: center;
}

.section-text {
    padding: 12px 16px;
    flex: 1;
    line-height: 1.4;
}

.section-text p {
    margin-bottom: 6px;
    font-size: 0.95rem;
    color: #555;
}

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

/* Links im Text (gelb unterlegt) */
.section-text a {
    background: #ffc107;
    color: #333;
    padding: 2px 6px;
    border-radius: 3px;
    text-decoration: none;
    transition: background 0.2s;
}

.section-text a:hover {
    background: #e0a800;
}

/* === Section Link (gelb) === */
.section-link {
    display: inline-block;
    margin: 0 16px 16px;
    padding: 10px 20px;
    background: #ffc107;
    color: #333;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.9rem;
    text-align: center;
    transition: background 0.2s;
}

.section-link:hover {
    background: #e0a800;
}

/* === Footer === */
.main-footer {
    display: flex;
    justify-content: center;
    gap: 12px;
    padding: 16px;
    background: #333;
    margin-top: 40px;
    flex-wrap: wrap;
}

.main-footer .nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #ccc;
    padding: 8px;
    border-radius: 8px;
    transition: background 0.2s;
}

.main-footer .nav-item:hover {
    background: rgba(255,255,255,0.1);
}

.main-footer .nav-item img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #555;
    transition: border-color 0.2s;
}

.main-footer .nav-item:hover img {
    border-color: #667eea;
}

.main-footer .nav-item span {
    margin-top: 6px;
    font-size: 11px;
    font-weight: 500;
}

/* === Cookie Banner === */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #333;
    color: white;
    padding: 16px 24px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
    z-index: 1000;
    box-shadow: 0 -4px 12px rgba(0,0,0,0.2);
}

.cookie-banner p {
    margin: 0;
    font-size: 14px;
    max-width: 600px;
}

.cookie-banner a {
    color: #ffc107;
    text-decoration: underline;
}

.cookie-banner button {
    padding: 10px 24px;
    background: #ffc107;
    color: #333;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.cookie-banner button:hover {
    background: #e0a800;
}

.cookie-banner.hidden {
    display: none;
}

/* === Responsive Nav für kleine Screens === */
@media (max-width: 360px) {
    .main-nav {
        gap: 4px;
        padding: 10px 4px;
    }
    
    .nav-item img {
        width: 44px;
        height: 44px;
    }
    
    .nav-item span {
        font-size: 9px;
        max-width: 50px;
    }
}

/* === Größere Nav-Bilder auf Desktop === */
@media (min-width: 768px) {
    .main-nav {
        gap: 20px;
        padding: 16px;
    }
    
    .nav-item {
        padding: 8px;
    }
    
    .nav-item img {
        width: 72px;
        height: 72px;
    }
    
    .nav-item span {
        font-size: 14px;
        max-width: none;
    }
}

/* === Section Text Begrenzung === */
.section-text {
    padding: 12px 16px;
    flex: 1;
    line-height: 1.4;
    max-height: 7.5em; /* ca. 5 Zeilen */
    overflow: hidden;
}

.section-text:has(.section-more) {
    max-height: none;
    overflow: visible;
}

/* === Section Accordion (Mehr dazu) === */
.section-more {
    margin-top: 8px;
}

.section-more summary.section-link {
    display: inline-block;
    padding: 10px 20px;
    background: #ffc107;
    color: #333;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.2s;
    list-style: none;
}

.section-more summary.section-link::-webkit-details-marker {
    display: none;
}

.section-more summary.section-link:hover {
    background: #e0a800;
}

.section-more[open] summary.section-link {
    margin-bottom: 12px;
}

.section-more .more-content {
    padding: 8px 0;
    color: #555;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* === More Collapse Button === */
.more-collapse-btn {
    display: block;
    width: 100%;
    margin-top: 12px;
    padding: 8px;
    background: #e8e8e8;
    color: #666;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    text-align: center;
    transition: background 0.2s;
}

.more-collapse-btn:hover {
    background: #ddd;
    color: #333;
}