/*
Theme Name: EPD24 Fachmagazin
Theme URI: https://epd24.com
Author: PSCoat SEO
Description: Eigenstaendiges Fachmagazin-Theme mit Newsgrid, Programm-Themenbloecken und hellem Footer-Feld fuer epd24.com.
Version: 1.0.0
Text Domain: t-epd24-com
*/

/* -------------------------------------------------------------------------
 * Tokens
 * ---------------------------------------------------------------------- */
:root{
  --bg:#f9f9f9;
  --surface:#ecedee;
  --text:#222426;
  --muted:#555d63; /* Brief nennt #646d74; hier leicht abgedunkelt fuer 7:1-Kontrast bei kleinen Meta-Texten auf --bg */
  --primary:#224c95;      /* dunkler als Brief-Primary #3168c7, fuer AA-Text auf hell */
  --primary-bright:#3168c7;
  --secondary:#273d62;
  --accent:#137ca2;
  --accent-dark:#178bb5;
  --link:#143d85;
  --border:#dadcde;
  --header-bg:#f9f9f9;
  --header-text:#222426;
  --footer-bg:#f1f2f3;
  --footer-text:#222426;
  --radius:4px;
  --maxw:1180px;
  --font-head:'Lora',Georgia,'Times New Roman',serif;
  --font-body:'Source Sans 3',Arial,Helvetica,sans-serif;
}

*,*::before,*::after{ box-sizing:border-box; }
html{ -webkit-text-size-adjust:100%; }
body{
  margin:0;
  background:var(--bg);
  color:var(--text);
  font-family:var(--font-body);
  font-size:17px;
  line-height:1.65;
  overflow-x:hidden;
}
img{ max-width:100%; height:auto; display:block; }
a{ color:var(--link); text-decoration:underline; text-decoration-color:rgba(31,100,122,.35); text-underline-offset:2px; }
a:hover{ color:var(--accent-dark); }
h1,h2,h3,h4{ font-family:var(--font-head); font-weight:700; line-height:1.25; margin:0 0 .5em; color:var(--text); }
h1{ font-size:2.1rem; }
h2{ font-size:1.55rem; }
h3{ font-size:1.2rem; }
p{ margin:0 0 1.1em; }
ul,ol{ padding-left:1.3em; }
.container{ max-width:var(--maxw); margin:0 auto; padding:0 20px; }
.visually-hidden{ position:absolute !important; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }
button{ font-family:inherit; }

/* -------------------------------------------------------------------------
 * Disclaimer-Banner (mu-plugin, hier nur Feintuning falls jemals aktiv)
 * ---------------------------------------------------------------------- */
.ps-disclaimer{ font-family:var(--font-body); }

/* -------------------------------------------------------------------------
 * Topbar
 * ---------------------------------------------------------------------- */
