/*
Theme Name: Gesundheit Custom
Theme URI: https://gesundheitmagazin.stg-jdkruegerco-staging.kinsta.cloud
Author: JDKRUEGER&CO
Author URI: https://jdk.de
Description: Custom Magazin-Theme für Gesundheitmagazin — GEO-optimiert, Magazine-Look, Advertorial-ready.
Version: 2.0.0
License: GPL-2.0-or-later
Text Domain: gesundheit-custom
Tags: custom-theme, magazine, seo, health, responsive, geo
*/

/* ========================================
   GOOGLE FONTS — Serif für Headlines
   ======================================== */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&family=Source+Sans+3:wght@300;400;600;700&display=swap');

/* ========================================
   DESIGN SYSTEM
   ======================================== */
:root {
  /* Primary — Logo Green */
  --primary:        #2d7a3e;
  --primary-dark:   #1e5a2a;
  --primary-light:  #4CAF50;
  --primary-pale:   #e8f5e9;

  /* Neutral */
  --bg:             #fafaf8;
  --bg-warm:        #f5f3ef;
  --card:           #ffffff;
  --text:           #1a1a1a;
  --text-secondary: #555;
  --text-muted:     #888;
  --border:         #e8e6e1;
  --border-light:   #f0eeea;

  /* Category Colors (pastel chips) */
  --cat-gesundheit:       #2d7a3e;
  --cat-ernaehrung:       #c75c1a;
  --cat-bewegung:         #1565c0;
  --cat-mentale:          #7b1fa2;
  --cat-schlaf:           #00695c;
  --cat-praevention:      #c62828;
  --cat-longevity:        #5d4037;
  --cat-chronobiologie:   #455a64;
  --cat-pflanzen:         #33691e;
  --cat-holistisch:       #ad1457;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.06);
  --shadow-lg: 0 12px 32px rgba(0,0,0,0.10);

  /* Radius & Transitions */
  --radius:     8px;
  --radius-sm:  4px;
  --transition: 0.2s ease;

  /* Typography Scale */
  --font-serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-sans:  'Source Sans 3', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ========================================
   RESET & BASE
   ======================================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary-dark); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--primary); }
ul, ol { padding-left: 1.5rem; }
li { margin-bottom: 0.4rem; }
::selection { background: var(--primary-pale); color: var(--text); }

/* ========================================
   LAYOUT
   ======================================== */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}
.container-narrow {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ========================================
   HEADER — Sticky with Backdrop Blur
   ======================================== */
.site-header {
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  transition: box-shadow var(--transition);
}
.site-header.scrolled {
  box-shadow: 0 1px 8px rgba(0,0,0,0.06);
}
.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: 1.5rem;
}
.site-branding {
  flex-shrink: 0;
}
.site-branding img {
  height: 38px;
  width: auto;
  display: block;
}

/* Navigation */
.main-nav ul {
  display: flex;
  list-style: none;
  gap: 0.125rem;
  padding: 0;
}
.main-nav a {
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 0.5rem 0.875rem;
  border-radius: 100px;
  transition: all var(--transition);
  letter-spacing: 0.01em;
}
.main-nav a:hover {
  color: var(--primary);
  background: var(--primary-pale);
}
.main-nav .current-menu-item a,
.main-nav .current-category-ancestor a {
  color: var(--primary-dark);
  background: var(--primary-pale);
}

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  width: 40px;
  height: 40px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
}
.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 1px;
  transition: var(--transition);
}

/* ========================================
   BREADCRUMBS
   ======================================== */
.breadcrumb {
  padding: 1rem 0 0;
  font-size: 0.8125rem;
  color: var(--text-muted);
}
.breadcrumb a {
  color: var(--text-muted);
}
.breadcrumb a:hover {
  color: var(--primary);
}
.breadcrumb-sep {
  margin: 0 0.5rem;
  opacity: 0.5;
}

/* ========================================
   MAIN LAYOUT
   ======================================== */
.site-main {
  padding: 2rem 0 5rem;
  min-height: 60vh;
}

/* ========================================
   POST GRID (HOMEPAGE) — Magazine Layout
   ======================================== */
.post-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1.5rem;
}

