/*
Theme Name:   flyerpilot Magazin
Theme URI:    https://www.flyerpilot.de
Description:  Custom Child Theme für das flyerpilot Magazin, basierend auf Astra
Author:       flyerpilot / Print Group GmbH & Co. KG
Author URI:   https://www.flyerpilot.de
Template:     astra
Version:      1.0.0
License:      GNU General Public License v2 or later
License URI:  http://www.gnu.org/licenses/gpl-2.0.html
Text Domain:  flyerpilot-magazin
*/

/* CSS-Variablen */
:root {
  --fp-accent: #c90610;
  --fp-text: #1e1e1e;
  --fp-muted: #6b7280;
  --fp-bg: #ffffff;
  --fp-bg-soft: #f7f7f8;
  --fp-border: #e5e7eb;
  --fp-shadow: 0 4px 24px rgba(0,0,0,.07);
  --fp-max: 1400px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: var(--fp-text);
  background: var(--fp-bg);
  line-height: 1.5;
  font-size: 17px;
}

a {
  color: inherit;
  text-decoration: none;
}

.wrap {
  max-width: var(--fp-max);
  margin: 0 auto;
  padding: 0 48px;
}

/* HEADER */
.mag-header {
  background: #fff;
  border-bottom: 1px solid var(--fp-border);
  position: sticky;
  top: 0;
  z-index: 50;
}

.mag-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 48px;
  max-width: var(--fp-max);
  margin: 0 auto;
}

.mag-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mag-logo img {
  height: 40px;
  display: block;
}

.mag-logo-tag {
  font-size: 13px;
  font-weight: 700;
  color: var(--fp-accent);
  background: #fdecea;
  padding: 4px 12px;
  border-radius: 5px;
  letter-spacing: 0.3px;
}

.mag-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mag-search {
  padding: 10px 18px;
  border: 1px solid var(--fp-border);
  border-radius: 9px;
  font-size: 15px;
  width: 220px;
  outline: none;
}

.mag-search:focus {
  border-color: var(--fp-accent);
}

.btn-shop {
  background: var(--fp-accent);
  color: #fff;
  padding: 10px 26px;
  border-radius: 9px;
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
}

/* HERO */
.mag-hero {
  background: var(--fp-bg-soft);
  padding: 72px 0;
  border-bottom: 1px solid var(--fp-border);
}

.mag-hero-grid {
  display: grid;
  grid-template-columns: 1fr 520px;
  gap: 72px;
  align-items: center;
}

.mag-kicker {
  font-size: 13px;
  font-weight: 700;
  color: var(--fp-accent);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 16px;
}

.mag-hero h1 {
  font-size: 48px;
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 20px;
}

.mag-hero p {
  font-size: 18px;
  color: var(--fp-muted);
  line-height: 1.75;
  margin-bottom: 32px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  padding: 15px 32px;
  border-radius: 11px;
  font-weight: 600;
  font-size: 16px;
  background: var(--fp-accent);
  color: #fff;
}

.hero-img {
  background: linear-gradient(135deg, #e8e9ef, #d8d9e5);
  border-radius: 16px;
  height: 360px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--fp-border);
  font-size: 14px;
  color: var(--fp-muted);
  overflow: hidden;
  position: relative;
}

.hero-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 16px;
}

/* KATEGORIEN KACHELN */
.mag-cats {
  background: #fff;
  padding: 40px 0;
  border-bottom: 1px solid var(--fp-border);
}

.cats-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--fp-muted);
  margin-bottom: 18px;
}

.cats-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
}

.cat-tile {
  border: 1.5px solid var(--fp-border);
  border-radius: 13px;
  padding: 22px 18px;
  cursor: pointer;
  transition: border-color .2s, box-shadow .2s, background .2s;
  display: block;
}

.cat-tile:hover {
  border-color: var(--fp-accent);
  box-shadow: 0 4px 20px rgba(201, 6, 16, .1);
}

