/*
Theme Name: Pixel4Polio
Theme URI: https://pixel4polio.com
Author: BESTgroup Consulting GmbH
Author URI: https://www.best-group.eu
Description: Official theme for the Pixel4Polio End Polio Now campaign.
Version: 2.2.0
Requires at least: 6.0
Requires PHP: 8.0
License: GPL-2.0-or-later
Text Domain: pixel4polio
*/

/* ═══════════════════════════════════════════════════════════
   CSS CUSTOM PROPERTIES
═══════════════════════════════════════════════════════════ */
:root {
  --red:          #E02927;
  --red-dark:     #b51f1e;
  --red-light:    rgba(224,41,39,0.1);
  --orange:       #F5A623;
  --navy:         #1a2a4a;
  --header-bg:    #3a3a3a;
  --header-text:  #ffffff;
  --bg:           #ffffff;
  --bg-off:       #f7f8fa;
  --bg-dark:      #1a2a4a;
  --border:       #e2e6ed;
  --text:         #1a1a2e;
  --text-muted:   #6b7280;
  --font-display: 'Bebas Neue', 'Impact', sans-serif;
  --font-body:    'Inter', 'Segoe UI', sans-serif;
  --r:            8px;
  --r-lg:         16px;
  --shadow:       0 2px 12px rgba(0,0,0,0.08);
  --shadow-lg:    0 8px 40px rgba(0,0,0,0.14);
  --max:          1160px;
}

/* ═══ RESET ═══════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font-body); font-size: 1rem; line-height: 1.7; color: var(--text); background: var(--bg); overflow-x: hidden; }
img  { max-width: 100%; height: auto; display: block; }
a    { color: var(--red); text-decoration: none; transition: color .2s; }
a:hover { color: var(--red-dark); }
ul   { list-style: none; }

/* ═══ TYPOGRAPHY ═══════════════════════════════════════════ */
h1, h2, h3 { font-family: var(--font-display); font-weight: 400; letter-spacing: .04em; line-height: 1.1; }
h1 { font-size: clamp(2.6rem, 7vw, 5rem); color: var(--text); }
h2 { font-size: clamp(1.8rem, 4vw, 3rem); color: var(--text); }
h3 { font-size: clamp(1.3rem, 2.5vw, 1.8rem); }
h4 { font-size: 1.05rem; font-weight: 700; color: var(--text); }
p  { margin-bottom: 1.2rem; }
p:last-child { margin-bottom: 0; }

