/*
Theme Name: Baranya.TV Child
Theme URI: https://baranya.tv/
Description: Schlankes Child-Theme für Baranya.TV auf Basis von GeneratePress.
Author: Baranya.TV
Template: generatepress
Version: 1.0.2
Text Domain: baranya-tv-child
*/

/* =========================================================
   BARANYA.TV – DESIGN TOKENS
   Farben wurden aus dem Baranya.TV-Logo abgeleitet.
   ========================================================= */

:root {
    --baranya-green: #1E341B;
    --baranya-green-2: #4F532A;
    --baranya-red: #CA1314;

    --baranya-cream: #F9F2E7;
    --baranya-cream-2: #EEE0C7;
    --baranya-light: #F5F7F2;
    --baranya-white: #FFFFFF;

    --baranya-text: #20251F;
    --baranya-text-muted: #61695F;
    --baranya-border: #D9DDD5;

    --baranya-radius: 12px;
    --baranya-shadow: 0 8px 24px rgba(30, 52, 27, 0.08);

    --baranya-content: 1180px;
    --baranya-reading: 780px;
}

/* =========================================================
   TYPOGRAFIE
   Keine externen Fonts -> schnell + datenschutzfreundlich.
   ========================================================= */

html {
    scroll-behavior: smooth;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
                 Roboto, Helvetica, Arial, sans-serif;
    color: var(--baranya-text);
    background: var(--baranya-white);
    line-height: 1.65;
    font-size: 18px;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--baranya-green);
    font-weight: 750;
    line-height: 1.18;
    letter-spacing: -0.02em;
    margin-top: 0;
}

h1 {
    font-size: clamp(2.15rem, 5vw, 4rem);
}

h2 {
    font-size: clamp(1.7rem, 3.4vw, 2.7rem);
}

h3 {
    font-size: clamp(1.3rem, 2.2vw, 1.75rem);
}

p {
    margin-bottom: 1.2em;
}

a {
    color: var(--baranya-green);
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

a:hover,
a:focus {
    color: var(--baranya-red);
}

/* =========================================================
   GENERATEPRESS – GRUNDLAYOUT
   ========================================================= */

.grid-container,
.site-grid,
.inside-header,
.inside-navigation,
.inside-footer-widgets,
.inside-site-info {
    max-width: var(--baranya-content);
}

.site-content {
    padding-top: 36px;
    padding-bottom: 56px;
}

.separate-containers .inside-article,
.separate-containers .comments-area,
.separate-containers .page-header {
    padding: clamp(24px, 4vw, 48px);
}

.entry-content {
    color: var(--baranya-text);
}

.single-post .entry-content,
.single-page .entry-content {
    max-width: var(--baranya-reading);
}

/* Seiten wie Startseite dürfen bewusst breiter sein */
.home .entry-content,
.page-template-default .entry-content .alignwide,
.entry-content .baranya-wide {
    max-width: var(--baranya-content);
}

/* =========================================================
   HEADER & LOGO
   ========================================================= */

.site-header {
    background: var(--baranya-white);
    border-bottom: 1px solid var(--baranya-border);
}

.inside-header {
    padding-top: 18px;
    padding-bottom: 18px;
}

.site-logo img,
.navigation-branding img {
    max-height: 92px;
    width: auto;
}

.site-branding .main-title a {
    color: var(--baranya-green);
    font-weight: 800;
}

.site-description {
    color: var(--baranya-text-muted);
}

/* =========================================================
   NAVIGATION
   ========================================================= */

.main-navigation,
.main-navigation .main-nav ul li a {
    background: var(--baranya-green);
}

.main-navigation .main-nav ul li a,
.main-navigation .menu-toggle,
.main-navigation .menu-bar-items {
    color: var(--baranya-white);
}

.main-navigation .main-nav ul li:hover > a,
.main-navigation .main-nav ul li:focus > a,
.main-navigation .main-nav ul li[class*="current-menu-"] > a {
    background: var(--baranya-red);
    color: var(--baranya-white);
}

.main-navigation .main-nav ul ul {
    background: var(--baranya-green);
}

.main-navigation .main-nav ul ul li a {
    background: var(--baranya-green);
    color: var(--baranya-white);
}

/* =========================================================
   BUTTONS
   ========================================================= */

button,
html input[type="button"],
input[type="reset"],
input[type="submit"],
.wp-block-button__link,
.baranya-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .45em;
    background: var(--baranya-green);
    color: var(--baranya-white) !important;
    border: 0;
    border-radius: 999px;
    padding: .8em 1.25em;
    font-weight: 700;
    text-decoration: none;
    transition: transform .18s ease, background .18s ease, box-shadow .18s ease;
}