.cat-tile.active {
  border-color: var(--fp-accent);
  background: #fdecea;
}

.cat-count {
  font-size: 12px;
  color: var(--fp-muted);
  margin-bottom: 6px;
}

.cat-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--fp-text);
  margin-bottom: 8px;
}

.cat-sub {
  font-size: 12px;
  color: var(--fp-muted);
  line-height: 1.55;
}

.cat-tile.active .cat-name {
  color: var(--fp-accent);
}

/* FILTER BAR */
.filter-bar {
  background: var(--fp-bg-soft);
  border-bottom: 1px solid var(--fp-border);
  padding: 14px 48px;
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: 100%;
}

.filter-bar-label {
  font-size: 14px;
  color: var(--fp-muted);
  font-weight: 600;
  white-space: nowrap;
}

.filter-active {
  font-size: 15px;
  font-weight: 700;
  color: var(--fp-accent);
}

/* ARTIKEL SEKTIONEN */
.articles-section {
  padding: 56px 0;
  min-height: 400px;
}

.articles-section.soft {
  background: var(--fp-bg-soft);
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  border-bottom: 2px solid var(--fp-accent);
  padding-bottom: 14px;
  margin-bottom: 32px;
}

.section-head h2 {
  font-size: 26px;
  font-weight: 700;
}

.section-head h2 em {
  color: var(--fp-accent);
  font-style: normal;
}

.section-head a {
  font-size: 14px;
  color: var(--fp-accent);
  font-weight: 600;
}

.grid-main {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 24px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.grid-all {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}

/* CARDS */
.card {
    background: #fff;
    border: 1px solid var(--fp-border);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--fp-shadow);
    transition: transform .22s, box-shadow .22s, border-color .22s;
    cursor: pointer
}

.card:hover {
    transform: translateY(-6px) scale(1.01);
    box-shadow: 0 16px 36px rgba(201, 6, 16, .14);
    border-color: var(--fp-accent)
}

.card.planned {
    border: 2px dashed var(--fp-border);
    box-shadow: none;
    background: var(--fp-bg-soft)
}

.card.planned:hover {
    transform: none;
    box-shadow: none
}

.card-img {
    background: linear-gradient(135deg, #f0f1f5, #e5e6ec);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: #9ca3af;
    overflow: hidden;
}

.card.planned .card-img {
    background: #f4f4f6
}

.h260 {
    height: 260px
}

.h200 {
    height: 200px
}

.h170 {
    height: 170px
}

.h150 {
    height: 150px
}

.card-body {
    padding: 22px
}

.card-body.sm {
    padding: 16px
}

.badge {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 11px;
    border-radius: 20px;
    margin-bottom: 12px
}

.b-red {
    background: #fdecea;
    color: #a30000
}

.b-blue {
    background: #e6f0fb;
    color: #0c447c
}

.b-green {
    background: #eaf3de;
    color: #27500a
}

.b-amber {
    background: #fdf0e0;
    color: #7c3a00
}

.b-purple {
    background: #f3f0fe;
    color: #3c3489
}

.card-title {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 10px;
    color: var(--fp-text)
}

.card-title.sm {
    font-size: 15px;
    margin-bottom: 8px
}

.card-text {
    font-size: 14px;
    color: var(--fp-muted);
    line-height: 1.65;
    margin-bottom: 12px
}

.card-meta {
    font-size: 12px;
    color: #9ca3af
}

/* CTA */
.cta {
  background: #0f172a;
  padding: 56px 0;
}

.cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 48px;
}

.cta h2 {
  font-size: 28px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 10px;
}

.cta p {
  font-size: 16px;
  color: #94a3b8;
}

.btn-white {
  background: #fff;
  color: var(--fp-accent);
  padding: 15px 36px;
  border-radius: 11px;
  font-weight: 700;
  font-size: 16px;
  white-space: nowrap;
}

/* FOOTER */
.mag-footer {
  background: #0f172a;
  color: #e5e7eb;
  padding: 48px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 32px;
}

