/*
Theme Name: Campingwirtschaft Heute
Theme URI: https://campingwirtschaft-heute.de
Author: Steffen Prey
Author URI: https://steffenprey.de
Description: Maßgeschneidertes Magazin-Theme für das Fachmagazin "Campingwirtschaft | Heute". Redaktionelles News-Layout mit Aufmacher, Rubriken, Anzeigen-Bannern, Kalender- und Shop-Bereich. Farben, Typografie, Startseiten-Artikelanzahl und Werbebanner sind vollständig über den WordPress-Customizer steuerbar. Responsiv, Block-Editor- und WooCommerce-ready.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: campingwirtschaft-heute
Tags: news, magazine, blog, custom-colors, custom-logo, custom-menu, featured-images, right-sidebar, two-columns, full-width-template, translation-ready
*/

/* =========================================================
   1. CSS-Variablen (werden vom Customizer überschrieben)
   ========================================================= */
:root {
    --cwh-orange:      #F39200; /* Header / Primärfarbe */
    --cwh-yellow:      #FBBA00; /* Footer / Highlight-Boxen */
    --cwh-nav-bg:      #FFDB7C; /* Navigationsleiste (helles Amber) */
    --cwh-accent:      #F39200; /* Akzentlinie unter Headlines */
    --cwh-blue:        #D6E4F2; /* Anzeigen-Platzhalter */
    --cwh-magenta:     #9B1B5A; /* Shop-Akzent */
    --cwh-dark:        #1A1A1A; /* Fließtext / Headlines */
    --cwh-gray:        #7A7A7A; /* Rubrik-Labels / Meta */
    --cwh-line:        #1A1A1A; /* Trennlinien */
    --cwh-bg:          #FFFFFF; /* Seitenhintergrund */
    --cwh-content-bg:  #FFFFFF; /* Inhaltsflächen */

    --font-display: "Oswald", "IBM Plex Sans", Arial, sans-serif;   /* große Aufmacher */
    --font-heading: "IBM Plex Sans", Arial, Helvetica, sans-serif;  /* Headlines / Nav */
    --font-body:    "IBM Plex Serif", Georgia, "Times New Roman", serif; /* Fließtext */

    --content-width: 1180px;
    --gap: 28px;
}

/* =========================================================
   2. Reset / Basis
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.6;
    color: var(--cwh-dark);
    background: #ECECEC;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--cwh-dark); text-decoration: none; }
a:hover { color: var(--cwh-orange); }
figure { margin: 0; }
p { margin: 0 0 1em; }

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--cwh-dark);
    line-height: 1.12;
    margin: 0 0 .5em;
    font-weight: 700;
}

.cwh-container {
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 0 24px;
}

/* Seiten-Wrapper: weißer Inhaltsblock auf grauem Grund */
.cwh-site {
    background: var(--cwh-content-bg);
    max-width: 1320px;
    margin: 0 auto;
    box-shadow: 0 0 40px rgba(0,0,0,.06);
}

.screen-reader-text {
    position: absolute !important;
    clip: rect(1px, 1px, 1px, 1px);
    width: 1px; height: 1px; overflow: hidden;
}
.skip-link {
    position: absolute; left: -9999px; top: 0;
    background: var(--cwh-dark); color: #fff; padding: 10px 16px; z-index: 100000;
}
.skip-link:focus { left: 8px; top: 8px; }

/* Akzentlinie unter Headlines */
.cwh-accent-line::after {
    content: ""; display: block;
    width: 60px; height: 4px;
    background: var(--cwh-accent);
    margin: 14px 0 18px;
}

/* =========================================================
   3. Topbar (Abo | Shop | Kalender | Kontakt)
   ========================================================= */