/* Featured post = 2/3 width */
.post-grid .post-card:first-child {
  grid-column: 1 / 9;
  grid-row: 1 / 3;
  display: flex;
  flex-direction: column;
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-light);
}
.post-grid .post-card:first-child .post-card-image {
  aspect-ratio: 16 / 9;
  flex-shrink: 0;
}
.post-grid .post-card:first-child .post-card-body {
  padding: 1.75rem 2rem;
}
.post-grid .post-card:first-child .post-card-title {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 700;
  line-height: 1.15;
}
.post-grid .post-card:first-child .post-card-excerpt {
  font-size: 1.0625rem;
  -webkit-line-clamp: 3;
}

/* Regular cards */
.post-card {
  grid-column: span 4;
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
  transition: transform var(--transition), box-shadow var(--transition);
  display: flex;
  flex-direction: column;
}
.post-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}
.post-card-image {
  aspect-ratio: 16 / 10;
  background: var(--bg-warm);
  overflow: hidden;
  position: relative;
}
.post-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.4,0,0.2,1);
}
.post-card:hover .post-card-image img { transform: scale(1.04); }
.post-card-image .fallback-gradient {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--primary-pale) 0%, var(--primary-light) 100%);
  opacity: 0.2;
}
.post-card-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}
.post-card-category {
  display: inline-block;
  width: fit-content;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.25rem 0.625rem;
  border-radius: 100px;
  margin-bottom: 0.625rem;
  color: #fff;
}
.post-card-title {
  font-family: var(--font-serif);
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 0.625rem;
  color: var(--text);
}
.post-card-title a { color: inherit; }
.post-card-title a:hover { color: var(--primary); }
.post-card-excerpt {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: auto;
}

/* ========================================
   SINGLE POST — Full-Width Hero
   ======================================== */
.single-hero {
  position: relative;
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  max-height: 70vh;
  min-height: 400px;
  overflow: hidden;
  background: var(--text);
}
.single-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.85;
}
.single-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0,0,0,0.75) 0%,
    rgba(0,0,0,0.3) 50%,
    rgba(0,0,0,0.1) 100%
  );
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 3rem 1.5rem;
}
.single-hero-inner {
  max-width: 1280px;
  margin: 0 auto;
  width: 100%;
  color: #fff;
}
.single-category {
  display: inline-block;
  width: fit-content;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.35rem 0.875rem;
  border-radius: 100px;
  color: #fff;
}
.single-hero .single-category {
  margin-bottom: 1rem;
}
.single-hero .single-title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.1;
  max-width: 800px;
  text-shadow: 0 2px 20px rgba(0,0,0,0.3);
}
.single-hero .advertorial-badge {
  display: inline-block;
  width: fit-content;
  background: linear-gradient(135deg, #F5A623, #E8941A);
  color: #fff;
  font-size: 0.6875rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0.35rem 0.875rem;
  border-radius: 100px;
  margin-bottom: 1rem;
}

/* Single content below hero */
.single-content-wrap {
  padding-top: 3rem;
}

/* Quick Answer Box */
.quick-answer {
  background: var(--bg-warm);
  border-left: 4px solid var(--primary);
  padding: 1.5rem 1.75rem;
  margin: 2rem 0 2.5rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 1.125rem;
  line-height: 1.7;
}
.quick-answer-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary);
  margin-bottom: 0.5rem;
  display: block;
}

/* Post Content */
.entry-content {
  font-size: 1.0625rem;
  line-height: 1.8;
  color: var(--text);
}
.entry-content h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.375rem, 2.5vw, 1.75rem);
  font-weight: 700;
  margin: 2.5rem 0 1rem;
  line-height: 1.25;
  color: var(--text);
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}
.entry-content h3 {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  margin: 2rem 0 0.75rem;
  color: var(--text-secondary);
}
.entry-content p { margin-bottom: 1.35rem; }
.entry-content ul, .entry-content ol { margin-bottom: 1.35rem; }
.entry-content li { margin-bottom: 0.5rem; }
.entry-content blockquote {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-style: italic;
  border-left: 4px solid var(--primary);
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  background: var(--bg-warm);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--text-secondary);
  line-height: 1.6;
}
.entry-content strong { font-weight: 700; color: var(--text); }
.entry-content a { border-bottom: 1px solid var(--primary-light); }
.entry-content a:hover { border-bottom-color: var(--primary); }

/* FAQ Section */
.faq-section {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 2px solid var(--border);
}
.faq-section h2 {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
}
.faq-item {
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-light);
}
.faq-item:last-child {
  border-bottom: none;
}
.faq-question {
  font-family: var(--font-serif);
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text);
}
.faq-answer {
  color: var(--text-secondary);
  line-height: 1.7;
}