.footer-grid h4 {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 12px;
}

.footer-grid p {
  font-size: 14px;
  line-height: 1.75;
  color: #94a3b8;
}

.footer-grid nav a {
  display: block;
  font-size: 14px;
  color: #94a3b8;
  margin-bottom: 8px;
}

.footer-grid nav a:hover {
  color: #fff;
}

.footbar {
  border-top: 1px solid rgba(255, 255, 255, .1);
  padding: 18px 0;
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: #64748b;
}

/* ARTICLE CONTENT */
.article-body h2 {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.3;
  margin-top: 48px;
  margin-bottom: 20px;
  color: var(--fp-text);
}

.article-body h3 {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.4;
  margin-top: 36px;
  margin-bottom: 16px;
  color: var(--fp-text);
}

.article-body h4 {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.4;
  margin-top: 28px;
  margin-bottom: 12px;
  color: var(--fp-text);
}

.article-body p {
  margin-bottom: 20px;
}

.article-body ul,
.article-body ol {
  margin-bottom: 24px;
  padding-left: 28px;
}

.article-body li {
  margin-bottom: 8px;
  line-height: 1.8;
}

.article-body a {
  color: var(--fp-accent);
  text-decoration: underline;
}

.article-body a:hover {
  text-decoration: none;
}

.article-body img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 32px 0;
  display: block;
}

.article-body blockquote {
  border-left: 4px solid var(--fp-accent);
  padding-left: 24px;
  margin: 32px 0;
  font-style: italic;
  color: var(--fp-muted);
}

.article-body code {
  background: var(--fp-bg-soft);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
  font-family: monospace;
}

.article-body pre {
  background: var(--fp-bg-soft);
  padding: 20px;
  border-radius: 8px;
  overflow-x: auto;
  margin: 24px 0;
}

.article-body pre code {
  background: none;
  padding: 0;
}

/* PAGINATION */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 48px;
}

.page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--fp-border);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--fp-text);
  text-decoration: none;
  transition: all 0.2s;
}

.page-numbers:hover {
  border-color: var(--fp-accent);
  color: var(--fp-accent);
  background: #fdecea;
}

.page-numbers.current {
  background: var(--fp-accent);
  color: #fff;
  border-color: var(--fp-accent);
}

.page-numbers.dots {
  border: none;
  pointer-events: none;
  color: var(--fp-muted);
}

.page-numbers.prev,
.page-numbers.next {
  font-size: 15px;
}

/* FILTER VIEWS */
.view {
  display: none;
}

.view.visible {
  display: block;
}

/* RESPONSIVE */
@media (max-width: 1100px) {
  .mag-hero-grid { grid-template-columns: 1fr 400px; gap: 48px; }
  .mag-hero h1 { font-size: 38px; }
  .cats-grid { grid-template-columns: repeat(3, 1fr); }
  .grid-4, .grid-all { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 900px) {
  .wrap { padding: 0 16px; max-width: 100%; }
  .mag-header-inner { padding: 12px 16px; }
  .filter-bar { padding: 12px 16px; }
  .mag-hero { padding: 40px 0; }
  .mag-hero-grid { grid-template-columns: 1fr; gap: 24px; }
  .hero-img { display: none; }
  .mag-hero h1 { font-size: 26px; }
  .mag-hero p { font-size: 16px; }
  .cats-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .cat-tile { padding: 16px 14px; }
  .grid-main, .grid-4, .grid-3 { grid-template-columns: 1fr; }
  .grid-all { grid-template-columns: repeat(2, 1fr); }
  .articles-section { padding: 32px 0; }
  .cta-inner { flex-direction: column; gap: 20px; text-align: center; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .mag-search { width: 130px; }
  .footbar { flex-direction: column; gap: 6px; text-align: center; }
}

@media (max-width: 600px) {
  .grid-all { grid-template-columns: 1fr; }
  .cats-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .mag-search { display: none; }
  .mag-logo img { height: 36px; }
}