.cwh-topbar {
    background: var(--cwh-orange);
    color: #fff;
}
.cwh-topbar .cwh-container {
    display: flex; justify-content: flex-end; align-items: center;
    gap: 22px; min-height: 34px;
}
.cwh-topbar a {
    color: #fff; font-family: var(--font-heading);
    font-size: 13px; font-weight: 600; letter-spacing: .3px;
}
.cwh-topbar a:hover { color: rgba(255,255,255,.75); }

/* =========================================================
   4. Header + Logo
   ========================================================= */
.cwh-header {
    background: var(--cwh-orange);
    border-bottom: 4px solid #fff;
}
.cwh-header .cwh-container {
    display: flex; align-items: center; justify-content: space-between;
    padding-top: 18px; padding-bottom: 22px; gap: 24px;
}
.cwh-logo { display: flex; align-items: center; }
.cwh-logo img, .cwh-logo svg { max-height: 84px; width: auto; }
.cwh-logo .custom-logo-link { display: block; }

/* Text-/SVG-Logo Nachbau */
.cwh-logo-svg { color: #fff; }

/* =========================================================
   5. Hauptnavigation
   ========================================================= */
.cwh-nav {
    background: var(--cwh-nav-bg);
}
.cwh-nav .cwh-container { position: relative; }
.cwh-menu-toggle {
    display: none;
    background: none; border: 0; cursor: pointer;
    font-family: var(--font-heading); font-weight: 700; font-size: 15px;
    color: var(--cwh-dark);
    padding: 12px 0; align-items: center; gap: 8px;
}
.cwh-menu-toggle .bars { display: inline-block; width: 18px; height: 2px; background: var(--cwh-dark); position: relative; }
.cwh-menu-toggle .bars::before,
.cwh-menu-toggle .bars::after { content:""; position:absolute; left:0; width:18px; height:2px; background: var(--cwh-dark); }
.cwh-menu-toggle .bars::before { top:-6px; }
.cwh-menu-toggle .bars::after { top:6px; }

.cwh-primary-menu ul {
    list-style: none; margin: 0; padding: 0;
    display: flex; flex-wrap: wrap; align-items: center;
}
.cwh-primary-menu > ul > li { position: relative; }
.cwh-primary-menu a {
    display: block;
    font-family: var(--font-heading);
    font-weight: 700; font-size: 13.5px;
    padding: 11px 14px 11px 0;
    color: var(--cwh-dark);
}
.cwh-primary-menu > ul > li:not(:last-child) > a { margin-right: 14px; }
/* Trennstriche zwischen Menüpunkten */
.cwh-primary-menu > ul > li:not(:first-child)::before {
    content: "|"; color: #c9c9c9; position: absolute; left: -12px; top: 11px;
    font-weight: 400;
}
.cwh-primary-menu a:hover,
.cwh-primary-menu .current-menu-item > a { color: var(--cwh-orange); }
.cwh-menu-label { font-family: var(--font-heading); font-weight:700; font-size:13.5px; margin-right: 6px; }

/* Sub-Menüs */
.cwh-primary-menu ul ul {
    display: none; position: absolute; top: 100%; left: 0; z-index: 50;
    background: #fff; min-width: 220px; flex-direction: column;
    box-shadow: 0 8px 22px rgba(0,0,0,.14); padding: 6px 0;
}
.cwh-primary-menu li:hover > ul { display: flex; }
.cwh-primary-menu ul ul a { padding: 9px 18px; margin: 0; }
.cwh-primary-menu ul ul li::before { content: none; }

/* =========================================================
   6. Thementeaser-Reihe
   ========================================================= */
.cwh-teasers { border-bottom: 1px solid #e2e2e2; }
.cwh-teasers .cwh-container {
    display: grid; grid-template-columns: repeat(3, 1fr);
    gap: 0;
}
.cwh-teaser {
    padding: 14px 22px; border-left: 1px solid #d9d9d9;
}
.cwh-teaser:first-child { border-left: 0; padding-left: 0; }
.cwh-teaser-title {
    font-family: var(--font-heading); font-weight: 700;
    font-size: 14px; line-height: 1.25; margin: 0 0 6px; display: block;
}
.cwh-teaser-meta { font-family: var(--font-heading); font-size: 11px; color: var(--cwh-gray); }

/* =========================================================
   7. Anzeigen / Werbebanner
   ========================================================= */
.cwh-ad { text-align: center; }
.cwh-ad-label {
    font-family: var(--font-heading); font-size: 10px; letter-spacing: .5px;
    color: var(--cwh-gray); text-transform: none; margin: 0 0 4px; text-align: left;
}
.cwh-ad-box {
    background: var(--cwh-blue);
    display: flex; align-items: center; justify-content: center;
    color: #7f94ab; font-family: var(--font-heading); font-size: 13px;
    overflow: hidden;
}
.cwh-ad-box img { width: 100%; height: 100%; object-fit: contain; }
.cwh-ad-leaderboard .cwh-ad-box { min-height: 250px; }        /* 970x250 */
.cwh-ad-skyscraper .cwh-ad-box { min-height: 600px; width: 200px; } /* 200x600 */

.cwh-ad-top { padding: 22px 0 8px; }

/* Seitliche Skyscraper-Rahmen (Desktop) */
.cwh-frame {
    display: grid;
    grid-template-columns: 200px minmax(0,1fr) 200px;
    gap: 40px;
    align-items: start;
}
.cwh-frame__rail { position: sticky; top: 20px; }

/* =========================================================
   8. Startseite – Aufmacher & Artikel
   ========================================================= */
.cwh-main { padding: 10px 0 40px; }

/* Aufmacher mit Bild + überlappendem Textblock */
.cwh-aufmacher { margin: 0 0 46px; }
.cwh-aufmacher__media { margin: 0; }
.cwh-aufmacher__body {
    background: #fff;
    width: 88%;
    margin-top: -70px; position: relative; z-index: 2;
    padding: 6px 34px 6px 0;
}
.cwh-kicker {
    font-family: var(--font-heading); font-weight: 600;
    font-size: 14px; color: var(--cwh-dark); display: block; margin: 0 0 6px;
}
.cwh-aufmacher__title {
    font-family: var(--font-display);
    text-transform: uppercase;
    font-weight: 600;
    font-size: clamp(30px, 4.4vw, 52px);
    line-height: 1.02; letter-spacing: .3px; margin: 0 0 6px;
}
.cwh-aufmacher__excerpt { font-family: var(--font-body); max-width: 62ch; }

/* Weiterlesen-Link */
.cwh-more {
    font-family: var(--font-heading); font-weight: 700; color: var(--cwh-dark);
    white-space: nowrap;
}
.cwh-more::after { content: " ›"; color: var(--cwh-orange); }
.cwh-more:hover { color: var(--cwh-orange); }

/* Standard-Split-Artikel (Bild + Text nebeneinander) */
.cwh-article-split {
    display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap);
    align-items: start; margin: 0 0 46px;
}
.cwh-article-split.reverse .cwh-article-split__media { order: 2; }
.cwh-article-split__title {
    font-family: var(--font-heading); font-weight: 700;
    font-size: clamp(22px, 2.6vw, 30px); line-height: 1.1;
}
.cwh-article-split__body { font-family: var(--font-body); }

/* Gelbe Highlight-Box */
.cwh-highlight {
    background: var(--cwh-yellow);
    display: grid; grid-template-columns: 1fr 1fr; gap: 0;
    margin: 0 0 46px; align-items: stretch;
}
.cwh-highlight__media { margin: 0; }
.cwh-highlight__media img { height: 100%; object-fit: cover; }
.cwh-highlight__body { padding: 30px 34px; }
.cwh-highlight__title {
    font-family: var(--font-heading); font-weight: 700;
    font-size: clamp(22px, 2.6vw, 30px);
}

/* 3-Spalten Karten-Grid */
.cwh-card-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap);
    border-top: 2px solid var(--cwh-line); padding-top: 22px; margin: 0 0 40px;
}
.cwh-card__media { margin: 0 0 12px; aspect-ratio: 3/2; overflow: hidden; }
.cwh-card__media img { width: 100%; height: 100%; object-fit: cover; }
.cwh-card__kicker { font-family: var(--font-heading); font-size: 12px; color: var(--cwh-gray); display:block; margin-bottom: 4px; }
.cwh-card__title {
    font-family: var(--font-heading); font-weight: 700; font-size: 19px; line-height: 1.15; margin: 0 0 8px;
}
.cwh-card__excerpt { font-family: var(--font-body); font-size: 15px; }
/* Trennlinie sitzt mittig im Spaltenabstand und beeinflusst NICHT die
   Bildbreite – so bleiben alle Kartenbilder exakt gleich hoch. */
