/* ========================================
   UWC Manta Wilhelmshaven - Stylesheet
   Modernes, helles Design mit Orange-Akzenten
   ======================================== */

/* ========================================
   Accessibility Utilities
   ======================================== */

/* Screen Reader Only - versteckt visuell, aber für Screenreader zugänglich */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Skip Link - erscheint nur bei Fokus */
.skip-link {
    position: absolute;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-color);
    color: #fff;
    padding: 12px 24px;
    border-radius: 0 0 8px 8px;
    text-decoration: none;
    font-weight: 600;
    z-index: 10000;
    transition: top 0.2s ease;
}

.skip-link:focus {
    top: 0;
    outline: 3px solid var(--secondary-color);
    outline-offset: 2px;
}

/* Global Focus Styles für Barrierefreiheit */
:focus-visible {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
}

/* Entferne Outline bei Maus-Klick, behalte bei Tastatur */
:focus:not(:focus-visible) {
    outline: none;
}

/* Buttons und Links mit sichtbarem Fokus */
a:focus-visible,
button:focus-visible,
[role="button"]:focus-visible {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
    border-radius: 4px;
}

/* CSS Variables */
:root {
    --primary-color: #FF9800;
    --primary-dark: #F57C00;
    --primary-light: #FFB74D;
    --secondary-color: #0277BD;
    --text-dark: #212121;
    --text-light: #757575;
    --bg-light: #FFFFFF;
    --bg-gray: #F5F5F5;
    --bg-alt: #FAFAFA;
    --border-color: #E0E0E0;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s ease;
    --font-primary: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* Dark Mode Variables */
[data-theme="dark"] {
    --primary-color: #FFB74D;
    --primary-dark: #FF9800;
    --primary-light: #FFE0B2;
    --secondary-color: #4FC3F7;
    --text-dark: #E0E0E0;
    --text-light: #BDBDBD;
    --bg-light: #1E1E1E;
    --bg-gray: #2D2D2D;
    --bg-alt: #252525;
    --border-color: #424242;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.4);
}

/* Dark Mode Theme Toggle Button in Header */
.theme-toggle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: transparent;
    border: 2px solid var(--border-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: var(--transition);
    margin-left: 15px;
    flex-shrink: 0;
}

.theme-toggle:hover {
    background: var(--bg-gray);
    border-color: var(--primary-color);
}

/* Dark mode specific overrides */
[data-theme="dark"] .hero {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
}

[data-theme="dark"] .hero-overlay {
    background: rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .hero h1,
[data-theme="dark"] .hero-subtitle {
    color: #FFFFFF;
}

[data-theme="dark"] .section-alt {
    background-color: var(--bg-gray);
}

[data-theme="dark"] .news-card,
[data-theme="dark"] .info-card,
[data-theme="dark"] .info-box {
    background-color: var(--bg-alt);
}

[data-theme="dark"] .footer {
    background-color: #121212;
    color: #E0E0E0;
}

[data-theme="dark"] .footer-column h4 {
    color: #4FC3F7;
}

[data-theme="dark"] .footer-column p {
    color: #B0B0B0;
}

[data-theme="dark"] .footer-links a {
    color: #B0B0B0;
}

[data-theme="dark"] .footer-links a:hover {
    color: #4FC3F7;
}

[data-theme="dark"] .footer-bottom {
    color: #909090;
    border-top-color: #333333;
}

[data-theme="dark"] img {
    opacity: 0.9;
    background-color: #1e2128;
}

[data-theme="dark"] .btn-primary {
    background-color: var(--primary-color);
    color: #1E1E1E;
}

[data-theme="dark"] .btn-secondary {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

[data-theme="dark"] .btn-secondary:hover {
    background-color: var(--primary-color);
    color: #1E1E1E;
}

[data-theme="dark"] input,
[data-theme="dark"] select,
[data-theme="dark"] textarea {
    background-color: var(--bg-gray);
    color: var(--text-dark);
    border-color: var(--border-color);
}

[data-theme="dark"] table th {
    background-color: var(--secondary-color) !important;
}

[data-theme="dark"] table tr:nth-child(even) {
    background-color: var(--bg-gray) !important;
}

[data-theme="dark"] table tr:nth-child(odd) {
    background-color: var(--bg-alt) !important;
}

[data-theme="dark"] table td {
    color: var(--text-dark);
}

/* Dark Mode - Inline style overrides for Tauchrevier page */
[data-theme="dark"] div[style*="background: white"],
[data-theme="dark"] div[style*="background:white"] {
    background: var(--bg-alt) !important;
}

[data-theme="dark"] div[style*="background: #E3F2FD"],
[data-theme="dark"] div[style*="background:#E3F2FD"] {
    background: #1a3a52 !important;
}

[data-theme="dark"] div[style*="background: #E8F5E9"],
[data-theme="dark"] div[style*="background:#E8F5E9"] {
    background: #1a3a2a !important;
}

[data-theme="dark"] div[style*="background: #FFF3E0"],
[data-theme="dark"] div[style*="background:#FFF3E0"] {
    background: #3a2a1a !important;
}

[data-theme="dark"] div[style*="background: #f5f5f5"],
[data-theme="dark"] div[style*="background:#f5f5f5"],
[data-theme="dark"] tr[style*="background: #f5f5f5"],
[data-theme="dark"] tr[style*="background:#f5f5f5"] {
    background: var(--bg-gray) !important;
}

[data-theme="dark"] p[style*="color: #666"],
[data-theme="dark"] p[style*="color:#666"],
[data-theme="dark"] span[style*="color: #666"],
[data-theme="dark"] span[style*="color:#666"] {
    color: #B0B0B0 !important;
}

/* Dark Mode - Info-box with inline backgrounds */
[data-theme="dark"] .info-box[style*="background: #E3F2FD"],
[data-theme="dark"] .info-box[style*="background:#E3F2FD"] {
    background: #1a3a52 !important;
}

[data-theme="dark"] .info-box[style*="background: #FFF3E0"],
[data-theme="dark"] .info-box[style*="background:#FFF3E0"] {
    background: #3a2a1a !important;
}

[data-theme="dark"] .info-box[style*="background: linear-gradient"] {
    background: #1a3a52 !important;
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-y: scroll;
    overflow-x: hidden;
}

body {
    font-family: var(--font-primary);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-light);
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
    background-color: var(--bg-gray, #f5f5f5);
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ========================================
   Header & Navigation
   ======================================== */

.header {
    background-color: var(--bg-light);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    padding: 15px 0;
    gap: 40px;
}

.logo {
    flex-shrink: 0;
}

.logo img {
    height: 70px;
    width: 70px;
    object-fit: cover;
    object-position: center;
    /* Runder Rahmen für kreisförmiges Logo */
    border-radius: 50%;
    /* Kleiner Schatten für bessere Sichtbarkeit */
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    display: block;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 12px;
    align-items: center;
}

.nav-menu a {
    color: var(--text-dark);
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 4px;
    transition: var(--transition);
    white-space: nowrap;
}

.nav-menu a:hover,
.nav-menu a.active {
    background-color: var(--primary-light);
    color: var(--bg-light);
}

.nav-menu .member-link {
    background-color: var(--primary-color);
    color: var(--bg-light);
}

.nav-menu .member-link:hover {
    background-color: var(--primary-dark);
}

/* Dropdown Menu */
.nav-menu .has-dropdown {
    position: relative;
}

.nav-menu .has-dropdown > a::after {
    content: ' ▾';
    font-size: 0.7em;
}

.nav-menu .dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--bg-light);
    box-shadow: var(--shadow-hover);
    border-radius: 8px;
    min-width: 220px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--transition);
    list-style: none;
    padding: 8px 0;
    z-index: 1001;
}

@media (hover: hover) {
    .nav-menu .has-dropdown:hover .dropdown {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
}

.nav-menu .dropdown li {
    margin: 0;
}

.nav-menu .dropdown a {
    display: block;
    padding: 10px 20px;
    color: var(--text-dark);
    white-space: nowrap;
    border-radius: 0;
}

.nav-menu .dropdown a:hover {
    background-color: var(--bg-gray);
    color: var(--primary-color);
}

.dropdown-toggle {
    display: none;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background-color: var(--text-dark);
    margin: 3px 0;
    transition: var(--transition);
}

/* ========================================
   Hero Section
   ======================================== */

.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: var(--bg-light);
    padding: 80px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-overlay {
    position: relative;
    z-index: 2;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    font-weight: 700;
    color: #FFFFFF;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 30px;
    color: #FFFFFF;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

/* ========================================
   Sichtdaten-Banner & CTA-Gradient
   ======================================== */

.sicht-banner {
    background: linear-gradient(135deg, #0277BD 0%, #01579B 100%);
    color: white;
    padding: 20px 0;
}

.sicht-banner a {
    color: white;
    text-decoration: none;
}

.sicht-banner-content {
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: center;
    gap: 30px;
    text-align: center;
}

@media (max-width: 768px) {
    .sicht-banner-content {
        flex-wrap: wrap;
    }
}

.sicht-banner-label {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.9;
}

.sicht-banner-values {
    display: flex;
    gap: 30px;
    justify-content: center;
}

.sicht-banner-detail {
    font-size: 0.9rem;
    opacity: 0.9;
}

.sicht-banner-value {
    font-size: 1.5rem;
    font-weight: bold;
}

.sicht-banner-sublabel {
    display: block;
    font-size: 0.8rem;
    opacity: 0.8;
}

.sicht-banner-note {
    font-size: 0.9rem;
}

.sicht-banner-date {
    display: block;
    font-size: 0.75rem;
    opacity: 0.7;
}

.sicht-banner-link {
    opacity: 0.8;
    font-size: 0.85rem;
}

.cta-gradient {
    background: linear-gradient(135deg, #0277BD 0%, #01579B 100%);
    color: white;
    text-align: center;
    padding: 50px 0;
}

.cta-gradient h2 {
    color: white;
    margin-bottom: 15px;
}

.cta-gradient p {
    max-width: 600px;
    margin: 0 auto 25px;
    opacity: 0.9;
}

.btn-cta-white {
    background: white;
    color: #01579B;
    font-weight: bold;
}

/* ========================================
   Buttons
   ======================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 30px;
    border-radius: 6px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-size: 1rem;
    min-height: 44px; /* WCAG Touch-Target */
}

.btn-primary {
    background-color: var(--bg-light);
    color: var(--primary-color);
}

.btn-primary:hover {
    background-color: var(--bg-gray);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.btn-secondary {
    background-color: var(--primary-color);
    color: var(--bg-light);
}

.btn-secondary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
}
.btn-icon svg {
    width: 16px;
    height: 16px;
}
.btn-icon-edit {
    background: var(--primary-color);
    color: white;
}
.btn-icon-edit:hover {
    opacity: 0.85;
}
.btn-icon-delete {
    background: #c62828;
    color: white;
}
.btn-icon-delete:hover {
    background: #b71c1c;
}

/* ========================================
   Sections
   ======================================== */

.section {
    padding: 40px 0;
}

.section-alt {
    background-color: var(--bg-gray);
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 40px;
    text-align: center;
    color: var(--text-dark);
}

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background-color: var(--primary-color);
    margin: 15px auto 0;
    border-radius: 2px;
}

/* Two Column Layout */
.two-column {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.content-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.content-columns.align-top {
    align-items: start;
}

.content-columns .column {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* ========================================
   Cards & Components
   ======================================== */

.news-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-bottom: 40px;
}

.news-card {
    background: var(--bg-light);
    border-radius: 8px;
    padding: 30px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

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

.news-card-header {
    margin: -30px -30px 0 -30px;
    padding: 12px 30px;
    border-radius: 8px 8px 0 0;
    text-align: center;
    position: relative;
}

.header-emoji {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
}

.news-card h3 {
    font-size: 1.5rem;
    margin-bottom: 8px;
    color: var(--text-dark);
}

.news-card-header h3 {
    margin-bottom: 0;
}

.news-date {
    color: var(--text-light);
    font-size: 0.9rem;
}

.news-card p {
    color: var(--text-light);
    margin-bottom: 20px;
}

.news-card .btn {
    align-self: flex-start;
    margin-top: auto;
}

/* Info Card - non-clickable informational cards */
.info-card {
    background: var(--bg-light);
    border-radius: 8px;
    padding: 30px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
}

.info-card h3 {
    font-size: 1.5rem;
    margin-bottom: 8px;
    color: var(--text-dark);
}

.info-card p {
    color: var(--text-light);
    margin-bottom: 10px;
}

/* Info Box */
.info-box {
    background: var(--bg-light);
    padding: 30px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--primary-color);
}

.info-box h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.info-list {
    list-style: none;
}

.info-list li {
    padding: 10px 0;
    padding-left: 1.5em;
    text-indent: -1.5em;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-light);
}

.info-list li:last-child {
    border-bottom: none;
}

.info-list li::before {
    content: '✓';
    color: var(--primary-color);
    font-weight: bold;
    margin-right: 0.5em;
}

/* Events Preview */
.events-preview {
    background: var(--bg-light);
    padding: 30px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    margin-bottom: 30px;
}

.placeholder-text {
    text-align: center;
    color: var(--text-light);
    font-style: italic;
}

/* Text Center */
.text-center {
    text-align: center;
}

/* ========================================
   Footer
   ======================================== */

.footer {
    background-color: var(--text-dark);
    color: var(--bg-light);
    padding: 60px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-column h4 {
    color: var(--primary-light);
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.footer-column p {
    color: var(--bg-gray);
    line-height: 1.8;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: var(--bg-gray);
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--primary-light);
    padding-left: 5px;
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--bg-gray);
    font-size: 0.9rem;
}

/* ========================================
   Responsive Design
   ======================================== */

/* Narrow desktop: Compact nav for iPad landscape (~1025-1200px) */
@media (min-width: 1025px) and (max-width: 1200px) {
    .header-content {
        gap: 20px;
    }
    .nav-menu {
        gap: 4px;
    }
    .nav-menu a {
        padding: 8px 8px;
        font-size: 0.9rem;
    }
}

/* Medium screens: Tighter navigation spacing */
@media (max-width: 1024px) {
    /* Header auf Mobile: fixed statt sticky (sticky bricht auf iOS Safari) */
    .header {
        position: fixed;
        width: 100%;
    }

    body {
        padding-top: 100px;
    }

    /* Elemente auf Tablets/Mobil ausblenden */
    .hide-mobile,
    .jahresverlauf-table th:nth-child(3),
    .jahresverlauf-table td:nth-child(3) {
        display: none !important;
    }

    .header-content {
        display: -webkit-flex;
        display: flex;
        gap: 15px;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 90px;
        flex-direction: column;
        align-items: stretch;
        background-color: var(--bg-light);
        width: 100%;
        text-align: left;
        transition: 0.3s;
        box-shadow: var(--shadow);
        padding: 20px 0;
        gap: 5px;
    }

    .nav-menu > li {
        padding: 0 20px;
    }

    .nav-menu > li > a {
        min-height: 44px;
        display: flex;
        align-items: center;
    }

    .nav-menu.active {
        left: 0;
    }

    .logo {
        -webkit-order: 0;
        order: 0;
    }

    .nav {
        -webkit-order: -1;
        order: -1;
    }

    .nav-toggle {
        display: -webkit-flex;
        display: flex;
    }

    .theme-toggle {
        width: 44px;
        height: 44px;
        font-size: 1rem;
        margin-left: auto;
        -webkit-order: 1;
        order: 1;
    }

    /* Mobile Dropdown: Accordion */
    .nav-menu .has-dropdown {
        position: relative;
        display: flex;
        flex-wrap: wrap;
    }

    .nav-menu .has-dropdown > a::after {
        content: none;
    }

    .dropdown-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        min-height: 44px;
        background: none;
        border: none;
        color: var(--text-dark);
        cursor: pointer;
        font-size: 0.9rem;
        padding: 0;
        transition: var(--transition);
    }

    .dropdown-toggle:hover {
        background: var(--bg-gray);
        border-radius: 4px;
    }

    .has-dropdown.open .dropdown-toggle {
        transform: rotate(180deg);
    }

    .nav-menu .dropdown {
        position: static;
        transform: none;
        box-shadow: none;
        background: transparent;
        display: none;
        width: 100%;
        padding: 0;
        opacity: 1;
        visibility: visible;
        min-width: unset;
        border-radius: 0;
    }

    .nav-menu .has-dropdown.open .dropdown {
        display: block;
        padding: 4px 0;
    }

    .nav-menu .dropdown a {
        padding: 10px 20px 10px 35px;
        font-size: 0.9rem;
        border-left: 3px solid var(--primary-color);
        margin-left: 20px;
        border-radius: 0;
    }
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .two-column,
    .content-columns {
        display: flex;
        flex-direction: column;
        gap: 30px;
    }

    .content-columns.keep-tablet {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0;
    }

    .section {
        padding: 50px 0;
    }

    .section-title {
        font-size: 2rem;
    }
}

/* ========================================
   Cookie Consent Banner
   ======================================== */

#cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-light);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    padding: 20px;
    transform: translateY(0);
    transition: transform 0.3s ease;
}

#cookie-banner.cookie-banner-hidden {
    transform: translateY(100%);
}

