/*
Theme Name: Jungpanther Theme Hero
Theme URI: https://example.com/jungpanther-theme-hero
Author: Andreas Müller
Description: Sporty hero theme with fixed header, drawer menu, social icons, and card layout.
Version: 6.8.0
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: jungpanther-theme-hero
Tags: responsive-layout, custom-logo, full-width-template, custom-colors
*/

/* =========================================================
   1) Variables
   ========================================================= */
:root{
  --jp-primary:#14234b;
  --jp-accent:#2f83f7;
  --jp-bg:#0a1024;
  --jp-card:#101c3a;
  --jp-text:#eaf0fd;
  --jp-white:#fff;
  --jp-speed:300ms;
  --jp-content-gap: 15px;

  /* Refined by header-height.js once it runs (it's a footer-enqueued
     script, so this needs to already be a realistic value — not 0 — or
     the page flashes with content jammed under the fixed header until
     the script executes. 136px matches the header's actual rendered
     height (measured live) at both the mobile and desktop breakpoints —
     re-measure and update this if the header's own size ever changes. */
  --jp-header-height: 136px;

  --jp-radius:18px;
  --jp-shadow:0 12px 32px rgba(0,0,0,.35);

  /* Dark "Flutlicht" palette tokens — shared by every page (this used to
     be a body.home-only override; the whole site now uses the same dark
     look the front page pioneered, header/nav included). */
  --jp-ink: #05091a;   /* near-black, a shade darker than --jp-bg — the header */
  --jp-cyan: #8ec9ff;
  --jp-muted: #93a3c4;
  --jp-line: rgba(255,255,255,.12);
  --jp-panel: #101c3a;
  --jp-panel-2: #142346;
  --jp-skew: -12deg;

  /* ---- games plugin (jpms-*): flat "cards" layout ---- */
  --jpms-card-bg: var(--jp-panel);
  --jpms-head-bg: var(--jp-panel-2);
  --jpms-card-border: 1px solid var(--jp-line);
  --jpms-card-shadow: 0 10px 30px rgba(0,0,0,.45);
  --jpms-pill-bg: var(--jp-panel-2);
  --jpms-pill-border: 1px solid var(--jp-line);
  --jpms-nav-arrow: var(--jp-text);
  --jpms-nav-hover-bg: var(--jp-panel-2);

  /* ---- games plugin (jpms-*): "spotlight" layout ---- */
  --jpms-spot-bg: var(--jp-panel);
  --jpms-spot-border: var(--jp-line);
  --jpms-spot-shadow: 0 10px 30px rgba(0,0,0,.45);
  --jpms-spot-head-bg: rgba(5,9,26,.35);
  --jpms-spot-line: var(--jp-line);
  --jpms-spot-text: var(--jp-text);
  --jpms-spot-text-dim: var(--jp-muted);
  --jpms-badge-bg: var(--jp-accent);
  --jpms-badge-text: #fff;
  --jpms-pill-home-bg: rgba(47,131,247,.18);
  --jpms-pill-home-text: var(--jp-cyan);
  --jpms-pill-home-border: rgba(142,201,255,.35);
  --jpms-pill-away-bg: rgba(140,160,200,.12);
  --jpms-pill-away-text: var(--jp-muted);
  --jpms-pill-away-border: rgba(140,175,255,.2);
  --jpms-spot-accent: var(--jp-cyan);
  --jpms-spot-link-bg: rgba(142,201,255,.14);
  --jpms-spot-link-hover-bg: rgba(142,201,255,.26);
  --jpms-stripe-home: var(--jp-cyan);
  --jpms-stripe-away: var(--jp-muted);

  /* ---- instagram plugin (jpif-*) ---- */
  --jpif-card-bg: var(--jp-panel);
  --jpif-card-shadow: 0 10px 30px rgba(0,0,0,.4);
  --jpif-card-shadow-hover: 0 16px 40px rgba(0,0,0,.5);
  --jpif-meta: var(--jp-muted);
  --jpif-text: #c9d6f0;
  --jpif-accent: var(--jp-accent);
  --jpif-accent-hover: var(--jp-cyan);
  --jpif-time: var(--jp-cyan);
  --jpif-lightbox-overlay: rgba(5,9,26,.92);
  --jpif-lightbox-bg: var(--jp-panel);
  --jpif-lightbox-shadow: 0 20px 60px rgba(0,0,0,.6);
  --jpif-lightbox-text: var(--jp-text);
  --jpif-lightbox-hover-bg: var(--jp-panel-2);
  --jpif-link: var(--jp-cyan);
  --jpif-panel-hover-bg: rgba(255,255,255,.06);
  --jpif-more-border: rgba(255,255,255,.16);
  --jpif-more-bg: transparent;

  /* ---- news scroller plugin (jns-*) ---- */
  --jns-card-bg: var(--jp-panel);
  --jns-card-shadow-hover: 0 16px 40px rgba(0,0,0,.5);
  --jns-meta: var(--jp-muted);
  --jns-title-color: var(--jp-text);
  --jns-accent: var(--jp-accent);
  --jns-accent-hover: var(--jp-cyan);
  --jns-track: rgba(255,255,255,.08);
  --jns-empty-bg: rgba(47,131,247,.08);
  --jns-empty-accent: var(--jp-cyan);
}

/* =========================================================
   2) Reset & Base
   ========================================================= */
