/* Grund-Reset und Farbschema */
:root {
    --brand-red: #FF2B44; /* Die Hauptfarbe von Radio Hamburg */
    --text-dark: #333333;
    --text-light: #ffffff;
    --bg-light: #f4f4f4;
    --bg-white: #ffffff;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Roboto', sans-serif; /* Klare, moderne Schriftart */
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-white);
}

/* Header & Navigation */
header {
    background-color: var(--brand-red);
    padding: 15px 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.logo {
    font-size: 1.8em;
    font-weight: 700;
    color: var(--text-light);
    text-decoration: none;
}

nav a {
    color: var(--text-light);
    text-decoration: none;
    margin-left: 25px;
    font-weight: 400;
    transition: opacity 0.3s;
}

nav a:hover {
    opacity: 0.8;
}

/* Call-to-Action (CTA) Button im Header und Hero */
.cta-button {
    background-color: var(--bg-white);
    color: var(--brand-red) !important;
    padding: 8px 15px;
    border-radius: 5px;
    font-weight: 700 !important;
    text-transform: uppercase;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s;
}

.cta-button:hover {
    background-color: var(--bg-light);
}

/* Hero-Sektion */
.hero-section {
    background-color: var(--bg-light);
    color: var(--text-dark);
    text-align: center;
    padding: 80px 20px;
}

.hero-section h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
}

.hero-section p {
    font-size: 1.2em;
    margin-bottom: 30px;
}

/* Content Sektion & Grid */
.content-section {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

.content-section h2 {
    text-align: center;
    margin-bottom: 30px;
    color: var(--brand-red);
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.card {
    background-color: var(--bg-white);
    padding: 20px;
    border-left: 5px solid var(--brand-red);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border-radius: 5px;
}

/* Footer */
footer {
    background-color: var(--text-dark);
    color: var(--text-light);
    text-align: center;
    padding: 20px 0;
    margin-top: 50px;
    font-size: 0.9em;
}


/* -------------------------------------------------------------------
   Styling für die NEWS-ANZEIGE im Hero-Bereich (home_content.php)
   Erstellt die 3-Spalten-Anordnung für die neuesten Artikel
   (NEU HINZUGEFÜGT)
   ------------------------------------------------------------------- */

/* 1. Hauptcontainer, der Flexbox aktiviert und Lücken (Gaps) definiert */
.categorized-news-container {
    display: flex; /* Aktiviert die flexible Box-Anordnung */
    flex-wrap: wrap; /* Erlaubt das Umbrechen auf neue Zeilen */
    gap: 20px; /* Abstand zwischen den Kacheln und Kategorien-Sektionen */
    justify-content: space-between; /* Verteilt die Elemente gleichmäßig */
    max-width: 1200px; /* Begrenzt die maximale Breite des News-Containers */
    margin: 0 auto; /* Zentriert den Container */
}

/* 2. Styling für die Überschrift der Kategorie (z.B. 📻 Programm-Updates) */
.news-category-section h2 {
    /* Macht die Überschrift sektionsspezifisch sichtbar */
    text-align: left;
    margin-bottom: 10px;
    font-size: 1.3em;
    color: var(--text-dark); 
}

/* 3. Container für jede Kategorie (entspricht einer Kachel bei renderCategorizedNews(1)) */
.news-category-section {
    /* WICHTIG: Definiert die Breite für 3 Spalten minus den Abstand */
    /* 100% / 3 = 33.333% minus ca. 14px für 2 Gaps */
    flex-basis: calc(33.333% - 14px); 
    min-width: 300px; /* Verhindert, dass die Kacheln zu schmal werden */
    box-sizing: border-box;
    margin-bottom: 20px; /* Abstand zur nächsten Reihe */
}

/* 4. Styling der einzelnen News-Kachel */
.category-news-preview {
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    background-color: var(--bg-white);
    transition: box-shadow 0.3s ease;
    height: 100%; /* Wichtig für gleiche Höhe, wenn Texte unterschiedlich lang sind */
}

.category-news-preview:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.category-news-link {
    display: block;
    text-decoration: none;
    color: var(--text-dark);
}

/* 5. Bild-Styling */
.news-preview-image-wrapper {
    width: 100%;
    /* Feste Höhe (oder Aspect Ratio) ist wichtig, falls das Bild fehlt! */
    height: 150px; 
    overflow: hidden;
}

.news-preview-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 6. Text-Inhalt */
.news-preview-content {
    padding: 15px;
}

.news-preview-content h3 {
    font-size: 1.1em;
    margin: 5px 0 10px 0;
}

.news-teaser {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 10px;
}

.read-more-link {
    font-weight: 700;
    color: var(--brand-red); /* Akzentfarbe für "mehr lesen" */
}

/* 7. Responsive Anpassung: Auf kleinen Bildschirmen untereinander */
@media (max-width: 1024px) {
    /* Ab dieser Breite nur noch 2 Spalten */
    .news-category-section {
        flex-basis: calc(50% - 10px); /* 2 Spalten */
    }
}

@media (max-width: 650px) {
    /* Auf sehr kleinen Bildschirmen nur eine Spalte */
    .news-category-section {
        flex-basis: 100%; /* 1 Spalte */
        min-width: unset;
    }
}


/* --- Styling für die NEWS-ÜBERSICHT (news_uebersicht.php) --- */

.news-archive-main {
    max-width: 1000px;
    margin: 30px auto;
    padding: 0 20px;
}

.archive-category-section {
    margin-bottom: 40px;
    border-bottom: 1px solid #ddd;
    padding-bottom: 20px;
}

.archive-category-section h2 {
    font-size: 1.8rem;
    color: var(--text-dark, #333);
    margin-bottom: 20px;
}

.category-news-list {
    display: grid;
    /* News werden in zwei Spalten angezeigt */
    grid-template-columns: 1fr 1fr; 
    gap: 30px 20px;
}

.news-full-preview {
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.3s;
}

.news-full-preview:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.full-preview-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    height: 100%; /* Wichtig, damit die Box anklickbar ist */
}

.full-preview-image-wrapper {
    flex-shrink: 0;
    width: 150px;
    height: auto;
}

.full-preview-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.full-preview-content {
    padding: 15px;
}

.full-preview-content h3 {
    font-size: 1.1rem;
    color: var(--text-dark, #333);
    margin: 0 0 5px 0;
}

.full-preview-teaser {
    font-size: 0.85rem;
    color: #666;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 3; /* Teaser auf 3 Zeilen begrenzen */
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 10px;
}

/* Responsive Anpassung für schmale Bildschirme */
@media (max-width: 768px) {
    .category-news-list {
        /* Eine Spalte auf Mobilgeräten */
        grid-template-columns: 1fr; 
    }
    .full-preview-link {
        flex-direction: column; /* Bild über Text stapeln */
    }
    .full-preview-image-wrapper {
        width: 100%;
        height: 200px;
    }
}




/* WEBCAM MODAL STYLES */
.modal {
  display: none; /* Standardmäßig versteckt */
  position: fixed; 
  z-index: 2000; /* Sehr hoch, um über allen anderen Elementen zu liegen */
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.9); /* Dunkler Hintergrund für den Kino-Effekt */
}

.modal-content {
  background-color: #212529; /* Dunkles Modal passend zu Bootstrap-Dark */
  color: #f8f9fa;
  margin: 10vh auto; /* Zentrierung */
  padding: 30px;
  border: none;
  border-radius: 8px;
  width: 90%;
  max-width: 900px;
  box-shadow: 0 5px 25px rgba(0,0,0,0.8);
}

.close {
  color: #fff;
  float: right;
  font-size: 36px;
  font-weight: 300;
  line-height: 1;
  text-shadow: none;
  opacity: 1;
  cursor: pointer;
}

.close:hover {
  color: #e74c3c; /* Roter bei Hover */
}

/* Container für 16:9 Video-Verhältnis */
#videoContainer {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Verhältnis (Höhe ist 56.25% der Breite) */
    height: 0;
    overflow: hidden;
    margin-top: 20px;
}

#videoContainer video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 4px;
}