.cookie-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.cookie-content p {
    flex: 1;
    min-width: 280px;
    margin: 0;
    font-size: 0.95rem;
    color: var(--text-dark);
}

.cookie-content a {
    color: var(--primary-color);
    text-decoration: underline;
}

.cookie-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.cookie-btn {
    padding: 12px 24px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    min-height: 44px; /* WCAG Touch-Target */
}

.cookie-btn-accept {
    background: var(--primary-color);
    color: white;
}

.cookie-btn-accept:hover {
    background: var(--primary-dark);
}

.cookie-btn-decline {
    background: transparent;
    border: 2px solid var(--border-color);
    color: var(--text-dark);
}

.cookie-btn-decline:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

[data-theme="dark"] #cookie-banner {
    background: #2D2D2D;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .cookie-btn-decline {
    border-color: #555;
    color: #E0E0E0;
}

[data-theme="dark"] .cookie-btn-decline:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

@media (max-width: 480px) {
    .logo img {
        height: 55px;
        width: 55px;
    }

    .hero {
        padding: 60px 0;
    }

    .news-grid {
        grid-template-columns: 1fr;
    }

    .content-columns.keep-tablet {
        grid-template-columns: 1fr;
    }
}

/* Ultra-Small Devices (iPhone SE, kleine Android) */
@media (max-width: 375px) {
    .container {
        padding: 0 15px;
    }

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

    .hero-subtitle {
        font-size: 0.95rem;
    }

    .news-cards {
        gap: 15px;
    }

    .section {
        padding: 50px 0;
    }

    /* Cookie-Banner für sehr kleine Screens */
    .cookie-buttons {
        flex-direction: column;
        gap: 10px;
    }

    .cookie-btn {
        width: 100%;
        text-align: center;
    }
}