*{box-sizing:border-box;margin:0;padding:0}
html,body{height:100%;scroll-behavior:smooth;}
body{
  font-family:'Inter',sans-serif;
  background:var(--jp-bg);
  color:var(--jp-text);
  line-height:1.8;

  /* ONE single spacing rule for the fixed header */
  padding-top: var(--jp-header-height);

  /* Sticky footer layout */
  display:flex;
  flex-direction:column;
  min-height:100vh;
}
img{max-width:100%;height:auto;display:block}
a{color:inherit;text-decoration:none}

/* Typography */
h1,h2,h3,h4,h5,h6,
.jp-nav a,
.jp-wordmark,
.cta{font-family:'Oswald',sans-serif;text-transform:uppercase}

/* Anchor offset so #hash links land below the fixed header */
[id]{scroll-margin-top: calc(var(--jp-header-height) + 12px);}

/* =========================================================
   3) Header (Fixed)
   ========================================================= */
.site-header{
  position:fixed;
  /* top is admin-bar-aware from the start — a separate, later
     ".site-header{top:var(--jp-adminbar-height)}" rule used to carry this
     instead and, for reasons that didn't survive isolating in devtools,
     was consistently losing to this rule's plain "top:0" even though it
     was later in the stylesheet with equal specificity. Not worth chasing
     further: one declaration for "top" removes the ambiguity outright. */
  top:var(--jp-adminbar-height, 0px);left:0;right:0;
  z-index:60;
  background:var(--jp-primary);
  color:#fff;
  transition:all .3s cubic-bezier(.4,0,.2,1);
}
.jp-header-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:28px 18px;
  transition:padding .3s cubic-bezier(.4,0,.2,1);
}
.site-header.scrolled .jp-header-inner{padding:10px 18px}

.jp-logo img{
  height:80px;
  width:auto;
  transition:height .3s cubic-bezier(.4,0,.2,1);
}
.site-header.scrolled .jp-logo img{height:48px}

.jp-wordmark a{
  color:#fff;
  text-decoration:none;
  font-size:40px;
  letter-spacing:1px;
  display:inline-flex;
  align-items:center;
  transition:font-size .3s cubic-bezier(.4,0,.2,1);
}
.site-header.scrolled .jp-wordmark a{font-size:24px}

.jp-wordmark img{
  height:60px;
  width:auto;
  max-width:280px;
  transition:height .3s cubic-bezier(.4,0,.2,1);
}
.site-header.scrolled .jp-wordmark img{height:36px}

/* =========================================================
   4) Desktop Navigation
   ========================================================= */
.jp-nav ul{
  list-style:none;
  display:flex;
  gap:24px;
  align-items:center;
  margin:0;
  padding:0;
}
.jp-nav a{
  color:#fff;
  text-decoration:none;
  font-size:17px;
  font-weight:600;
  letter-spacing:.03em;
  transition:opacity var(--jp-speed);
}
.jp-nav a:hover{opacity:.75}