/* ═══ LAYOUT ════════════════════════════════════════════════ */
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.section { padding: 80px 0; }
.section-dark { background: var(--bg-dark); color: #fff; }
.section-dark h2, .section-dark h3, .section-dark h4 { color: #fff; }
.section-off  { background: var(--bg-off); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 32px; }
@media(max-width:900px){ .grid-2,.grid-3 { grid-template-columns: 1fr; } }

/* ═══ BUTTONS ═══════════════════════════════════════════════ */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 13px 28px; font-family: var(--font-body); font-weight: 700; font-size: .95rem; border-radius: var(--r); border: 2px solid transparent; cursor: pointer; text-decoration: none; transition: all .2s; white-space: nowrap; }
.btn-red { background: var(--red); color: #fff; border-color: var(--red); }
.btn-red:hover { background: var(--red-dark); border-color: var(--red-dark); color: #fff; transform: translateY(-2px); box-shadow: 0 6px 20px rgba(224,41,39,.3); }
.btn-outline-red { background: transparent; color: var(--red); border-color: var(--red); }
.btn-outline-red:hover { background: var(--red); color: #fff; }
.btn-white { background: #fff; color: var(--red); border-color: #fff; }
.btn-outline-white { background: transparent; color: #fff; border-color: rgba(255,255,255,.5); }
.btn-outline-white:hover { border-color: #fff; }
.btn-lg { padding: 18px 40px; font-size: 1.1rem; }
.btn-sm { padding: 8px 18px; font-size: .85rem; }

/* ═══ DEADLINE BANNER ═══════════════════════════════════════ */
.deadline-banner { background: var(--red); padding: 10px 0; text-align: center; }
.deadline-banner p { font-size: .85rem; font-weight: 600; color: #fff; margin: 0; }
.deadline-banner strong { font-weight: 800; }
.deadline-banner a { color: rgba(255,255,255,.9); text-decoration: underline; }

/* ═══ SITE HEADER — grey, matching pixel4polio.de ══════════ */
.site-header { background: var(--header-bg); position: sticky; top: 0; z-index: 200; box-shadow: 0 2px 8px rgba(0,0,0,.25); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 24px; }

.site-branding { display: flex; align-items: center; gap: 10px; text-decoration: none; flex-shrink: 0; }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-name { font-family: var(--font-display); font-size: 1.5rem; letter-spacing: .06em; color: #fff; }
.brand-name em { color: var(--orange); font-style: normal; }
.brand-sub { font-size: .65rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: rgba(255,255,255,.5); margin-top: 2px; }

.main-nav ul { display: flex; align-items: center; gap: 4px; }
.main-nav a { display: block; padding: 7px 12px; font-size: .83rem; font-weight: 500; color: rgba(255,255,255,.8); border-radius: 6px; transition: all .2s; white-space: nowrap; }
.main-nav a:hover, .main-nav .current-menu-item > a, .main-nav .current_page_item > a { color: #fff; background: rgba(255,255,255,.12); }

.header-cta { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }

/* Lang switcher */
.lang-switcher { display: flex; gap: 6px; align-items: center; padding: 0; margin: 0; }
.lang-switcher li { list-style: none; margin: 0; }
.lang-flags a { display: flex; align-items: center; padding: 3px; border: 2px solid transparent; border-radius: 4px; transition: border-color .2s, opacity .2s; opacity: .55; }
.lang-flags a:hover { opacity: 1; border-color: rgba(255,255,255,.3); }
.lang-flags .current-lang a { opacity: 1; border-color: rgba(255,255,255,.5); }
.lang-flags .no-translation a { opacity: .25; pointer-events: none; }
.lang-flags img { width: 22px; height: 16px; border-radius: 2px; display: block; }
.lang-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 26px; height: 18px; background: rgba(255,255,255,.15); border: 1px solid rgba(255,255,255,.3); border-radius: 3px; font-size: .65rem; font-weight: 800; color: #fff; letter-spacing: .06em; padding: 0 4px; }
.current-lang .lang-badge { background: rgba(255,255,255,.35); border-color: rgba(255,255,255,.6); }

.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: #fff; border-radius: 2px; transition: all .3s; }

@media(max-width:900px){
  .nav-toggle { display: flex; }
  .main-nav { display: none; position: absolute; top: 64px; left: 0; right: 0; background: #2d2d2d; padding: 12px 16px 20px; border-bottom: 2px solid var(--red); }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; gap: 2px; }
  .hero { padding: 40px 0 36px; }
  .hero h1 { font-size: clamp(2.2rem, 9vw, 3.5rem); }
  .hero-actions { margin-bottom: 20px !important; }
  .hero-canvas { display: none; }
}

/* ═══ HERO ═══════════════════════════════════════════════════ */
.hero { background: var(--bg); padding: 80px 0 72px; border-bottom: 1px solid var(--border); }
.hero-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.hero-eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 5px 14px; background: var(--red-light); border: 1px solid rgba(224,41,39,.2); border-radius: 100px; font-size: .75rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--red); margin-bottom: 20px; }
.hero-eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--red); animation: blink 2s ease-in-out infinite; }
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:.3} }
.hero-sub { font-family: var(--font-display); font-size: 1.3rem; letter-spacing: .06em; color: var(--red); margin-bottom: 14px; }
.hero-body { font-size: 1.05rem; color: var(--text-muted); margin-top: 4px; margin-bottom: 0; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 28px !important; }
.hero-deadline { margin-top: 14px; padding: 12px 16px; background: var(--bg-off); border-left: 3px solid var(--orange); border-radius: 0 var(--r) var(--r) 0; font-size: .85rem; color: var(--text-muted); }
.hero-deadline strong { color: var(--text); }
.hero-canvas { position: relative; background: #f0f2f6; border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-lg); aspect-ratio: 16/10; }
.canvas-grid-bg { position: absolute; inset: 0; background-image: linear-gradient(rgba(0,0,0,.04) 1px,transparent 1px),linear-gradient(90deg,rgba(0,0,0,.04) 1px,transparent 1px); background-size: 20px 20px; }
.canvas-pixels { position: absolute; inset: 0; }
.c-px { position: absolute; border-radius: 2px; opacity: 0; animation: pop .35s ease-out forwards; }
@keyframes pop { from{opacity:0;transform:scale(0)} to{opacity:1;transform:scale(1)} }
@media(max-width:900px){ .hero-inner { grid-template-columns: 1fr; } }

/* ═══ STATS BAR ═════════════════════════════════════════════ */
.stats-bar { background: var(--header-bg); padding: 24px 0; }
.stats-bar-label { font-size: .7rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: rgba(255,255,255,.35); text-align: center; padding-bottom: 8px; }
.stats-inner { display: flex; justify-content: space-around; align-items: center; flex-wrap: wrap; gap: 20px; }
.stat { text-align: center; }
.stat-num { font-family: var(--font-display); font-size: 2.2rem; color: #fff; line-height: 1; }
.stat-label { font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: rgba(255,255,255,.55); margin-top: 3px; }
.stat-div { width: 1px; height: 44px; background: rgba(255,255,255,.15); }

/* ═══ HOW IT WORKS — 6 steps ════════════════════════════════ */
.steps-row { display: grid; grid-template-columns: repeat(6,1fr); gap: 16px; position: relative; }
.steps-row::before { content: ''; position: absolute; top: 44px; left: calc(8.33% + 16px); right: calc(8.33% + 16px); height: 2px; background: linear-gradient(90deg,var(--red),var(--orange),var(--red)); z-index: 0; }
.step { position: relative; z-index: 1; text-align: center; padding: 28px 14px; background: var(--bg); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow); transition: transform .3s, box-shadow .3s; }
.step:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.step-icon { width: 56px; height: 56px; margin: 0 auto 16px; border-radius: 50%; background: var(--bg-off); border: 2px solid var(--border); display: flex; align-items: center; justify-content: center; font-size: 1.4rem; position: relative; }
.step-icon .step-num { position: absolute; top: -8px; right: -8px; width: 22px; height: 22px; background: var(--red); color: #fff; border-radius: 50%; font-size: .65rem; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.step h4 { font-size: .9rem; margin-bottom: 6px; }
.step p { font-size: .78rem; color: var(--text-muted); margin: 0; line-height: 1.5; }
@media(max-width:1000px){ .steps-row { grid-template-columns: repeat(3,1fr); } .steps-row::before { display: none; } }
@media(max-width:600px){ .steps-row { grid-template-columns: repeat(2,1fr); } }

/* ═══ IMPACT / DARK SECTION ════════════════════════════════ */
.impact-card { padding: 32px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); border-radius: var(--r-lg); transition: border-color .3s; }
.impact-card:hover { border-color: var(--red); }
.impact-card .icon { font-size: 2rem; margin-bottom: 14px; }
.impact-card h4 { color: #fff; margin-bottom: 8px; }
.impact-card p { color: rgba(255,255,255,.6); font-size: .9rem; margin: 0; }

/* ═══ SECTION LABELS ════════════════════════════════════════ */
.label { display: inline-block; font-size: .7rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--red); margin-bottom: 12px; }
.section-dark .label { color: var(--orange); }
.section-hdr { margin-bottom: 48px; }
.section-hdr.center { text-align: center; }

/* ═══ CTA SECTION ═══════════════════════════════════════════ */
.cta-section { background: var(--header-bg); padding: 80px 0; text-align: center; position: relative; overflow: hidden; }
.cta-section::before { content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 4px; background: var(--red); }
.cta-section h2 { color: #fff; margin-bottom: 14px; }
.cta-section p { color: rgba(255,255,255,.65); font-size: 1.05rem; margin-bottom: 36px; }
.epn-link { display: inline-flex; align-items: center; gap: 6px; color: var(--orange); font-weight: 700; }
.epn-link:hover { color: #fff; }

/* ═══ FOOTER ════════════════════════════════════════════════ */
.site-footer { background: #222; color: rgba(255,255,255,.6); padding: 64px 0 32px; border-top: 4px solid var(--red); }
.footer-top { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 48px; margin-bottom: 48px; }
.footer-col h5 { font-size: .72rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: rgba(255,255,255,.4); margin-bottom: 18px; }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 9px; }
.footer-col a { color: rgba(255,255,255,.55); font-size: .88rem; transition: color .2s; }
.footer-col a:hover { color: #fff; }
.footer-brand p { font-size: .85rem; line-height: 1.6; color: rgba(255,255,255,.45); margin-bottom: 16px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.08); padding-top: 28px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; font-size: .78rem; color: rgba(255,255,255,.3); }
.footer-bottom a { color: rgba(255,255,255,.4); }
.footer-bottom a:hover { color: #fff; }
@media(max-width:800px){ .footer-top { grid-template-columns: 1fr 1fr; } }
@media(max-width:500px){ .footer-top { grid-template-columns: 1fr; } .footer-bottom { flex-direction: column; text-align: center; } }

/* ═══ DONOR BADGES ══════════════════════════════════════════ */
.donor-list { display: flex; flex-wrap: wrap; gap: 8px; }
.donor-badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); border-radius: 100px; font-size: .8rem; color: rgba(255,255,255,.75); }
.donor-badge .d-color { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }

/* ═══ PAGE HEADER ═══════════════════════════════════════════ */
.page-hdr { background: var(--header-bg); padding: 60px 0 48px; border-bottom: 3px solid var(--red); }
.page-hdr .breadcrumb { font-size: .8rem; color: rgba(255,255,255,.45); margin-bottom: 14px; }
.page-hdr .breadcrumb a { color: rgba(255,255,255,.6); }
.page-hdr h1 { color: #fff; font-size: clamp(2rem, 5vw, 3.5rem); }
.page-hdr p { color: rgba(255,255,255,.65); margin-top: 12px; font-size: 1.05rem; }

/* ═══ PAGE CONTENT ══════════════════════════════════════════ */
.page-content { max-width: 800px; margin: 0 auto; padding: 64px 24px; }
.page-content h2 { margin: 48px 0 14px; font-size: 1.7rem; }
.page-content h3 { margin: 32px 0 10px; font-size: 1.3rem; }
.page-content ul, .page-content ol { padding-left: 24px; margin-bottom: 1rem; }
.page-content li { margin-bottom: 6px; }
.page-content table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; }
.page-content td, .page-content th { padding: 10px 14px; border: 1px solid var(--border); font-size: .9rem; }
.page-content th { background: var(--bg-off); font-weight: 700; }

/* ═══ HOW-IT-WORKS DETAIL PAGE ══════════════════════════════ */
.detail-step { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; padding: 64px 0; border-bottom: 1px solid var(--border); }
.detail-step:last-child { border-bottom: none; }
.detail-step.reverse { direction: rtl; }
.detail-step.reverse > * { direction: ltr; }
.detail-step-num { font-family: var(--font-display); font-size: 5rem; color: var(--red-light); line-height: 1; margin-bottom: -12px; }
.detail-step h3 { margin-bottom: 12px; }
.detail-step p { color: var(--text-muted); }
.detail-step ul { padding-left: 20px; list-style: disc; color: var(--text-muted); font-size: .95rem; }
.step-screenshot { background: #e8edf5; border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-lg); }
.mockup-toolbar { background: var(--header-bg); padding: 10px 14px; display: flex; align-items: center; gap: 10px; }
.mockup-toolbar .m-logo { background: var(--red); border-radius: 4px; width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; font-size: .55rem; font-weight: 800; color: #fff; }
.mockup-toolbar span { font-size: .75rem; color: rgba(255,255,255,.8); font-weight: 600; }
.mockup-body { display: flex; }
.mockup-canvas { flex: 1; background: #fff; min-height: 120px; background-image: linear-gradient(rgba(0,0,0,.04) 1px,transparent 1px),linear-gradient(90deg,rgba(0,0,0,.04) 1px,transparent 1px); background-size: 12px 12px; position: relative; }
@media(max-width:800px){ .detail-step { grid-template-columns: 1fr; } .detail-step.reverse { direction: ltr; } }

/* ═══ BLOG / POSTS ══════════════════════════════════════════ */
.posts-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 28px; }
.post-card { background: var(--bg); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow); transition: transform .3s, box-shadow .3s; }
.post-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.post-thumb { aspect-ratio: 16/9; overflow: hidden; }
.post-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.post-card:hover .post-thumb img { transform: scale(1.05); }
.post-body { padding: 22px; }
.post-meta { font-size: .75rem; color: var(--text-muted); margin-bottom: 8px; display: flex; gap: 10px; flex-wrap: wrap; }
.post-cat { background: var(--red); color: #fff; border-radius: 100px; padding: 2px 10px; font-size: .68rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; text-decoration: none; }
.post-card h3 { font-family: var(--font-body); font-weight: 700; font-size: 1rem; line-height: 1.4; margin-bottom: 8px; }
.post-card h3 a { color: var(--text); }
.post-card h3 a:hover { color: var(--red); }
.post-excerpt { font-size: .88rem; color: var(--text-muted); }
@media(max-width:900px){ .posts-grid { grid-template-columns: repeat(2,1fr); } }
@media(max-width:540px){ .posts-grid { grid-template-columns: 1fr; } }

/* ═══ UTILITIES ═════════════════════════════════════════════ */
.text-center { text-align: center; }
.text-muted   { color: var(--text-muted); }
.mt-md { margin-top: 40px; }
.alert-box { padding: 14px 20px; border-left: 4px solid var(--orange); background: #fff8ec; border-radius: 0 var(--r) var(--r) 0; font-size: .9rem; color: #7a4800; }
.fade-in { opacity: 0; transform: translateY(20px); transition: opacity .6s ease, transform .6s ease; }
.fade-in.visible { opacity: 1; transform: none; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(1px,1px,1px,1px); }
.alignleft  { float: left; margin: 0 20px 12px 0; }
.alignright { float: right; margin: 0 0 12px 20px; }
.aligncenter { margin: 0 auto; text-align: center; }
.pagination { display: flex; justify-content: center; gap: 6px; margin: 48px 0; }
.page-numbers { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: var(--r); font-weight: 600; color: var(--text); border: 1px solid var(--border); text-decoration: none; transition: all .2s; }
.page-numbers.current, .page-numbers:hover { background: var(--red); color: #fff; border-color: var(--red); }

/* ── Canvas mockup: clickable link with hover overlay ───────────────── */
a.hero-canvas { transition: transform .3s, box-shadow .3s; }
a.hero-canvas:hover { transform: translateY(-4px); box-shadow: 0 16px 48px rgba(224,41,39,.25); }
.canvas-hover-cta {
  position: absolute; inset: 0; top: 36px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(224,41,39,.0);
  transition: background .3s;
  z-index: 3;
}
.canvas-hover-cta span {
  background: var(--red); color: #fff;
  padding: 10px 24px; border-radius: 100px;
  font-weight: 700; font-size: .95rem;
  opacity: 0; transform: translateY(8px);
  transition: opacity .3s, transform .3s;
}
a.hero-canvas:hover .canvas-hover-cta { background: rgba(224,41,39,.08); }
a.hero-canvas:hover .canvas-hover-cta span { opacity: 1; transform: translateY(0); }