button:hover,
html input[type="button"]:hover,
input[type="reset"]:hover,
input[type="submit"]:hover,
.wp-block-button__link:hover,
.baranya-button:hover {
    background: var(--baranya-red);
    color: var(--baranya-white) !important;
    transform: translateY(-1px);
    box-shadow: var(--baranya-shadow);
}

/* Sekundärer Button */
.baranya-button.is-outline {
    background: transparent;
    color: var(--baranya-green) !important;
    border: 2px solid var(--baranya-green);
}

.baranya-button.is-outline:hover {
    background: var(--baranya-green);
    color: var(--baranya-white) !important;
}

/* =========================================================
   MAGAZIN-FLÄCHEN / SEKTIONEN
   ========================================================= */

.baranya-section {
    padding: clamp(44px, 7vw, 88px) 24px;
}

.baranya-section--cream {
    background: var(--baranya-cream);
}

.baranya-section--light {
    background: var(--baranya-light);
}

.baranya-section--green {
    background: var(--baranya-green);
    color: var(--baranya-white);
}

.baranya-section--green h2,
.baranya-section--green h3,
.baranya-section--green p,
.baranya-section--green a {
    color: var(--baranya-white);
}

.baranya-section__inner {
    max-width: var(--baranya-content);
    margin-inline: auto;
}

/* =========================================================
   KARTEN – für Videos, Themen, Orte
   ========================================================= */

.baranya-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

.baranya-card {
    background: var(--baranya-white);
    border: 1px solid var(--baranya-border);
    border-radius: var(--baranya-radius);
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(30, 52, 27, 0.05);
    transition: transform .18s ease, box-shadow .18s ease;
}

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

.baranya-card__media {
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--baranya-light);
}

.baranya-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.baranya-card__body {
    padding: 20px;
}

.baranya-card__title {
    margin: 0 0 8px;
    font-size: 1.15rem;
}

.baranya-card__text {
    color: var(--baranya-text-muted);
    font-size: .96rem;
    margin: 0;
}

/* =========================================================
   VIDEO-KARTEN MIT PLAY-SYMBOL
   ========================================================= */

.baranya-video-card {
    position: relative;
    display: block;
    text-decoration: none;
    color: inherit;
}

.baranya-video-card__thumb {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: var(--baranya-radius);
    background: var(--baranya-light);
}

.baranya-video-card__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .25s ease;
}

.baranya-video-card:hover img {
    transform: scale(1.025);
}

.baranya-video-card__play {
    position: absolute;
    inset: 50% auto auto 50%;
    transform: translate(-50%, -50%);
    width: 62px;
    height: 62px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--baranya-red);
    color: var(--baranya-white);
    box-shadow: 0 8px 22px rgba(0,0,0,.2);
    font-size: 24px;
    line-height: 1;
}

.baranya-video-card__title {
    margin: 12px 2px 0;
    font-weight: 700;
    line-height: 1.35;
    color: var(--baranya-green);
}

/* =========================================================
   LABELS
   ========================================================= */

.baranya-label {
    display: inline-block;
    padding: .35em .7em;
    border-radius: 999px;
    background: var(--baranya-red);
    color: var(--baranya-white);
    text-transform: uppercase;
    font-size: .75rem;
    font-weight: 800;
    letter-spacing: .06em;
}

/* =========================================================
   BILDER
   ========================================================= */

.entry-content img,
.featured-image img {
    border-radius: var(--baranya-radius);
}

/* =========================================================
   FORMULARE
   ========================================================= */

input[type="text"],
input[type="email"],
input[type="url"],
input[type="tel"],
input[type="search"],
textarea,
select {
    border: 1px solid var(--baranya-border);
    border-radius: 8px;
    background: var(--baranya-white);
    color: var(--baranya-text);
    padding: .75em .9em;
}

input:focus,
textarea:focus,
select:focus {
    border-color: var(--baranya-green);
    outline: 2px solid rgba(30, 52, 27, .12);
}

/* =========================================================
   FOOTER
   ========================================================= */

.site-footer,
.footer-widgets,
.site-info {
    background: var(--baranya-green);
    color: var(--baranya-white);
}

.site-footer a,
.footer-widgets a,
.site-info a {
    color: var(--baranya-white);
}