/* ========================================
   Responsive Gallery (3-Spalten -> 1-Spalte)
   ======================================== */

.gallery-thirds {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.gallery-thirds img {
    width: calc(33.333% - 7px);
    border-radius: 8px;
    object-fit: cover;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

@media (max-width: 1024px) {
    .gallery-thirds {
        display: grid;
        grid-template-columns: 1fr 1fr;
        grid-template-rows: 1fr 1fr;
    }

    .gallery-thirds img {
        width: 100%;
        height: 100%;
    }

    .gallery-thirds img:nth-child(3) {
        grid-column: 2;
        grid-row: 1 / 3;
    }
}

/* ========================================
   Contact Box (wiederverwendbar)
   ======================================== */

.contact-box {
    background: var(--bg-light);
    padding: 50px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    text-align: center;
}

.contact-box h2,
.contact-box h3 {
    font-size: 2rem;
    margin-bottom: 15px;
    color: var(--text-dark);
}

.contact-box > p {
    color: var(--text-light);
    margin-bottom: 40px;
    font-size: 1.1rem;
}

.contact-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.contact-item {
    padding: 25px;
    background: var(--bg-gray);
    border-radius: 8px;
}

.contact-item h4 {
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: var(--text-dark);
}

.contact-item p {
    color: var(--text-light);
    line-height: 1.6;
    margin: 0;
}

.contact-item a {
    color: var(--primary-color);
    font-weight: 600;
}

.contact-item a:hover {
    color: var(--primary-dark);
}

@media (max-width: 768px) {
    .contact-box {
        padding: 30px 20px;
        max-width: 100%;
    }

    .contact-info {
        grid-template-columns: 1fr;
    }
}

/* Dark Mode für Contact Box */
[data-theme="dark"] .contact-box {
    background: var(--bg-gray);
    border: 1px solid var(--border-color);
}

[data-theme="dark"] .contact-item {
    background: var(--bg-light);
    border: 1px solid var(--border-color);
}

[data-theme="dark"] .contact-item h4 {
    color: var(--primary-color);
}

[data-theme="dark"] .contact-item p {
    color: var(--text-light);
}

[data-theme="dark"] .contact-item a {
    color: var(--primary-color);
}

/* ========================================
   Utility Classes
   ======================================== */

/* Spacing - Margin Top */
.mt-0 { margin-top: 0; }
.mt-15 { margin-top: 15px; }
.mt-20 { margin-top: 20px; }
.mt-30 { margin-top: 30px; }
.mt-40 { margin-top: 40px; }

/* Spacing - Margin Bottom */
.mb-0 { margin-bottom: 0; }
.mb-15 { margin-bottom: 15px; }
.mb-20 { margin-bottom: 20px; }
.mb-30 { margin-bottom: 30px; }
.mb-40 { margin-bottom: 40px; }

/* Content Containers */
.content-narrow {
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.content-medium {
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

/* Grid Layouts */
.grid-auto-fit {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.grid-auto-fit-sm {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.grid-auto-fit-lg {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 20px;
}

/* Responsive Grid: 3 Spalten -> 2 -> 1 */
.grid-3-col,
.news-grid.grid-3-col {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

/* Responsive Grid: 2 Spalten -> 1 */
.grid-2-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 1024px) {
    .grid-3-col,
    .news-grid.grid-3-col {
        gap: 15px;
    }
}

@media (max-width: 768px) {
    .grid-3-col,
    .news-grid.grid-3-col {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .grid-2-col {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .grid-3-col,
    .news-grid.grid-3-col {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

/* Text Utilities */
.text-center { text-align: center; }
.text-italic { font-style: italic; }
.text-bold { font-weight: bold; }

/* Accent color for highlighted links */
.text-accent {
    color: var(--accent-color);
    font-weight: bold;
}

/* Small/muted text */
.text-sm { font-size: 0.9rem; }
.text-muted { color: #555; } /* Improved contrast for accessibility */
[data-theme="dark"] .text-muted { color: #aaa; }

/* List styling */
.list-spaced {
    line-height: 1.8;
    margin-left: 20px;
}

/* ========================================
   Print Styles
   ======================================== */

@media print {
    /* Grundeinstellungen für Druck */
    *,
    *::before,
    *::after {
        background: transparent !important;
        color: #000 !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }

    body {
        font-size: 12pt;
        line-height: 1.5;
    }

    /* Verstecke nicht-druckbare Elemente */
    .header,
    .nav,
    .nav-toggle,
    .skip-link,
    .theme-toggle,
    .cookie-banner,
    .hero,
    .page-header,
    #footer-placeholder,
    footer,
    .btn,
    button,
    iframe {
        display: none !important;
    }

    /* Container volle Breite */
    .container {
        max-width: 100%;
        padding: 0;
        margin: 0;
    }

    main {
        padding: 0;
    }

    .section {
        padding: 20px 0;
    }

    /* Typografie für Druck */
    h1 {
        font-size: 24pt;
        margin-bottom: 15px;
    }

    h2 {
        font-size: 18pt;
        margin-top: 25px;
        margin-bottom: 10px;
    }

    h3 {
        font-size: 14pt;
        margin-top: 20px;
    }

    p, li {
        orphans: 3;
        widows: 3;
    }

    /* Links mit URL anzeigen */
    a[href]::after {
        content: " (" attr(href) ")";
        font-size: 10pt;
        color: #666 !important;
    }

    /* Keine URLs für interne/Anker-Links */
    a[href^="#"]::after,
    a[href^="javascript:"]::after,
    a[href^="mailto:"]::after,
    a[href^="tel:"]::after {
        content: "";
    }

    /* E-Mail-Links lesbar machen */
    a[href^="mailto:"]::after {
        content: " <" attr(href) ">";
    }

    /* Bilder */
    img {
        max-width: 100% !important;
        page-break-inside: avoid;
    }

    /* Tabellen */
    table {
        border-collapse: collapse;
    }

    th, td {
        border: 1px solid #000;
        padding: 8px;
    }

    /* Seitenumbrüche vermeiden */
    h1, h2, h3 {
        page-break-after: avoid;
    }

    .news-card,
    .info-box,
    .contact-box {
        page-break-inside: avoid;
        border: 1px solid #ccc;
        padding: 15px;
        margin-bottom: 15px;
    }

    /* Grids linearisieren */
    .news-grid,
    .two-column,
    .board-grid,
    .grid-auto-fit {
        display: block;
    }

    .column {
        width: 100%;
        margin-bottom: 20px;
    }

    /* Druckinfo am Ende */
    @page {
        margin: 2cm;
    }
}