.cwh-card--divider { position: relative; }
.cwh-card--divider::before {
    content: ""; position: absolute; top: 0; bottom: 0;
    left: calc(var(--gap) / -2); width: 1px; background: #ddd;
}

/* Kicker/Meta in Orange (z. B. Autor) */
.cwh-kicker--accent, .cwh-card__kicker--accent { color: var(--cwh-orange); font-weight: 700; }

/* =========================================================
   9. Einzelartikel (single.php – Rubrik-Layout)
   ========================================================= */
.cwh-single { padding: 8px 0 40px; }
.cwh-single__hero { margin: 0 0 8px; position: relative; }
.cwh-single__hero .cwh-photo-credit {
    position: absolute; left: 0; bottom: 0;
    writing-mode: vertical-rl; transform: rotate(180deg);
    background: rgba(0,0,0,.0); color: #fff; font-family: var(--font-heading);
    font-size: 10px; padding: 6px 3px;
}
.cwh-single__kicker { font-family: var(--font-heading); font-size: 14px; color: var(--cwh-gray); display: block; margin: 6px 0; }
.cwh-single__title {
    font-family: var(--font-display); text-transform: uppercase; font-weight: 600;
    font-size: clamp(30px, 4.2vw, 50px); line-height: 1.03; margin: 0 0 4px;
}
.cwh-single__content {
    font-family: var(--font-body);
    column-count: 2; column-gap: 34px;
    max-width: 100%;
    margin-top: 20px;
}
.cwh-single__content.single-col { column-count: 1; max-width: 72ch; }
.cwh-single__content h2, .cwh-single__content h3 { font-family: var(--font-heading); break-after: avoid; }
.cwh-single__content img { margin: 10px 0; }
.cwh-single__meta-foot { font-family: var(--font-heading); font-size: 12px; color: var(--cwh-gray); margin-top: 10px; }