.site-footer a:hover,
.footer-widgets a:hover,
.site-info a:hover {
    color: #FFD9D9;
}

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

@media (max-width: 1024px) {
    body {
        font-size: 17px;
    }

    .baranya-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .site-logo img,
    .navigation-branding img {
        max-height: 78px;
    }
}

@media (max-width: 768px) {
    .inside-header {
        padding: 12px 18px;
    }

    .site-content {
        padding-top: 20px;
        padding-bottom: 36px;
    }

    .baranya-section {
        padding: 38px 18px;
    }

    .baranya-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .baranya-card__body {
        padding: 17px;
    }

    .baranya-video-card__play {
        width: 54px;
        height: 54px;
        font-size: 21px;
    }

    .site-logo img,
    .navigation-branding img {
        max-height: 64px;
    }
}

/* =========================================================
   UPDATE 1.0.1 – THEMENKACHELN AUF DER STARTSEITE
   Gleichmäßige Kartenhöhe, bessere Typografie und Abstände
   für den Bereich „Das erwartet dich bei Baranya.TV“.
   ========================================================= */

.baranya-grid .baranya-card {
    height: 100%;
}

.baranya-card__body {
    height: 100%;
}

.baranya-card__title {
    font-size: 1.2rem;
    margin-bottom: 12px;
}

.baranya-card__text {
    line-height: 1.6;
}

.baranya-section__inner > h2 + .baranya-grid {
    margin-top: 28px;
}

/* =========================================================
   UPDATE 1.0.2 – FULL-WIDTH MAGAZINSEKTIONEN
   Farbbänder laufen über die volle Viewportbreite,
   der Inhalt bleibt sauber auf die Magazinbreite begrenzt.
   ========================================================= */

/*
 * Diese Klasse kann einem WordPress-Gruppenblock gegeben werden:
 * baranya-section
 *
 * Farbvarianten:
 * baranya-section--cream
 * baranya-section--light
 * baranya-section--green
 *
 * Wichtig:
 * Der Abschnitt darf innerhalb des normalen Content-Containers liegen.
 * Mit calc()/vw wird er optisch auf die volle Browserbreite gezogen.
 */
.entry-content > .baranya-section,
.baranya-fullwidth {
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    box-sizing: border-box;
}

/* Innerer Inhaltsbereich */
.baranya-section > .baranya-section__inner,
.baranya-fullwidth > .baranya-section__inner {
    width: min(calc(100% - 48px), var(--baranya-content));
    margin-left: auto;
    margin-right: auto;
}

/*
 * Falls der Gruppenblock direkt die Inhalte enthält und kein
 * zusätzlicher .baranya-section__inner-Block verwendet wird,
 * begrenzen wir die unmittelbaren Kinder automatisch.
 */
.entry-content > .baranya-section:not(:has(.baranya-section__inner)) {
    display: grid;
    grid-template-columns:
        minmax(24px, 1fr)
        minmax(0, var(--baranya-content))
        minmax(24px, 1fr);
}

.entry-content > .baranya-section:not(:has(.baranya-section__inner)) > * {
    grid-column: 2;
}

/* Farbhintergründe */
.baranya-section--white {
    background: var(--baranya-white);
}

.baranya-section--cream {
    background: var(--baranya-cream);
}

.baranya-section--light {
    background: var(--baranya-light);
}

.baranya-section--green {
    background: var(--baranya-green);
    color: var(--baranya-white);
}

/* Trennlinien zwischen großen Startseitenabschnitten vermeiden */
.home .entry-content hr,
.home .wp-block-separator {
    display: none;
}

/* Saubere Abstände zwischen direkt aufeinanderfolgenden Sektionen */
.entry-content > .baranya-section + .baranya-section {
    margin-top: 0;
}

/* Auf der Startseite soll der Hauptinhalt nicht künstlich schmal bleiben */
.home .site-main .inside-article,
.home .entry-content {
    max-width: none;
}

/* Mobile Anpassung */
@media (max-width: 768px) {
    .baranya-section > .baranya-section__inner,
    .baranya-fullwidth > .baranya-section__inner {
        width: min(calc(100% - 36px), var(--baranya-content));
    }

    .entry-content > .baranya-section:not(:has(.baranya-section__inner)) {
        grid-template-columns:
            minmax(18px, 1fr)
            minmax(0, var(--baranya-content))
            minmax(18px, 1fr);
    }
}