/* Link-Cards Styling */
.link-card-wrapper {
    text-decoration: none !important;
    color: inherit;
    transition: transform 0.3s ease;
    display: block;
}

.link-card-wrapper:hover {
    transform: translateY(-5px);
}

.link-card-wrapper .card {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: #252525; /* Etwas heller als der Hintergrund für Tiefe */
    border: 1px solid rgba(0, 188, 212, 0.1);
    padding: 20px;
}

.btn-link {
    display: inline-block;
    margin-top: 15px;
    font-weight: bold;
    color: #00bcd4;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.link-card-wrapper:hover .btn-link {
    color: #fff;
}

main {
    /* Schafft Platz für die Player-Bar am Ende jeder Seite */
    padding-bottom: 120px !important; 
}

/* Optional: Falls du nur auf der Home-Seite mehr Platz willst */
.calendar-box {
    margin-bottom: 30px;
}

/* Dropdown Anpassungen */
.dropdown-menu-dark {
    background-color: #1a1a1a;
    border: 1px solid #333;
    border-radius: 8px;
    margin-top: 10px !important;
}

.dropdown-item {
    color: #fff;
    font-size: 0.9rem;
    padding: 10px 20px;
    transition: all 0.2s;
}

.dropdown-item:hover {
    background-color: var(--brand-red, #FF2B44);
    color: #fff;
}

/* Pfeil-Icon Styling (optional) */
.dropdown-toggle::after {
    margin-left: 5px;
    vertical-align: middle;
}

/* Sicherstellen, dass AJAX-Loader auch Dropdown-Links fängt */
.dropdown-item.active {
    background-color: var(--brand-red, #FF2B44) !important;
}