.jp-nav li{position:relative}
.jp-nav li ul{
  position:absolute;
  left:0;
  top:100%;
  background:var(--jp-panel-2, #142346);
  border:1px solid var(--jp-line, rgba(255,255,255,.12));
  border-radius:8px;
  display:none;
  min-width:220px;
  padding:8px 0;
  z-index:1000;
  box-shadow:0 14px 30px rgba(0,0,0,.4);
}
.jp-nav li:hover>ul{display:block}
.jp-nav li ul li a{display:block;padding:10px 14px}

/* =========================================================
   5) Desktop Social Icons
   ========================================================= */
.jp-social-desktop{
  display:flex;
  align-items:center;
  gap:14px;
  margin-left:16px;
}
.jp-social-desktop a{display:inline-flex;line-height:0}
.jp-social-desktop svg{
  width:22px;
  height:22px;
  fill:#fff;
  transition:filter var(--jp-speed),transform var(--jp-speed);
}
.jp-social-desktop svg:hover{
  filter:brightness(1.25);
  transform:translateY(-1px);
}

/* =========================================================
   6) Burger (Mobile)
   ========================================================= */
.jp-burger{
  display:none;
  flex-direction:column;
  gap:5px;
  width:30px;
  cursor:pointer;
  justify-content:center;
  background:transparent;
  border:none;
  margin-left:auto;
  margin-right:10px;
}
.jp-burger span{
  height:3px;
  width:100%;
  background:var(--jp-white);
  border-radius:2px;
}

/* =========================================================
   7) Drawer
   ========================================================= */
.jp-drawer-backdrop{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.4);
  opacity:0;
  visibility:hidden;
  transition:opacity var(--jp-speed),visibility var(--jp-speed);
  z-index:58;
}
.jp-drawer{
  position:fixed;
  top:0;
  left:0;
  width:100%;
  background:var(--jp-ink, #05091a);
  color:var(--jp-white);
  transform:translateY(-100%);
  transition:transform var(--jp-speed) ease,opacity var(--jp-speed) ease;
  z-index:59;
  opacity:0;
  max-height:100vh;
  overflow-y:auto;
}
.jp-drawer.open{transform:translateY(0);opacity:1}
.jp-drawer-backdrop.open{opacity:1;visibility:visible}
.jp-drawer .drawer-pad{padding:72px 0 0}
.jp-drawer nav ul{list-style:none;margin:0;padding:0}
.jp-drawer nav li a{
  display:block;
  padding:16px 22px;
  color:#fff;
  text-decoration:none;
  font-family:'Oswald',sans-serif;
  text-transform:uppercase;
  font-size:19px;
  font-weight:600;
  letter-spacing:.03em;
  border-bottom:1px solid rgba(255,255,255,.2);
}
.jp-drawer nav li a:hover{background:rgba(255,255,255,.1)}
.jp-drawer nav li ul{display:none;padding-left:20px}
.jp-drawer nav li.open>ul{display:block}
.jp-drawer .drawer-social{
  display:flex;
  justify-content:center;
  gap:22px;
  padding:18px 0 24px;
}
.jp-drawer .drawer-social a{display:inline-flex}
.jp-drawer .drawer-social svg{
  width:26px;
  height:26px;
  fill:#fff;
  transition:filter var(--jp-speed);
}
.jp-drawer .drawer-social svg:hover{filter:brightness(1.25)}

/* =========================================================
   8) Main Layout
   ========================================================= */
main.site-content,
main.container{
  flex:1 0 auto;
  display:block;
  padding:0;   /* important: no header spacing hacks here */
  margin:0;
}

/* Standard page template: <main class="container"><section class="card">... */
.container > .card{
  width:min(1100px,92%);
  margin:0 auto; /* content starts right after header */
  background:var(--jp-card);
  border-radius:var(--jp-radius);
  padding:15px 15px;
  box-shadow:var(--jp-shadow);
  line-height:1.8;
}
/* News archive (page-news.php): sidebar + list needs more room than a plain
   text page. */
body.page-id-5 .container > .card{
  width:min(1300px,94%);
  padding:24px 28px;
}
/* Slim page title: left-aligned with the same skewed accent bar the front
   page's section headings use (jp_section_heading() in functions.php),
   instead of a big centered word with the card's inherited line-height:1.8
   inflating it into a huge block on its own. */
.container > .card h1{
  display:flex;
  align-items:center;
  gap:12px;
  margin-bottom:18px;
  font-size:1.5rem;
  line-height:1.2;
  text-align:left;
}
.container > .card h1::before{
  content:"";
  flex:0 0 auto;
  width:8px;
  height:.85em;
  background:var(--jp-cyan, #8ec9ff);
  transform:skewX(var(--jp-skew, -12deg));
  border-radius:1px;
}

/* =========================================================
   9) Hero
   ========================================================= */
@keyframes fadeInHero{
  0%{opacity:0;transform:translateY(15px)}
  100%{opacity:1;transform:translateY(0)}
}
.jp-hero{
  width:100%;
  height:65vh;
  background-position:center 40%;
  background-size:cover;
  background-repeat:no-repeat;
  position:relative;
  overflow:hidden;
  animation:fadeInHero 1.2s ease-out forwards;
}
.jp-hero .hero-inner{
  height:100%;
  display:flex;
  justify-content:center;
  align-items:flex-end;
}
.jp-hero .cta{
  display:inline-block;
  background:var(--jp-accent);
  color:#fff;
  font-size:1.6rem;
  font-weight:700;
  padding:.25rem 1.6rem;
  border-radius:6px;
  margin-bottom:0.6rem;
  margin-right:1rem;
  letter-spacing:.5px;
  text-decoration:none;
  transition:transform var(--jp-speed), box-shadow var(--jp-speed);
}
.jp-hero .cta:hover{
  transform:translateY(-2px);
  box-shadow:0 8px 16px rgba(0,0,0,.25);
}
@media(max-width:768px){
  .jp-hero{height:45vh;background-position:center 40%;}
}

/* =========================================================
   10) Home Cards
   ========================================================= */
.jp-home-cardGames{width:100%;margin:8px auto;padding:5px 3px 0}

.jp-home-card{
  width:min(1100px,92%);
  margin:40px auto;
  background:var(--jp-card);
  border-radius:var(--jp-radius);
  padding:1px 28px 28px;
  box-shadow:var(--jp-shadow);
  line-height:1.8;
}
.jp-home-card + .jp-home-card{margin-top:60px;}

.jp-home-card .cta{
  display:inline-block;
  background:var(--jp-accent);
  color:#fff;
  font-size:1.4rem;
  font-weight:700;
  padding:.25rem 1.6rem;
  border-radius:6px;
  margin-top:1rem;
  margin-bottom:.6rem;
  letter-spacing:.5px;
  text-decoration:none;
  transition:transform var(--jp-speed), box-shadow var(--jp-speed);
}

/* =========================================================
   11) Page Card (optional class)
   ========================================================= */
.jp-page-card{
  width:min(1100px,92%);
  margin:40px auto;
  background:var(--jp-card);
  border-radius:var(--jp-radius);
  padding:28px 32px;
  box-shadow:var(--jp-shadow);
  line-height:1.8;
}
.jp-page-card h1{
  display:flex;
  align-items:center;
  gap:12px;
  margin-bottom:18px;
  font-size:1.5rem;
  line-height:1.2;
  text-align:left;
}
.jp-page-card h1::before{
  content:"";
  flex:0 0 auto;
  width:8px;
  height:.85em;
  background:var(--jp-cyan, #8ec9ff);
  transform:skewX(var(--jp-skew, -12deg));
  border-radius:1px;
}

/* =========================================================
   12) Content Typography & Lists
   ========================================================= */
.jp-page-card p,
.jp-home-card p,
.container > .card p:not(.jns-card__excerpt){margin-bottom:1.2em;}

/* :not(.jns-card__title) etc. — this generic "prose inside a plain page
   template" rule would otherwise leak into the news-scroller plugin's card
   components (h3.jns-card__title, p.jns-card__excerpt) whenever they're
   used inside <main class="container"><section class="card"> (the news
   archive page, page-news.php): bare h2-h4/p descendant selectors match
   those regardless of their own class, silently overriding the plugin's
   own compact margins with prose-sized ones. Excluding them here keeps
   the plugin's own CSS authoritative without an escalating specificity
   fight between the two stylesheets. */
.jp-page-card h2,
.jp-page-card h3,
.jp-page-card h4,
.jp-home-card h2,
.jp-home-card h3,
.jp-home-card h4,
.container > .card h2:not(.jns-card__title),
.container > .card h3:not(.jns-card__title),
.container > .card h4:not(.jns-card__title){
  margin-top:2em;
  margin-bottom:.75em;
  font-weight:700;
}

.jp-page-card ul,
.jp-page-card ol,
.jp-home-card ul,
.jp-home-card ol,
.container > .card ul,
.container > .card ol{
  margin-left:1.8em;
  margin-top:.75em;
  margin-bottom:1.5em;
  list-style-position:outside;
}
.jp-page-card li,
.jp-home-card li,
.container > .card li{margin-bottom:.4em;}

.jp-page-card ul li::marker,
.jp-home-card ul li::marker,
.container > .card ul li::marker{color:var(--jp-cyan, #8ec9ff);}

/* Inline text link styling (excludes buttons & CTAs) */
.jp-page-card p a:not(.cta):not(.button),
.jp-home-card p a:not(.cta):not(.button),
.container > .card p a:not(.cta):not(.button),
.erci-card p a:not(.cta):not(.button){
  color:var(--jp-accent);
  text-decoration:underline;
  text-underline-offset:3px;
  transition:color .25s ease, text-decoration-color .25s ease;
}
.jp-page-card p a:not(.cta):hover,
.jp-home-card p a:not(.cta):hover,
.container > .card p a:not(.cta):hover,
.erci-card p a:not(.cta):hover{
  color:var(--jp-cyan, #8ec9ff);
  text-decoration-color:var(--jp-cyan, #8ec9ff);
}
.jp-page-card p a:not(.cta):focus-visible,
.jp-home-card p a:not(.cta):focus-visible,
.container > .card p a:not(.cta):focus-visible,
.erci-card p a:not(.cta):focus-visible{
  outline:2px solid var(--jp-accent);
  outline-offset:2px;
}

/* =========================================================
   13) Footer (broad sitemap)
   ========================================================= */
.site-footer{
  background:var(--jp-ink, #05091a);
  color:#c9d6f0;
  padding:56px 18px 0;
  flex-shrink:0;
  margin-top:auto;
  position:relative;
  z-index:1;
}
.jp-footer-grid{
  width:min(1180px, 92%);
  margin:0 auto;
  display:grid;
  grid-template-columns:1.5fr 1fr 1fr 1fr 1fr;
  gap:32px;
  padding-bottom:36px;
  border-bottom:1px solid var(--jp-line, rgba(255,255,255,.12));
}
.jp-footer-col{
  min-width:0;
}
.jp-footer-brand{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:10px;
}
.jp-footer-logo img{height:56px;width:auto;}
.jp-footer-brand .jp-wordmark a{
  color:#fff;
  font-size:22px;
}
.jp-footer-tagline{
  font-size:.92rem;
  color:var(--jp-muted, #93a3c4);
  max-width:32ch;
}
.jp-footer-social{
  display:flex;
  gap:14px;
  margin-top:4px;
}
.jp-footer-social a{display:inline-flex;line-height:0}
.jp-footer-social svg{
  width:20px;
  height:20px;
  fill:#c9d6f0;
  transition:fill var(--jp-speed), transform var(--jp-speed);
}
.jp-footer-social svg:hover{fill:var(--jp-cyan, #8ec9ff);transform:translateY(-1px)}

.jp-footer-heading{
  display:flex;
  align-items:center;
  gap:8px;
  color:#fff;
  font-size:1rem;
  letter-spacing:.03em;
  margin-bottom:16px;
}
.jp-footer-heading::before{
  content:"";
  flex:0 0 auto;
  width:4px;
  height:14px;
  background:var(--jp-cyan, #8ec9ff);
  transform:skewX(var(--jp-skew, -12deg));
  border-radius:1px;
}
.jp-footer-list{
  list-style:none;
  margin:0;
  padding:0;
  display:flex;
  flex-direction:column;
  gap:10px;
}
.jp-footer-list a{
  color:#c9d6f0;
  font-size:.94rem;
  transition:color var(--jp-speed);
}
.jp-footer-list a:hover{color:var(--jp-cyan, #8ec9ff)}

.jp-footer-bottom{
  width:min(1180px, 92%);
  margin:0 auto;
  padding:22px 0;
  text-align:center;
  font-size:.85rem;
  color:var(--jp-muted, #93a3c4);
}

@media(max-width:1100px){
  .jp-footer-grid{grid-template-columns:1.4fr 1fr 1fr;}
  .jp-footer-brand{grid-row: span 2;}
}
@media(max-width:900px){
  /* brand takes the full top row; the four link columns settle into a
     2x2 grid underneath instead of squeezing ever-narrower side by side */
  .jp-footer-grid{grid-template-columns:1fr 1fr;}
  .jp-footer-brand{grid-column:1 / -1; grid-row:auto;}
}
@media(max-width:560px){
  .jp-footer-grid{grid-template-columns:1fr;gap:28px;}
  .jp-footer-brand{align-items:flex-start;}
}

/* =========================================================
   14) Responsive
   ========================================================= */
@media(max-width:992px){
  .jp-nav{display:none}
  .jp-burger{display:flex;z-index:61;}
  .jp-header-inner{padding:8px 10px;gap:8px;flex-wrap:wrap;}

  .jp-logo img{height:60px;max-width:90px;}
  .jp-wordmark a{font-size:18px;}
  .jp-wordmark img{height:45px;max-width:180px;}

  .jp-social-desktop{display:none !important;}
}

/* =========================================================
   15) ERCI Overview (Abteilungsleitung & Ansprechpartner)
   ========================================================= */
.erci-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(260px, 1fr));
  gap:28px;
}
.erci-card{
  background:var(--jp-panel, #101c3a);
  border-radius:12px;
  border:1px solid var(--jp-line, rgba(255,255,255,.12));
  padding:16px 18px 12px;
  display:flex;
  flex-direction:column;
  transition:transform 0.25s ease, box-shadow 0.25s ease;
}
.erci-card:hover{
  transform:translateY(-3px);
  box-shadow:0 10px 22px rgba(0,0,0,0.35);
}
.erci-card-content{
  display:flex;
  align-items:center;
  gap:16px;
  flex:1;
}
.erci-avatar{
  width:100px;
  height:130px;
  object-fit:cover;
  border-radius:8px;
  flex-shrink:0;
  background:var(--jp-panel-2, #142346);
  border:1px solid var(--jp-line, rgba(255,255,255,.12));
  box-shadow:0 4px 12px rgba(0,0,0,0.3);
  transition:transform 0.3s ease;
}
.erci-card:hover .erci-avatar{transform:scale(1.03)}
.erci-card-content > div{flex:1;min-width:0}
.erci-card h3{
  font-size:1.1rem;
  font-weight:700;
  color:var(--jp-text, #eaf0fd);
  margin-bottom:.25rem;
  text-transform:none;
}
.erci-role{
  font-weight:600;
  color:var(--jp-cyan, #8ec9ff);
  text-transform:none;
}
.erci-note{
  margin-top:8px;
  padding-top:6px;
  border-top:1px solid var(--jp-line, rgba(255,255,255,.12));
  text-align:center;
  font-size:.9rem;
  color:var(--jp-muted, #93a3c4);
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
@media(max-width:768px){
  .erci-card-content{flex-direction:column;text-align:center;}
  .erci-avatar{width:150px;height:180px;}
  .erci-note{white-space:normal;text-overflow:unset;}
}

/* =========================================================
   16) ERCI Partner & Camp Styles
   ========================================================= */
.erci-wrap{
  max-width:1200px;
  margin:20px auto 60px;
  padding:10px 20px 40px;
  background:var(--jp-card);
  border-radius:var(--jp-radius);
  box-shadow:0 8px 24px rgba(0,0,0,0.3);
  line-height:1.8;
}
.erci-sub{
  text-align:justify;
  font-size:1rem;
  color:var(--jp-muted, #93a3c4);
  margin:0 auto 40px;
  max-width:900px;
}
.erci-grid.partners{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(240px, 1fr));
  gap:24px;
  justify-items:center;
}
.erci-partner-logo{
  width:auto;
  max-width:180px;
  height:80px;
  object-fit:contain;
  margin-bottom:12px;
  background:#fff;
  border-radius:8px;
  padding:8px;
  transition:transform .3s ease, filter .3s ease;
}
.erci-card:hover .erci-partner-logo{
  transform:scale(1.05);
  filter:brightness(1.05);
}

/* Buttons inside cards */
.erci-card a{
  display:inline-block;
  background:var(--jp-accent);
  color:var(--jp-white);
  padding:.6rem 1.2rem;
  border-radius:8px;
  text-decoration:none;
  font-weight:600;
  letter-spacing:.3px;
  transition:background .25s ease, transform .15s ease;
}
.erci-card a:hover{
  background:#002b5c;
  transform:translateY(-2px);
}

/* Prevent linked logos from inheriting the surrounding <a>'s button style
   (border/outline/shadow) — the white backing plate from .erci-partner-logo
   itself is kept so logos stay visible against the dark card. */
.erci-card a img.erci-partner-logo{
  border:none !important;
  outline:none !important;
  box-shadow:none !important;
}

.erci-card .erci-ausnahmen{
  margin-top:.4rem;
  font-size:.85rem;
  color:var(--jp-muted, #93a3c4);
  font-style:italic;
  line-height:1.5;
}

body.page-id-30 .erci-card{min-height:80px}

/* =========================================================
   17) ERCI Sponsors
   ========================================================= */
.erci-grid.sponsors{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(240px, 1fr));
  gap:26px;
  justify-items:center;
  align-items:stretch;
}
.erci-card.sponsor{
  background:var(--jp-panel, #101c3a);
  border-radius:14px;
  border:1px solid var(--jp-line, rgba(255,255,255,.12));
  box-shadow:0 8px 22px rgba(0,0,0,0.3);
  padding:24px 20px;
  text-align:center;
  width:100%;
  max-width:340px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:space-between;
}
.erci-sponsor-logo{
  width:auto;
  max-width:220px;
  height:100px;
  object-fit:contain;
  margin-bottom:12px;
  background:#fff;
  border-radius:8px;
  padding:8px;
  filter:grayscale(100%) brightness(.9);
  transition:filter .3s ease, transform .3s ease;
}
.erci-card.sponsor:hover .erci-sponsor-logo{
  filter:grayscale(0%) brightness(1);
  transform:scale(1.05);
}
.erci-card.sponsor h3{
  color:var(--jp-text, #eaf0fd);
  font-size:1.1rem;
  font-weight:700;
  margin-bottom:.4rem;
  text-transform:uppercase;
  letter-spacing:.5px;
}
.erci-card.sponsor a{
  color:#fff;
  background:var(--jp-accent);
  padding:.4rem .8rem;
  border-radius:6px;
  font-weight:600;
  font-size:.9rem;
  letter-spacing:.3px;
  text-decoration:none;
  display:inline-block;
  transition:background .25s ease, transform .15s ease;
  margin-top:8px;
}
.erci-card.sponsor a:hover{
  background:#001f4d;
  transform:translateY(-2px);
}
@media(max-width:768px){
  .erci-grid.sponsors{
    grid-template-columns:repeat(auto-fit, minmax(200px, 1fr));
    gap:18px;
  }
  .erci-sponsor-logo{
    max-width:160px;
    height:80px;
  }
}

/* =========================================================
   Header spacing system (single source of truth)
   - JS sets --jp-header-height to the real header height
   - Content starts immediately after header
   ========================================================= */
:root{
  --jp-header-height: 136px; /* refined by header-height.js, see the :root block above for why this isn't 0 */
}

/* ONLY offset for fixed header */
body{
  padding-top: var(--jp-header-height);
}

/* Neutralize any old/duplicate spacing hacks still present */
main.site-content,
main.container{
  padding-top: 0 !important;
  margin-top: 0 !important;
}

/* Prevent the first element from creating an apparent "gap" */
main.site-content > :first-child,
main.container > :first-child{
  margin-top: 0;
}

/* Logged-in admin bar support: --jp-adminbar-height feeds .site-header's
   top (see the header rule above) and this padding-top calc below. Keyed
   off body.admin-bar — WordPress core adds that class server-side in the
   initial HTML whenever the bar shows, so this is correct from the very
   first paint. 32px/46px are WP's own stable admin-bar heights (its
   standard mobile switch is also 782px), not something worth measuring via
   JS — header-height.js still fine-tunes both vars after load, but nothing
   here depends on it running in time. */
:root { --jp-adminbar-height: 0px; }
body.admin-bar { --jp-adminbar-height: 32px; }
@media (max-width: 782px) {
  body.admin-bar { --jp-adminbar-height: 46px; }
}

body{
  padding-top: calc(var(--jp-adminbar-height) + var(--jp-header-height) + var(--jp-content-gap));
}

body.home{
  /* The games section (not a full-bleed hero) is first now, so it wants a
     small breathing gap below the fixed header instead of the 0px this used
     to be when the hero sat flush against it. */
  --jp-content-gap: 20px;
}

.jp-hero{
  margin-top: 0;
}

/* =========================================================
   18) Site-wide dark "Flutlicht" palette + front-page section layout
   ========================================================= */

/* Header: near-black everywhere, overriding the Customizer-driven inline
   background (functions.php prints ".site-header{background-color:…}"
   after this stylesheet, but "body .site-header" has higher specificity —
   one class + one element vs. one class alone — so it wins regardless of
   source order). */
body .site-header{
  background-image: none;
  background-color: var(--jp-ink, #05091a);
}

/* ---- section scaffold: width/centring/spacing shared by all four
   front-page sections; the top margin is redeclared inline by
   jp_content_spacing (functions.php, wp_head) at equal specificity, which
   wins because it prints after this stylesheet ---- */
.jp-sec{
  width: min(1180px, 92%);
  margin: 0 auto;
  margin-top: 40px;
}

/* Games row is wider than the other sections (1180px) but stops short of
   true edge-to-edge — full 100vw made it feel disconnected from the rest of
   the page on wide monitors, where 1180px-contained content sat in a
   comparatively narrow column next to it. 1600px/96% keeps a bit of the
   "breakout carousel" feel (still visibly wider, still spills past the
   1180px column) without stretching across an ultrawide display; on most
   ordinary laptop/desktop widths this cap barely differs from 100% anyway.
   The heading shares this same box now instead of its own narrower one. */
.jp-sec--games{
  width: min(1600px, 96%);
  margin: 0 auto;
}
/* On phones the games strip is meant to be glanceable, not a whole section
   in its own right — drop the heading and let the cards themselves be the
   content (also saves vertical space in the games+hero+insta screenful). */
@media(max-width: 767px){
  .jp-sec--games .jp-sect{ display: none; }
}

/* Hero+insta (and Philosophie+News below) share the same wider box as
   games — on desktop the whole front page reads as one consistent wide
   column instead of the bottom row suddenly narrowing to 1180px.
   margin-left/right only (not the "margin:0 auto" shorthand) because
   .jp-bottom-row is also .jp-sec, which supplies its own margin-top:40px
   gap below .jp-top — a shorthand reset here would zero that out. */
@media(min-width: 980px){
  .jp-hero-row,
  .jp-bottom-row{
    width: min(1600px, 96%);
    margin-left: auto;
    margin-right: auto;
  }
}

/* ---- section heading: skewed accent bar + title ---- */
.jp-sect{
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}
.jp-sect__bar{
  width: 8px;
  height: 26px;
  flex: 0 0 auto;
  background: var(--jp-cyan, #2f83f7);
  transform: skewX(var(--jp-skew, -12deg));
  border-radius: 1px;
}
.jp-sect__title{
  margin: 0;
  font-size: clamp(20px, 2.6vw, 28px);
  line-height: 1.15;
}

/* ---- .jp-top: wraps the games row and the hero+insta row so their visual
   order can flip per breakpoint without duplicating markup. DOM order
   (= mobile order) is games first, then hero+insta — small games strip,
   compact hero, then the Instagram panel, all meant to fit one mobile
   screen without scrolling. Desktop swaps back to hero+insta first,
   games below, matching the classic reference layout. ---- */
.jp-top{
  display: flex;
  flex-direction: column;
}
.jp-top .jp-sec--games{ order: 1; }
.jp-top .jp-hero-row{ order: 2; }

/* .jp-sec's own margin-top (40px, or the Customizer's "space between
   sections" value) is meant for the gap BETWEEN sections — body's
   padding-top already reserves --jp-content-gap below the fixed header, so
   without this the two stack and the first section sits way too far down.
   order: flips which of games/hero-row is visually first per breakpoint
   (see above), so whichever one that is needs its margin-top zeroed —
   not simply ":first-child", which would always mean the games section
   regardless of which one actually renders on top. */
.jp-top .jp-sec--games{ margin-top: 0; }
@media(min-width: 980px){
  .jp-top .jp-sec--games{ margin-top: 40px; }
  .jp-top .jp-hero-row{ margin-top: 0; }
}

/* Tighten spacing only where it's load-bearing — fitting games+hero+insta
   on one mobile screen without scrolling. */
@media(max-width: 767px){
  .jp-top .jp-hero-row{ margin-top: 14px; gap: 10px; }
  .jp-hero-row__insta{ padding: 12px 14px; }
}
@media(min-width: 980px){
  .jp-top .jp-sec--games{ order: 2; }
  .jp-top .jp-hero-row{ order: 1; }
}

/* ---- hero row: compact hero (headline + one CTA) beside a compact
   Instagram panel. Wider than tall on purpose — the hero is a banner here,
   not a destination. ---- */
.jp-hero-row{
  display: grid;
  gap: 16px;
  grid-template-areas: "hero" "insta";
}
@media(min-width: 980px){
  .jp-hero-row{
    grid-template-columns: 2fr 1fr;
    grid-template-areas: "hero insta";
    align-items: stretch;
  }
}

.jp-hero-row__hero{
  grid-area: hero;
  position: relative;
  width: 100%;
  height: auto;        /* overrides .jp-hero's height:65vh */
  min-height: 200px;
  animation: none;     /* overrides .jp-hero's fadeInHero keyframe */
  border-radius: var(--jp-radius);
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}
@media(min-width: 980px){
  .jp-hero-row__hero{ min-height: 300px; }
}

.jp-hero-row__scrim{
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(5,9,26,.92) 14%, rgba(5,9,26,.45) 60%, rgba(5,9,26,.05) 90%);
}

.jp-hero-row__inner{
  position: relative;
  z-index: 1;
  padding: 18px 20px 20px;
  max-width: 620px;
}

.jp-hero-row__title{
  margin: 0;
  font-size: clamp(19px, 2.4vw, 27px);
  line-height: 1.22;
  color: #fff;
}

.jp-hero-row__ctas{
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 14px;
}
.jp-hero-row__cta{
  display: inline-flex;
  align-items: center;
  font-family: 'Oswald', sans-serif;
  font-weight: 600;
  font-size: 12.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 9px 18px;
  border-radius: 7px;
  transition: transform .15s ease, background .15s ease;
}
.jp-hero-row__cta--solid{
  background: var(--jp-accent, #2f83f7);
  color: #fff;
}
.jp-hero-row__cta--solid:hover{ transform: translateY(-1px); }
.jp-hero-row__cta--line{
  background: transparent;
  color: #fff;
  border: 1.5px solid rgba(255,255,255,.55);
}
.jp-hero-row__cta--line:hover{ background: rgba(255,255,255,.08); }

.jp-hero-row__insta{
  grid-area: insta;
  background: var(--jp-panel, #101c3a);
  border: 1px solid var(--jp-line, rgba(255,255,255,.12));
  border-radius: var(--jp-radius);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.jp-hero-row__insta .jp-sect{ margin-bottom: 10px; flex: 0 0 auto; }
.jp-hero-row__insta .jp-sect__title{ font-size: 16px; }
.jp-hero-row__insta .jp-sect__bar{ width: 6px; height: 20px; }

/* Desktop only: hero and insta are grid columns in the same row, and grid
   items default to align-items:stretch — without a cap here, "Mehr laden"
   growing the item list would stretch this box taller, and the hero
   (stretched to match) would balloon with it. Capped height + internal
   scroll on the list once expanded keeps the row's height stable no matter
   how much content is revealed. Mobile stacks hero/insta in separate grid
   rows (not columns), so stretch never applies there — no cap needed. */
@media(min-width: 980px){
  .jp-hero-row__insta{
    max-height: 320px;
    overflow: hidden;
  }
  .jp-hero-row__insta .jpif-panel-wrap{
    overflow-y: auto;
    overflow-x: hidden;
  }
}
.jp-hero-row__insta .jpif-panel-wrap{
  flex: 1 1 auto;
  min-height: 0; /* required for a flex child to actually shrink/scroll instead of just growing */
}

/* ---- philosophy band: plain centred text column (the hero image that used
   to sit beside it now lives up top in .jp-hero-row instead) ---- */
/* Shared framed-panel look — every other section on the front page (games
   cards, the Instagram panel) sits inside a bordered var(--jp-panel)
   surface; Philosophie/News used to be bare text straight on the page
   background, which read as unfinished next to everything else. */
.jp-panel-sec{
  background: var(--jp-panel, #101c3a);
  border: 1px solid var(--jp-line, rgba(255,255,255,.12));
  border-radius: var(--jp-radius);
  padding: 26px 28px;
  min-width: 0;
}

/* ---- bottom row: on mobile News comes first (it's the part that changes),
   Philosophie below; desktop pairs them side by side, Philosophie (primary,
   more text) on the left — mirrors the hero+insta pairing above the games
   row. ---- */
.jp-bottom-row{
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr;
  grid-template-areas: "news" "philo";
}
@media(min-width: 980px){
  .jp-bottom-row{
    width: min(1600px, 96%);
    margin-left: auto;
    margin-right: auto;
    grid-template-columns: 1.1fr 1fr;
    grid-template-areas: "news philo";
    /* default align-items:stretch (not "start") — News has no content-
       based height of its own (see .jp-bottom-row__news height:100% below),
       so it needs the grid row's stretch behavior to actually match
       Philosophie's natural height instead of collapsing to 0. */
  }
}
.jp-bottom-row__philo{ grid-area: philo; }

/* News has no natural height of its own — it fills the grid row's height
   (which .jp-bottom-row's default align-items:stretch sizes to whichever
   column is taller, normally Philosophie's prose) via height:100%, then
   clips + internally scrolls anything that doesn't fit, same pattern as
   .jp-hero-row__insta above. On mobile the two aren't grid columns (single
   column, stacked), so height:100% would collapse to 0 — cap with
   max-height there instead so the panel still has a sane size. */
.jp-bottom-row__news{
  grid-area: news;
  display: flex;
  flex-direction: column;
  max-height: 520px;
  overflow: hidden;
}
@media(min-width: 980px){
  .jp-bottom-row__news{
    height: 100%;
    max-height: none;
  }
}
.jp-bottom-row__news .jp-sect{ flex: 0 0 auto; }
.jp-bottom-row__news .jns-grid-container{
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0; /* required for a flex child to actually shrink/scroll instead of just growing */
}
/* Only the card list scrolls — the footer ("Mehr laden" / "Zu den News")
   is a flex sibling with its own auto-sized box, not part of the scrolling
   area, so it's always visible below the list instead of requiring a
   scroll to reach (previously overflow-y sat on .jns-grid-container,
   which wrapped the footer too). */
.jp-bottom-row__news .jns-grid{
  overflow-y: auto;
  overflow-x: hidden;
  flex: 1 1 auto;
  min-height: 0;
  padding-right: 6px; /* keeps the scrollbar off the cards' edge */
  margin-right: -6px;
}
.jp-bottom-row__news .jns-grid-footer{
  flex: 0 0 auto;
  padding-top: 12px;
}

/* Compact text-forward list instead of the grid module's default big-image
   cards: this column is a single narrow stack (not a multi-column grid), so
   a full-width image dwarfs the text next to it. Small fixed thumbnail +
   excerpt reads like a proper news list instead. align-items:start is the
   fix for a real bug, not just tidiness: CSS Grid's default align-items is
   stretch, so every .jns-card (a grid item here) was being squashed to a
   shared row height shorter than its own text content, clipping the
   excerpt/"Weiterlesen" line and throwing off the gap between entries.
   Matches .jpif-panel (Instagram panel) — gap-based spacing, no dividers. */
.jp-bottom-row__news .jns-grid{
  grid-template-columns: 1fr;
  gap: 4px;
  align-items: start;
}

/* "Mehr laden" reveal: only the first JNS_GRID_REVEAL_COUNT (3, see the PHP
   constant of the same name) cards show by default; the button adds
   .is-expanded to .jns-grid-container (jungpanther-news-scroller.js), same
   no-fetch reveal-and-scroll pattern as the Instagram panel above. */
.jp-bottom-row__news .jns-card:nth-child(n+4){ display: none; }
.jp-bottom-row__news .jns-grid-container.is-expanded .jns-card{ display: block; }
.jp-bottom-row__news .jns-btn--more:disabled{ opacity: .5; cursor: default; }
.jp-bottom-row__news .jns-card{
  height: auto;
  background: transparent;
  box-shadow: none;
  border-radius: 12px;
}
.jp-bottom-row__news .jns-card:hover{ transform: none; box-shadow: none; background: var(--jns-empty-bg); }
.jp-bottom-row__news .jns-card__link{
  height: auto; /* overrides the grid module's default height:100% (tile-grid sizing) */
  flex-direction: row;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 10px;
}
.jp-bottom-row__news .jns-card__thumb{
  width: 92px;
  flex: 0 0 92px;
  aspect-ratio: 1 / 1;
  border-radius: 10px;
}
.jp-bottom-row__news .jns-card:hover .jns-card__thumb img{ transform: none; }
.jp-bottom-row__news .jns-card__body{
  padding: 0;
  flex: 1 1 auto;
  min-width: 0;
}
.jp-bottom-row__news .jns-card__date{
  font-size: .78rem;
}
.jp-bottom-row__news .jns-card__title{
  font-size: 1rem;
  margin-top: .2rem;
}
.jp-bottom-row__news .jns-card__excerpt{
  -webkit-line-clamp: 2;
  margin-top: .35rem;
  font-size: .85rem;
}
.jp-bottom-row__news .jns-card__more{
  padding-top: .4rem;
  font-size: .75rem;
}

/* Reuse the existing card typography rules (paragraph/heading/list/link
   spacing) for the philosophy text block without also picking up
   .jp-home-card's own background/padding/box-shadow. */
.jp-philo__text p{ margin-bottom: 1.2em; }
.jp-philo__text h2,
.jp-philo__text h3,
.jp-philo__text h4{ margin-top: 1em; margin-bottom: .75em; font-weight: 700; }
.jp-philo__text ul,
.jp-philo__text ol{ margin-left: 1.8em; margin-top: .75em; margin-bottom: 1.5em; list-style-position: outside; }
.jp-philo__text li{ margin-bottom: .4em; }
.jp-philo__text ul li::marker{ color: var(--jp-cyan); }
.jp-philo__text p a:not(.cta):not(.button){
  color: var(--jp-cyan);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.jp-philo__text p a:not(.cta):hover{
  color: #fff;
}