/* Takeaway Box */
.takeaway-box {
  background: var(--primary-pale);
  border-radius: var(--radius);
  padding: 1.75rem 2rem;
  margin: 2.5rem 0;
}
.takeaway-box h3 {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  margin-bottom: 1rem;
  color: var(--primary-dark);
}
.takeaway-box ul {
  margin: 0;
  padding-left: 1.25rem;
}
.takeaway-box li {
  margin-bottom: 0.75rem;
  line-height: 1.6;
}

/* Sources */
.sources {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.875rem;
  color: var(--text-muted);
}
.sources h3 {
  font-family: var(--font-serif);
  font-size: 1rem;
  margin-bottom: 0.75rem;
  color: var(--text-secondary);
}
.sources ol {
  padding-left: 1.25rem;
}
.sources li {
  margin-bottom: 0.35rem;
}

/* Single featured image (fallback if no hero) */
.single-featured-image {
  margin-bottom: 2.5rem;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.single-featured-image img {
  width: 100%;
  height: auto;
}

/* ========================================
   ARCHIVE / CATEGORY
   ======================================== */
.archive-header {
  margin-bottom: 2.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 2px solid var(--primary);
}
.archive-title {
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 700;
  line-height: 1.15;
}
.archive-description {
  color: var(--text-secondary);
  margin-top: 0.625rem;
  font-size: 1.0625rem;
  line-height: 1.6;
}

/* ========================================
   RELATED POSTS
   ======================================== */
.related-posts {
  margin-top: 3.5rem;
  padding-top: 2.5rem;
  border-top: 2px solid var(--border);
}
.related-posts h3 {
  font-family: var(--font-serif);
  font-size: 1.375rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--text);
}

/* ========================================
   SIDEBAR
   ======================================== */
.widget-area .widget {
  background: var(--card);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.25rem;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
}
.widget-title {
  font-family: var(--font-serif);
  font-size: 1.0625rem;
  font-weight: 700;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--primary);
  color: var(--text);
}

/* ========================================
   PAGINATION
   ======================================== */
.pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 3rem;
}
.pagination a, .pagination span {
  padding: 0.625rem 1.125rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9375rem;
  transition: all var(--transition);
}
.pagination a {
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--border);
}
.pagination a:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  text-decoration: none;
}
.pagination .current {
  background: var(--primary);
  color: #fff;
}

/* ========================================
   FOOTER
   ======================================== */
.site-footer {
  background: var(--text);
  color: #999;
  padding: 3rem 0;
  font-size: 0.9375rem;
}
.site-footer a { color: #bbb; }
.site-footer a:hover { color: var(--primary-light); }
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.footer-nav ul {
  display: flex;
  list-style: none;
  gap: 1.5rem;
  padding: 0;
}
.footer-nav a { font-size: 0.875rem; }

/* ========================================
   ACCESSIBILITY
   ======================================== */
.skip-link {
  position: absolute;
  top: -50px;
  left: 0;
  background: var(--primary);
  color: #fff;
  padding: 0.625rem 1.25rem;
  z-index: 9999;
  font-weight: 600;
  border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { top: 0; }
.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 1024px) {
  .post-grid .post-card:first-child {
    grid-column: 1 / -1;
    grid-row: auto;
  }
  .post-card {
    grid-column: span 6;
  }
}

@media (max-width: 768px) {
  .menu-toggle { display: flex; }
  .main-nav {
    display: none;
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    background: var(--card);
    border-bottom: 1px solid var(--border);
    padding: 1rem;
    box-shadow: var(--shadow-md);
  }
  .main-nav.active { display: block; }
  .main-nav ul { flex-direction: column; gap: 0.25rem; }
  .main-nav a { padding: 0.625rem 1rem; border-radius: var(--radius); }

  .post-card {
    grid-column: 1 / -1;
  }
  .post-grid .post-card:first-child .post-card-title {
    font-size: 1.5rem;
  }
  .post-grid .post-card:first-child .post-card-image {
    aspect-ratio: 16 / 10;
  }

  .single-hero { min-height: 300px; }
  .single-hero .single-title { font-size: 1.75rem; }

  .single-title { font-size: 1.75rem; }
  .footer-inner { flex-direction: column; gap: 1rem; text-align: center; }
}