.cwh-back { font-family: var(--font-heading); font-weight: 700; color: var(--cwh-orange); }

/* Kastenheadline / Info-Kasten (gelb) */
.cwh-box {
    background: var(--cwh-yellow); padding: 24px 26px; font-family: var(--font-body);
}
.cwh-box__title { font-family: var(--font-heading); font-weight: 700; font-size: 20px; }

/* =========================================================
   10. Kalender / Termine
   ========================================================= */
.cwh-event-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap);
    border-top: 2px solid var(--cwh-line); padding-top: 22px;
}
.cwh-event { border-top: 0; }
.cwh-event__media { margin: 0 0 10px; aspect-ratio: 3/2; overflow: hidden; }
.cwh-event__media img { width: 100%; height: 100%; object-fit: cover; }
.cwh-event__type { font-family: var(--font-heading); font-size: 12px; color: var(--cwh-gray); display:block; }
.cwh-event__title { font-family: var(--font-heading); font-weight: 700; font-size: 16px; line-height: 1.2; }
.cwh-event__title .org { color: var(--cwh-orange); }
.cwh-event__signup { font-family: var(--font-heading); font-size: 13.5px; }
.cwh-event__signup strong { display: block; }

/* =========================================================
   11. Shop-Kacheln
   ========================================================= */