.topbar{
  background:var(--secondary);
  color:#ffffff;
  font-size:.83rem;
}
.topbar .container{
  display:flex; align-items:center; justify-content:space-between;
  height:38px;
}
.topbar__meta{ opacity:.9; }
.topbar__tools{ display:flex; align-items:center; gap:16px; }
.topbar__tool{
  background:none; border:0; color:#ffffff; cursor:pointer;
  display:flex; align-items:center; gap:6px; padding:4px 2px;
  font-size:.83rem;
}
.topbar__tool svg{ width:16px; height:16px; stroke:#ffffff; fill:none; flex-shrink:0; }
.topbar__tool:hover{ color:var(--primary-bright); }
.topbar__tool:hover svg{ stroke:var(--primary-bright); }

/* Suchfeld */
.topbar-search{
  background:#1e304f; border-top:1px solid rgba(255,255,255,.15);
  display:none;
}
.topbar-search.is-open{ display:block; }
.topbar-search form{ display:flex; gap:8px; padding:10px 0; }
.topbar-search input[type="search"]{
  flex:1; border:0; border-radius:var(--radius); padding:8px 12px;
  font-size:1rem; font-family:var(--font-body);
}
.topbar-search button{
  background:var(--primary-bright); color:#0c172b; border:0; border-radius:var(--radius);
  padding:8px 16px; font-weight:600; cursor:pointer;
}
.topbar-search button:hover{ background:#4f80d6; }

/* -------------------------------------------------------------------------
 * Header: Logo + Sitename
 * ---------------------------------------------------------------------- */
.site-header{ background:var(--header-bg); color:var(--header-text); border-bottom:1px solid var(--border); }
.branding{ display:flex; align-items:center; justify-content:space-between; padding:20px 0 16px; }
.branding__logo{ display:flex; flex-direction:column; text-decoration:none; color:inherit; }
.branding__logo:hover{ color:inherit; }
.branding__mark{
  display:inline-flex; align-items:center; gap:10px;
  font-family:var(--font-head); font-weight:700; font-size:1.7rem; letter-spacing:.01em;
}
.branding__mark .mark-24{ color:var(--accent); }
.branding__tagline{ font-size:.92rem; color:var(--muted); margin-top:2px; max-width:46ch; }
.branding__badge{
  display:none;
}

/* Burger */
.nav-toggle{
  display:none; background:none; border:1px solid var(--border); border-radius:var(--radius);
  width:44px; height:40px; cursor:pointer; align-items:center; justify-content:center;
}
.nav-toggle svg{ width:22px; height:22px; stroke:var(--text); fill:none; }

/* -------------------------------------------------------------------------
 * Mega-Nav
 * ---------------------------------------------------------------------- */
.mega-nav{ background:var(--surface); border-bottom:1px solid var(--border); position:relative; z-index:30; }
.mega-nav__list{ list-style:none; margin:0; padding:0; display:flex; align-items:stretch; }
.mega-nav__item{ position:relative; }
.mega-nav__link{
  display:flex; align-items:center; gap:6px;
  padding:13px 16px; font-weight:600; font-size:.96rem; color:var(--text);
  text-decoration:none; border-bottom:3px solid transparent;
  white-space:nowrap;
}
.mega-nav__link:hover, .mega-nav__item.is-open>.mega-nav__link{ color:var(--primary); border-bottom-color:var(--primary); }
.mega-nav__link .chevron{ width:11px; height:11px; stroke:currentColor; fill:none; transition:transform .15s; }
.mega-nav__item.is-open .chevron{ transform:rotate(180deg); }

.mega-panel{
  display:none;
  position:absolute; left:0; top:100%;
  background:#ffffff; border:1px solid var(--border); border-top:3px solid var(--primary);
  box-shadow:0 12px 28px rgba(0,0,0,.12);
  padding:18px; width:560px; max-width:86vw;
}
.mega-nav__item.is-open .mega-panel{ display:block; }
.mega-panel__grid{ display:grid; grid-template-columns:1fr 1fr 1fr; gap:14px; }
.mega-panel__card{ text-decoration:none; color:inherit; display:block; }
.mega-panel__card:hover .mega-panel__title{ color:var(--primary); text-decoration:underline; }
.mega-panel__chip{ display:inline-block; }
.mega-panel__title{ display:block; font-family:var(--font-head); font-weight:700; font-size:.98rem; margin:8px 0 4px; color:var(--text); }
.mega-panel__desc{ font-size:.85rem; color:var(--muted); line-height:1.5; }

/* -------------------------------------------------------------------------
 * Kategorie-Chips
 * ---------------------------------------------------------------------- */
.chip{
  display:inline-flex; align-items:center; font-family:var(--font-body);
  font-size:.72rem; font-weight:700; text-transform:uppercase; letter-spacing:.04em;
  color:#ffffff; padding:4px 9px; border-radius:3px; line-height:1.4;
}
.chip--global{ background:var(--primary); }
.chip--europa{ background:var(--secondary); }
.chip--vergleich{ background:var(--accent); }

/* -------------------------------------------------------------------------
 * Breadcrumb
 * ---------------------------------------------------------------------- */
.breadcrumb{ font-size:.85rem; color:var(--muted); padding:14px 0; }
.breadcrumb a{ color:var(--muted); text-decoration:underline; }
.breadcrumb a:hover{ color:var(--primary); }
.breadcrumb .sep{ margin:0 6px; }

/* -------------------------------------------------------------------------
 * Hero / Featured-Artikel
 * ---------------------------------------------------------------------- */
.hero-feature{ padding:26px 0 8px; }
.hero-feature__card{
  position:relative; display:block; text-decoration:none; color:#ffffff;
  border-radius:6px; overflow:hidden; min-height:420px;
  display:flex; align-items:flex-end;
}
.hero-feature__card img{
  position:absolute; inset:0; width:100%; height:100%; object-fit:cover; z-index:0;
}
.hero-feature__scrim{
  position:absolute; inset:0; z-index:1;
  background:linear-gradient(180deg, rgba(15,24,30,.05) 0%, rgba(13,21,26,.55) 55%, rgba(10,16,20,.92) 100%);
}
.hero-feature__body{ position:relative; z-index:2; padding:32px 34px; max-width:760px; display:flex; flex-direction:column; align-items:flex-start; }
.hero-feature__body .chip{ margin-bottom:14px; }
.hero-feature__title{ display:block; color:#ffffff; font-size:2.15rem; margin-bottom:12px; text-shadow:0 2px 10px rgba(0,0,0,.35); }
.hero-feature__excerpt{ display:block; color:#e8eeed; font-size:1.02rem; max-width:62ch; margin-bottom:14px; }
.hero-feature__meta{ display:flex; gap:14px; color:#cdd5e4; font-size:.85rem; flex-wrap:wrap; }
.hero-feature__bookmark{
  position:absolute; top:16px; right:16px; z-index:3;
}

/* Merkliste-Icon (reine UI, lokal per localStorage) */
.bookmark-btn{
  background:rgba(10,16,20,.55); border:1px solid rgba(255,255,255,.5); border-radius:50%;
  width:38px; height:38px; display:flex; align-items:center; justify-content:center; cursor:pointer;
}
.bookmark-btn svg{ width:18px; height:18px; stroke:#ffffff; fill:none; stroke-width:2; }
.bookmark-btn[aria-pressed="true"] svg{ fill:var(--accent); stroke:var(--accent); }
.bookmark-btn:hover{ border-color:var(--primary-bright); }
.news-card .bookmark-btn{
  background:#ffffff; border:1px solid var(--border);
}
.news-card .bookmark-btn svg{ stroke:var(--secondary); }
.news-card .bookmark-btn[aria-pressed="true"] svg{ fill:var(--accent); stroke:var(--accent); }

/* -------------------------------------------------------------------------
 * News-Grid
 * ---------------------------------------------------------------------- */
.news-grid{ padding:28px 0 10px; }
.section-title{
  font-size:1.05rem; text-transform:uppercase; letter-spacing:.05em; font-weight:700;
  color:var(--secondary); margin:0 0 16px; padding-bottom:8px; border-bottom:2px solid var(--border);
  font-family:var(--font-body);
}
.news-grid__list{ display:grid; grid-template-columns:1fr 1fr; gap:22px; list-style:none; margin:0; padding:0; }
.news-card{
  background:#ffffff; border:1px solid var(--border); border-radius:6px; overflow:hidden;
  display:flex; flex-direction:column; position:relative;
}
.news-card__media{ position:relative; aspect-ratio:16/9; overflow:hidden; }
.news-card__media img{ width:100%; height:100%; object-fit:cover; }
.news-card__chip{ position:absolute; left:10px; top:10px; }
.news-card__bookmark{ position:absolute; right:10px; top:10px; }
.news-card__body{ padding:16px 18px 18px; display:flex; flex-direction:column; gap:8px; flex:1; }
.news-card__title{ margin:0; font-size:1.18rem; }
.news-card__title a{ color:var(--text); text-decoration:none; }
.news-card__title a:hover{ color:var(--primary); text-decoration:underline; }
.news-card__excerpt{ color:var(--muted); font-size:.94rem; margin:0; flex:1; }
.news-card__meta{ font-size:.8rem; color:var(--muted); display:flex; gap:12px; }

/* -------------------------------------------------------------------------
 * Themenblock je Programm
 * ---------------------------------------------------------------------- */
.programs{ padding:34px 0 10px; }
.programs__grid{ display:grid; grid-template-columns:repeat(3,1fr); gap:20px; }
.program-card{
  background:var(--surface); border:1px solid var(--border); border-radius:6px; padding:20px;
  border-top:4px solid var(--primary);
}
.program-card--environdec{ border-top-color:var(--secondary); }
.program-card--pep{ border-top-color:var(--accent); }
.program-card__eyebrow{ font-size:.75rem; text-transform:uppercase; letter-spacing:.05em; color:var(--muted); font-weight:700; }
.program-card h3{ margin:6px 0 10px; }
.program-card dl{ margin:0 0 12px; font-size:.88rem; }
.program-card dt{ font-weight:700; color:var(--secondary); float:left; clear:left; width:38%; }
.program-card dd{ margin:0 0 6px 40%; color:var(--muted); }
.program-card a.more{ font-weight:600; font-size:.9rem; }

/* -------------------------------------------------------------------------
 * Anzeige (Theme-Werbeplatz: footer-banner) + In-Content-Anzeige
 * ---------------------------------------------------------------------- */
.ad-banner{
  background:#ffffff; border:1px solid var(--border); border-left:4px solid var(--primary-bright);
  border-radius:6px; padding:18px 20px; margin:30px 0;
  display:flex; gap:18px; align-items:center; flex-wrap:wrap;
}
.ad-banner__label{
  font-size:.68rem; text-transform:uppercase; letter-spacing:.06em; font-weight:700;
  color:#ffffff; background:var(--muted); padding:3px 8px; border-radius:3px; flex-shrink:0;
}
.ad-banner__body{ flex:1; min-width:220px; }
.ad-banner__body h4{ margin:0 0 4px; font-size:1.02rem; }
.ad-banner__body p{ margin:0; font-size:.9rem; color:var(--muted); }
.ad-banner__cta{
  display:inline-block; background:var(--secondary); color:#ffffff; text-decoration:none;
  padding:9px 18px; border-radius:var(--radius); font-weight:600; font-size:.88rem; white-space:nowrap;
}
.ad-banner__cta:hover{ background:var(--primary); color:#ffffff; }

/* -------------------------------------------------------------------------
 * Artikel-Seite
 * ---------------------------------------------------------------------- */
.article-hero{ position:relative; }
.article-hero__media{ aspect-ratio:21/9; overflow:hidden; }
.article-hero__media img{ width:100%; height:100%; object-fit:cover; }
.article-head{ padding:22px 0 6px; max-width:78ch; }
.article-head .chip{ margin-bottom:12px; }
.article-head h1{ font-size:2rem; }
.article-meta{ display:flex; gap:16px; flex-wrap:wrap; color:var(--muted); font-size:.88rem; margin-top:10px; }
.article-meta__item{ display:flex; align-items:center; gap:5px; }
.article-meta svg{ width:14px; height:14px; stroke:var(--muted); fill:none; }

.article-body{ padding:10px 0 8px; max-width:78ch; }
.article-body h2{ margin-top:1.7em; font-size:1.4rem; }
.article-body h3{ margin-top:1.4em; }
.article-body p{ font-size:1.03rem; }
.article-body table{ width:100%; border-collapse:collapse; margin:1.4em 0; font-size:.92rem; }
.article-body th, .article-body td{ border:1px solid var(--border); padding:9px 11px; text-align:left; vertical-align:top; }
.article-body th{ background:var(--surface); font-family:var(--font-head); font-weight:700; }
.article-body tr:nth-child(even) td{ background:#fbfbfb; }
.article-body ul, .article-body ol{ font-size:1.01rem; }
.article-body ul li, .article-body ol li{ margin-bottom:.4em; }
.article-body blockquote{
  margin:1.4em 0; padding:14px 20px; border-left:4px solid var(--primary);
  background:var(--surface); font-style:italic; color:var(--text);
}
.article-body figure{ margin:1.6em 0; }
.article-body figcaption{ font-size:.82rem; color:var(--muted); margin-top:6px; }
.article-body code{
  background:var(--surface); padding:.15em .4em; border-radius:3px; font-size:.9em;
  font-family:ui-monospace,Consolas,monospace;
}

.article-body .anzeige, .article-body .anzeige-block{
  background:#ffffff; border:2px solid var(--accent); border-radius:6px;
  padding:18px 20px; margin:2em 0; position:relative;
}
.article-body .anzeige p:first-child, .article-body .anzeige-block p:first-child{ margin-bottom:.6em; }
.article-body .anzeige p:first-child strong, .article-body .anzeige-block .anzeige-label{
  display:inline-block; background:var(--accent); color:#ffffff; font-size:.68rem;
  text-transform:uppercase; letter-spacing:.06em; padding:3px 9px; border-radius:3px; font-weight:700;
}
.article-body .anzeige a, .article-body .anzeige-block a{ font-weight:600; }

.article-belegstatus{
  margin-top:2.4em; padding-top:1.2em; border-top:1px solid var(--border);
}
.article-belegstatus h2{ font-size:1.05rem; text-transform:uppercase; letter-spacing:.03em; color:var(--secondary); }
.article-belegstatus ul{ font-size:.88rem; color:var(--muted); }

.article-footer-nav{ padding:20px 0 40px; max-width:78ch; }
.back-link{ display:inline-flex; align-items:center; gap:6px; font-weight:600; }

/* -------------------------------------------------------------------------
 * Seiten (page.php)
 * ---------------------------------------------------------------------- */
.page-content{ padding:26px 0 50px; max-width:74ch; }
.page-content h1{ font-size:1.9rem; }
.page-content .betrieb-box{
  background:var(--surface); border-radius:6px; padding:18px 20px; margin:1.6em 0; font-size:.95rem;
}
.page-content .kontakt-list{ list-style:none; padding:0; }
.page-content .kontakt-list li{ margin-bottom:.6em; }

/* -------------------------------------------------------------------------
 * 404
 * ---------------------------------------------------------------------- */
.error-404{ padding:60px 0 80px; text-align:center; }
.error-404 h1{ font-size:2.4rem; }
.error-404 a.button{
  display:inline-block; margin-top:16px; background:var(--primary); color:#ffffff; text-decoration:none;
  padding:11px 22px; border-radius:var(--radius); font-weight:600;
}

/* -------------------------------------------------------------------------
 * Footer
 * ---------------------------------------------------------------------- */
.site-footer{ background:var(--footer-bg); color:var(--footer-text); border-top:1px solid var(--border); margin-top:20px; }
.footer-ad-wrap{ padding-top:24px; }
.footer-columns{ display:grid; grid-template-columns:1.4fr 1fr 1fr 1fr; gap:28px; padding:34px 0 26px; }
.footer-col h4{ font-family:var(--font-body); font-size:.85rem; text-transform:uppercase; letter-spacing:.05em; color:var(--secondary); margin-bottom:12px; }
.footer-col p, .footer-col li{ font-size:.9rem; color:var(--muted); }
.footer-col ul{ list-style:none; padding:0; margin:0; }
.footer-col ul li{ margin-bottom:7px; }
.footer-col a{ color:var(--footer-text); text-decoration:none; }
.footer-col a:hover{ color:var(--primary); text-decoration:underline; }
.footer-transparenz{ font-size:.88rem; color:var(--muted); }
.footer-bottom{
  border-top:1px solid var(--border); padding:16px 0 26px;
  display:flex; flex-wrap:wrap; gap:10px 20px; align-items:center; justify-content:space-between;
  font-size:.82rem; color:var(--muted);
}
.footer-betreiber{ line-height:1.6; }
.footer-credit{ font-size:.78rem; color:var(--muted); opacity:.85; }

/* Nach oben */
.to-top{
  position:fixed; right:20px; bottom:20px; z-index:40;
  width:44px; height:44px; border-radius:50%; background:var(--secondary); color:#ffffff;
  border:0; display:flex; align-items:center; justify-content:center; cursor:pointer;
  box-shadow:0 4px 14px rgba(0,0,0,.25); opacity:0; pointer-events:none; transition:opacity .2s, background .2s;
}
.to-top.is-visible{ opacity:1; pointer-events:auto; }
.to-top:hover{ background:var(--primary); }
.to-top svg{ width:20px; height:20px; stroke:#ffffff; fill:none; }

/* -------------------------------------------------------------------------
 * Mobil
 * ---------------------------------------------------------------------- */
@media (max-width: 900px){
  .programs__grid{ grid-template-columns:1fr; }
  .footer-columns{ grid-template-columns:1fr 1fr; }
}

@media (max-width: 720px){
  .news-grid__list{ grid-template-columns:1fr; }
  .mega-panel{ width:100%; max-width:100%; left:0; }
  .mega-panel__grid{ grid-template-columns:1fr; }
}

@media (max-width: 640px){
  body{ font-size:16px; }
  .nav-toggle{ display:flex; }
  .topbar__meta{ display:none; }
  .branding{ padding:16px 0 12px; }
  .branding__mark{ font-size:1.4rem; }
  .mega-nav{ display:none; position:relative; }
  .mega-nav.is-open{ display:block; }
  .mega-nav__list{ flex-direction:column; }
  .mega-nav__link{ border-bottom:1px solid var(--border); padding:14px 4px; justify-content:space-between; }
  .mega-panel{ position:static; border:0; border-top:1px solid var(--border); box-shadow:none; width:100%; padding:12px 4px; }
  .mega-panel__grid{ grid-template-columns:1fr; }
  .hero-feature__card{ min-height:320px; }
  .hero-feature__title{ font-size:1.5rem; }
  .hero-feature__body{ padding:20px; }
  .footer-columns{ grid-template-columns:1fr; padding:26px 0 16px; }
  .footer-bottom{ flex-direction:column; align-items:flex-start; }
  .program-card dt{ width:44%; }
  .program-card dd{ margin-left:46%; }
  .article-body table{ font-size:.82rem; }
  .article-body th, .article-body td{ padding:7px 8px; }
}