.cwh-shop-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap);
    border-top: 2px solid var(--cwh-line); padding-top: 22px; margin-bottom: 30px;
}
.cwh-shop-tile__media { margin: 0 0 12px; aspect-ratio: 4/3; overflow: hidden; background: var(--cwh-yellow); }
.cwh-shop-tile__media img { width: 100%; height: 100%; object-fit: cover; }
.cwh-shop-tile--magenta .cwh-shop-tile__media { background: var(--cwh-magenta); }
.cwh-shop-tile--orange .cwh-shop-tile__media { background: var(--cwh-orange); }
.cwh-shop-tile__kicker { font-family: var(--font-heading); font-size: 11px; letter-spacing:.4px; color: var(--cwh-gray); display:block; text-transform: uppercase; }
.cwh-shop-tile__title { font-family: var(--font-heading); font-weight: 700; font-size: 18px; line-height: 1.15; }
.cwh-shop-tile__text { font-family: var(--font-body); font-size: 15px; }

/* =========================================================
   12. Footer
   ========================================================= */
.cwh-footer {
    background: var(--cwh-yellow); color: var(--cwh-dark);
    padding: 34px 0; margin-top: 0;
}
.cwh-footer .cwh-container {
    display: grid; grid-template-columns: 2fr 1fr 1fr 1.4fr; gap: 26px;
}
.cwh-footer a { color: var(--cwh-dark); font-family: var(--font-heading); font-weight: 600; font-size: 13px; }
.cwh-footer a:hover { color: #fff; }
.cwh-footer p, .cwh-footer li { font-family: var(--font-heading); font-size: 12.5px; line-height: 1.7; }
.cwh-footer ul { list-style: none; margin: 0; padding: 0; }
.cwh-footer .cwh-imprint strong { font-weight: 700; }

/* =========================================================
   13. Kommentare / Formulare / Buttons
   ========================================================= */
.cwh-btn {
    display: inline-block; background: var(--cwh-orange); color: #fff;
    font-family: var(--font-heading); font-weight: 700; font-size: 14px;
    padding: 11px 22px; border: 0; cursor: pointer;
}
.cwh-btn:hover { background: var(--cwh-dark); color: #fff; }

input[type=text], input[type=email], input[type=search], input[type=url], textarea {
    width: 100%; padding: 10px 12px; border: 1px solid #ccc; font-family: var(--font-body); font-size: 16px;
}

/* Pagination */
.cwh-pagination { margin: 30px 0; font-family: var(--font-heading); }
.cwh-pagination .page-numbers {
    display: inline-block; padding: 8px 13px; border: 1px solid #ddd; margin: 0 3px; font-weight: 700; font-size: 14px;
}
.cwh-pagination .current { background: var(--cwh-orange); color: #fff; border-color: var(--cwh-orange); }

/* WordPress-Ausrichtungen */
.alignleft { float: left; margin: 6px 24px 12px 0; }
.alignright { float: right; margin: 6px 0 12px 24px; }
.aligncenter { margin: 12px auto; }
.wp-caption-text { font-family: var(--font-heading); font-size: 12px; color: var(--cwh-gray); }

/* =========================================================
   13b. Ergänzungen: Platzhalter, Menüvarianten, Archiv
   ========================================================= */

/* Farbige Platzhalter, wenn ein Beitrag (noch) kein Bild hat */
.cwh-thumb-fallback {
    display: block; width: 100%; height: 100%;
    background: linear-gradient(135deg, var(--cwh-orange), var(--cwh-yellow));
}
.cwh-aufmacher__media .cwh-thumb-fallback { min-height: 380px; }
.cwh-article-split__media .cwh-thumb-fallback,
.cwh-highlight__media .cwh-thumb-fallback { min-height: 300px; }
.cwh-card__media .cwh-thumb-fallback,
.cwh-event__media .cwh-thumb-fallback,
.cwh-shop-tile__media .cwh-thumb-fallback { min-height: 100%; }
.cwh-single__hero .cwh-thumb-fallback { min-height: 420px; }

/* Topbar-Menü, wenn als WP-Menü zugewiesen */
.cwh-topbar-menu {
    list-style: none; margin: 0; padding: 0;
    display: flex; gap: 22px; align-items: center;
}
.cwh-topbar-menu li { margin: 0; }

/* Footer-Menü, wenn zugewiesen */
.cwh-footer-nav ul { list-style: none; margin: 0; padding: 0; }
.cwh-footer-nav li { margin-bottom: 6px; }

/* Archiv-/Listenkopf */
.cwh-archive-head { margin: 6px 0 24px; }
.cwh-archive-desc { font-family: var(--font-body); color: var(--cwh-gray); }

/* Abstände der mittleren Anzeige */
.cwh-ad-mid { margin: 0 0 46px; }

/* Sidebar-Widgets */
.cwh-sidebar .widget { margin-bottom: 26px; font-family: var(--font-body); }
.cwh-sidebar .widget-title { font-family: var(--font-heading); font-size: 18px; }

/* Suchformular */
.search-form { display: flex; gap: 8px; margin: 16px 0; }
.search-form .search-submit { flex: 0 0 auto; background: var(--cwh-orange); color:#fff; border:0; padding: 0 18px; font-family: var(--font-heading); font-weight:700; cursor:pointer; }

/* =========================================================
   14. Responsive
   ========================================================= */
@media (max-width: 1080px) {
    .cwh-frame { grid-template-columns: 1fr; }
    .cwh-frame__rail { display: none; } /* Skyscraper auf Tablet ausblenden */
}

@media (max-width: 860px) {
    body { font-size: 16px; }
    .cwh-header .cwh-container { padding-top: 14px; padding-bottom: 16px; }
    .cwh-logo img, .cwh-logo svg { max-height: 60px; }

    /* Mobiles Menü */
    .cwh-menu-toggle { display: inline-flex; }
    .cwh-primary-menu {
        display: none; width: 100%;
        border-top: 1px solid rgba(0,0,0,.1);
    }
    .cwh-primary-menu.is-open { display: block; }
    .cwh-primary-menu ul { flex-direction: column; align-items: stretch; }
    .cwh-primary-menu > ul > li:not(:first-child)::before { content: none; }
    .cwh-primary-menu > ul > li { border-top: 1px solid rgba(0,0,0,.08); }
    .cwh-primary-menu a { padding: 13px 4px; margin: 0 !important; }
    .cwh-primary-menu ul ul { position: static; box-shadow: none; padding-left: 16px; display: flex; }

    .cwh-teasers .cwh-container { grid-template-columns: 1fr; }
    .cwh-teaser { border-left: 0; border-top: 1px solid #e6e6e6; padding: 12px 0; }
    .cwh-teaser:first-child { border-top: 0; }

    .cwh-aufmacher__body { width: 100%; margin-top: -30px; padding: 16px 0 0; }
    .cwh-article-split,
    .cwh-highlight,
    .cwh-card-grid,
    .cwh-event-grid,
    .cwh-shop-grid { grid-template-columns: 1fr; }
    .cwh-article-split.reverse .cwh-article-split__media { order: 0; }
    .cwh-card--divider { border-left: 0; padding-left: 0; }
    .cwh-card--divider::before { display: none; }
    .cwh-highlight__media img { max-height: 260px; }

    .cwh-single__content { column-count: 1; }

    .cwh-footer .cwh-container { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 520px) {
    .cwh-topbar .cwh-container { gap: 14px; justify-content: center; }
    .cwh-footer .cwh-container { grid-template-columns: 1fr; }
    .cwh-ad-leaderboard .cwh-ad-box { min-height: 120px; }
}
