/* ================================================================
   THE GREEN IDEA — main.css v1.0
   Child Theme CSS — Öko-Scandi-Editorial
   ================================================================ */

:root {
  --forest:       #2D4A3E;
  --forest-light: #3D6455;
  --sage:         #7A9E7E;
  --sage-light:   #B8D4A8;
  --cream:        #F8F6F0;
  --cream-dark:   #EDE7DC;
  --sand:         #D4C5A9;
  --sand-light:   #E8DFD0;
  --text:         #1A1A18;
  --muted:        #4A4A45;
  --light-text:   #4A4A45;
  --kicker:       #2D5A42;
  --accent:       #8B4A1A;
  --white:        #FFFFFF;

  --serif:  'Playfair Display', Georgia, serif;
  --sans:   'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --radius: 2px;
  --max-w:  1200px;
  --pad-x:  clamp(1.25rem, 4vw, 4rem);
}

/* ================================================================
   GLOBAL BODY FONT
   ================================================================ */

html, body {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif !important;
}

/* ================================================================
   HEADER
   ================================================================ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: #FFFFFF;
  box-shadow: 0 1px 0 #D4C5A9;
  height: 68px;
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  height: 100%;
  padding: 0 clamp(1.25rem, 4vw, 4rem);
  gap: 1.5rem;
}

.nav-logo {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  text-decoration: none;
}

.nav-logo img {
  display: block;
  height: 36px;
  width: auto;
}

/* ================================================================
   NAV LINKS
   ================================================================ */

.nav-links {
  flex: 1;
  display: flex;
  justify-content: center;
}

.nav-links ul {
  display: flex;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 0;
}

.nav-links li {
  position: relative;
}

.nav-links a {
  display: block;
  padding: 0.5rem 0.65rem;
  font-family: 'DM Sans', -apple-system, sans-serif;
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #4A4A45;
  text-decoration: none;
  transition: color 0.2s;
  white-space: nowrap;
}

.nav-links a:hover,
.nav-links a:focus {
  color: #2D4A3E;
}

/* ================================================================
   MEGA-MENU
   ================================================================ */

.mega-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  min-width: 620px;
  background: #F8F6F0;
  border-top: 2px solid #2D4A3E;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
  padding: 2rem clamp(1.25rem, 4vw, 4rem);
  z-index: 300;
}

/* Full-width Megamenü für "Magazin" */
.nav-links li.has-mega:first-child .mega-menu {
  position: fixed;
  top: 68px;
  left: 0;
  right: 0;
  transform: none;
  min-width: unset;
  width: 100%;
}

.has-mega:hover .mega-menu,
.has-mega:focus-within .mega-menu {
  display: block;
}

.mega-menu__cats {
  display: flex;
  gap: 0;
  max-width: 1200px;
  margin: 0 auto;
}

.mega-menu__cats a {
  font-family: 'DM Sans', -apple-system, sans-serif;
  font-size: 0.82rem;
  color: #4A4A45;
  text-decoration: none;
  padding: 0.35rem 0.5rem;
  border-radius: 2px;
  transition: color 0.2s, background 0.2s;
}

.mega-menu__cats a:hover {
  color: #2D4A3E;
  background: rgba(45, 74, 62, 0.06);
}

.mega-menu__cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.mega-card {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1rem 1.25rem;
  background: #FFFFFF;
  border: 1px solid #D4C5A9;
  border-radius: 4px;
  text-decoration: none;
  color: #1A1A18;
  transition: border-color 0.2s, box-shadow 0.2s;
  min-width: 0;
  word-break: break-word;
}

.mega-card:hover {
  border-color: #2D4A3E;
  box-shadow: 0 2px 8px rgba(45, 74, 62, 0.1);
}

.mega-card strong {
  display: block;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 0.95rem;
  color: #2D4A3E;
}

.mega-card span {
  display: block;
  font-family: 'DM Sans', -apple-system, sans-serif;
  font-size: 0.75rem;
  color: #4A4A45;
}

/* ================================================================
   NAV ACTIONS (Suche + CTA + Hamburger)
   ================================================================ */

.nav-actions {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nav-search-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.35rem;
  color: #4A4A45;
  display: flex;
  align-items: center;
  transition: color 0.2s;
}

.nav-search-btn:hover {
  color: #2D4A3E;
}

.nav-cta {
  background: #7A9E7E;
  color: #FFFFFF;
  font-family: 'DM Sans', -apple-system, sans-serif;
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.5rem 1.25rem;
  border-radius: 4px;
  text-decoration: none;
  transition: background 0.2s;
  white-space: nowrap;
}

.nav-cta:hover,
.nav-cta:focus {
  background: #2D4A3E;
  color: #FFFFFF;
}

/* ================================================================
   HAMBURGER
   ================================================================ */

.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.35rem;
  width: 36px;
  height: 36px;
}

.nav-hamburger span {
  display: block;
  height: 2px;
  background: #2D4A3E;
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.nav-hamburger.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-hamburger.active span:nth-child(2) {
  opacity: 0;
}
.nav-hamburger.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ================================================================
   MOBILE NAV
   ================================================================ */

.nav-mobile {
  display: none;
  position: fixed;
  top: 68px;
  left: 0;
  right: 0;
  bottom: 0;
  background: #F8F6F0;
  z-index: 199;
  overflow-y: auto;
  padding: 2rem clamp(1.25rem, 4vw, 4rem);
}

.nav-mobile.open {
  display: flex;
  flex-direction: column;
}

.nav-mobile ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.nav-mobile a {
  display: block;
  padding: 0.85rem 0;
  font-family: 'DM Sans', -apple-system, sans-serif;
  font-size: 1rem;
  font-weight: 500;
  color: #1A1A18;
  text-decoration: none;
  border-bottom: 1px solid #D4C5A9;
  transition: color 0.2s;
}

.nav-mobile a:hover {
  color: #2D4A3E;
}

.nav-cta--mobile {
  margin-top: 1.5rem;
  text-align: center;
  border-bottom: none !important;
  border-radius: 4px;
}

/* ================================================================
   FOOTER
   ================================================================ */

.site-footer {
  background: #2D4A3E;
  color: #F8F6F0;
  padding:
    clamp(3rem, 6vw, 5rem)
    clamp(1.25rem, 4vw, 4rem)
    clamp(1.5rem, 3vw, 2.5rem);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  max-width: 1200px;
  margin: 0 auto;
}

.footer-brand img {
  display: block;
  margin-bottom: 1rem;
  height: 32px;
  width: auto;
}

.footer-tagline {
  font-family: 'DM Sans', -apple-system, sans-serif;
  font-size: 0.82rem;
  color: rgba(248, 246, 240, 0.75);
  line-height: 1.6;
  margin: 0 0 1.25rem;
}

.footer-social {
  display: flex;
  gap: 0.75rem;
}

.footer-social a {
  display: flex;
  align-items: center;
  color: rgba(248, 246, 240, 0.75);
  transition: color 0.2s;
}

.footer-social a:hover {
  color: #F8F6F0;
}

.footer-col h5 {
  font-family: 'DM Sans', -apple-system, sans-serif;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #F8F6F0;
  margin: 0 0 1.25rem;
}

.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-links a {
  font-family: 'DM Sans', -apple-system, sans-serif;
  font-size: 0.82rem;
  color: rgba(248, 246, 240, 0.75);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: #F8F6F0;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: clamp(2rem, 4vw, 3rem);
  padding-top: 1.5rem;
}

.footer-bottom__inner {
  max-width: 1200px;
  margin: 0 auto;
}

.footer-bottom p {
  font-family: 'DM Sans', -apple-system, sans-serif;
  font-size: 0.72rem;
  color: rgba(248, 246, 240, 0.5);
  margin: 0;
}

/* ================================================================
   RESPONSIVE
   ================================================================ */

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

  .footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 960px) {
  /* Header */
  .site-header {
    height: 56px;
  }

  .nav-mobile {
    top: 56px;
  }

  /* Nav */
  .nav-links {
    display: none;
  }

  .nav-hamburger {
    display: flex;
    width: 44px;
    height: 44px;
    padding: 0;
    align-items: center;
    justify-content: center;
  }

  .nav-cta {
    display: none;
  }

  .nav-search-btn {
    display: none;
  }

  /* Mobile nav links: 48px minimum tap target */
  .nav-mobile a {
    padding: 0.85rem 0;
    min-height: 48px;
    display: flex;
    align-items: center;
    font-size: 1rem;
  }

  /* Mobile accordion: Magazin sub-list */
  .nav-mobile-accordion {
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.3s ease;
  }

  .nav-mobile-accordion.open {
    max-height: 2000px;
  }

  .nav-mobile-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0.85rem 0;
    min-height: 48px;
    background: none;
    border: none;
    border-bottom: 1px solid #D4C5A9;
    font-family: 'DM Sans', -apple-system, sans-serif;
    font-size: 1rem;
    font-weight: 500;
    color: #1A1A18;
    cursor: pointer;
    text-align: left;
  }

  .nav-mobile-toggle svg {
    flex-shrink: 0;
    transition: transform 0.25s ease;
  }

  .nav-mobile-toggle[aria-expanded="true"] svg {
    transform: rotate(180deg);
  }

  .nav-mobile-sub {
    list-style: none;
    margin: 0;
    padding: 0.25rem 0 0.25rem 1rem;
    background: rgba(45, 74, 62, 0.04);
    border-bottom: 1px solid #D4C5A9;
  }

  .nav-mobile-sub a {
    font-size: 0.9rem;
    color: #4A4A45;
    min-height: 44px;
    padding: 0.6rem 0;
    border-bottom: none;
  }

  .nav-mobile-sub a:hover {
    color: #2D4A3E;
  }

  /* Divider before legal links */
  .nav-mobile-divider {
    height: 1px;
    background: #D4C5A9;
    margin: 1.5rem 0 0.5rem;
  }

  .nav-mobile-legal a {
    font-size: 0.82rem;
    color: #4A4A45;
    min-height: 44px;
    padding: 0.6rem 0;
    border-bottom: 1px solid rgba(212, 197, 169, 0.5);
  }
}

@media (max-width: 600px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .footer-brand {
    grid-column: auto;
  }
}

/* ===== TGI ARTIKEL-KOMPONENTEN ===== */

/* Tabellen */
.entry-content .tgi-tabelle { overflow-x: auto; margin: 2rem 0; }
.entry-content .tgi-tabelle table { width: 100%; border-collapse: collapse; }
.entry-content .tgi-tabelle thead tr { background: var(--forest-green, #2D4A3E); color: white; }
.entry-content .tgi-tabelle th,
.entry-content .tgi-tabelle td { padding: 0.75rem 1rem; text-align: left; border-bottom: 1px solid #e5e5e5; }
.entry-content .tgi-tabelle tbody tr:nth-child(even) { background: #f8f5f0; }
.entry-content .tgi-tabelle-quelle { font-size: 0.8rem; color: #666; margin-top: 0.5rem; }

/* Tool-Cards Grid */
.entry-content .tgi-tools-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 2rem 0; }
.entry-content .tgi-tools-grid a { display: flex; flex-direction: column; padding: 1.25rem; border: 1px solid #e5e5e5; border-radius: 8px; text-decoration: none; color: inherit; transition: border-color 0.2s; }
.entry-content .tgi-tools-grid a:hover { border-color: var(--forest-green, #2D4A3E); }
.entry-content .tgi-tools-grid .tool-label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.1em; color: #666; margin-bottom: 0.5rem; }
.entry-content .tgi-tools-grid .tool-title { font-weight: 600; font-size: 1.1rem; margin-bottom: 0.5rem; }
.entry-content .tgi-tools-grid .tool-desc { font-size: 0.875rem; color: #555; }
@media (max-width: 600px) { .entry-content .tgi-tools-grid { grid-template-columns: 1fr; } }

/* ===== TGI BATCH-v8: Artikel-Fixes ===== */

/* Heading → Textabstand */
.entry-content h1,
.entry-content h2,
.entry-content h3 {
  margin-bottom: 1.25rem !important;
  margin-top: 2rem !important;
}
.entry-content h1:first-child,
.entry-content h2:first-child {
  margin-top: 0 !important;
}

/* Tabelle — erhöhte Spezifität gegen Kadence */
body .entry-content .tgi-tabelle {
  overflow-x: auto;
  margin: 2rem 0;
}
body .entry-content .tgi-tabelle table {
  width: 100%;
  border-collapse: collapse;
}
body .entry-content .tgi-tabelle thead tr {
  background: #2D4A3E !important;
  color: #ffffff !important;
}
body .entry-content .tgi-tabelle th {
  padding: 0.75rem 1rem !important;
  text-align: left !important;
  color: #ffffff !important;
  font-weight: 600 !important;
  border-bottom: none !important;
}
body .entry-content .tgi-tabelle td {
  padding: 0.75rem 1rem !important;
  text-align: left !important;
  border-bottom: 1px solid #e5e5e5 !important;
}
body .entry-content .tgi-tabelle tbody tr:nth-child(even) {
  background: #f8f5f0 !important;
}
.tgi-tabelle-quelle {
  font-size: 0.8rem;
  color: #666;
  margin-top: 0.5rem;
}

/* Tool-Cards Grid — erhöhte Spezifität */
body .entry-content .tgi-tools-grid {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 1rem !important;
  margin: 2rem 0 !important;
}
body .entry-content .tgi-tools-grid a {
  display: flex !important;
  flex-direction: column !important;
  padding: 1.25rem !important;
  border: 1px solid #e5e5e5 !important;
  border-radius: 8px !important;
  text-decoration: none !important;
  color: inherit !important;
  transition: border-color 0.2s !important;
}
body .entry-content .tgi-tools-grid a:hover {
  border-color: #2D4A3E !important;
}
body .entry-content .tgi-tools-grid .tool-label {
  display: block !important;
  font-size: 0.7rem !important;
  text-transform: uppercase !important;
  letter-spacing: 0.1em !important;
  color: #666 !important;
  margin-bottom: 0.5rem !important;
}
body .entry-content .tgi-tools-grid .tool-title {
  display: block !important;
  font-weight: 600 !important;
  font-size: 1.1rem !important;
  margin-bottom: 0.5rem !important;
}
body .entry-content .tgi-tools-grid .tool-desc {
  display: block !important;
  font-size: 0.875rem !important;
  color: #555 !important;
}
@media (max-width: 600px) {
  body .entry-content .tgi-tools-grid {
    grid-template-columns: 1fr !important;
  }
}

/* ================================================
   TGI Artikel-Farbblöcke — GEO/KI-Suche Optimierung
   ================================================ */

/* Direktantwort-Box */
.tgi-direktantwort {
  background: #f0f7f0;
  border-left: 4px solid #8BAF7C;
  border-radius: 0 8px 8px 0;
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0 2rem;
  font-size: 1rem;
  line-height: 1.6;
}

/* Infobox — "Das Wichtigste auf einen Blick" */
.tgi-infobox {
  background: #f5f9f5;
  border: 1px solid #8BAF7C;
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
  margin: 2rem 0;
}
.tgi-infobox ul {
  margin: 0;
  padding-left: 1.25rem;
}
.tgi-infobox li {
  margin-bottom: 0.5rem;
  line-height: 1.6;
  font-size: 0.95rem;
}

/* Kurzantwort-Block nach H2 */
.tgi-kurzantwort {
  background: #eef5ee;
  border-left: 3px solid #2D4A3E;
  border-radius: 0 6px 6px 0;
  padding: 0.875rem 1.25rem;
  margin: 0.75rem 0 1.25rem;
  font-size: 0.95rem;
  line-height: 1.6;
  color: #2D4A3E;
}
.tgi-kurzantwort strong {
  color: #2D4A3E;
  font-weight: 700;
}

/* Fazit-Box */
.tgi-fazit {
  background: #2D4A3E;
  color: #F7F3ED;
  border-radius: 10px;
  padding: 1.5rem 1.75rem;
  margin: 2.5rem 0 1rem;
}
.tgi-fazit p {
  color: #F7F3ED !important;
  margin: 0;
  font-size: 1rem;
  line-height: 1.7;
}

/* CTA-Box */
.tgi-cta {
  background: #f0f7f0;
  border: 1px solid #8BAF7C;
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
  margin: 1rem 0 2rem;
}
.tgi-cta p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.6;
  color: #2D4A3E !important;
  font-weight: 500;
}

/* FAQ Akkordeon — details/summary */
.tgi-faq {
  margin: 2.5rem 0;
}
.tgi-faq h3 {
  font-size: 1.2rem;
  color: #2D4A3E;
  margin-bottom: 1rem;
}
.tgi-faq details {
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  margin-bottom: 0.5rem;
  overflow: hidden;
  transition: box-shadow 0.2s;
}
.tgi-faq details:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
}
.tgi-faq details[open] {
  border-color: #8BAF7C;
}
.tgi-faq summary {
  padding: 1rem 1.25rem;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
  color: #2D4A3E;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fafafa;
  user-select: none;
}
.tgi-faq summary::-webkit-details-marker { display: none; }
.tgi-faq summary::after {
  content: '+';
  font-size: 1.25rem;
  color: #8BAF7C;
  font-weight: 400;
  transition: transform 0.2s;
  flex-shrink: 0;
  margin-left: 1rem;
}
.tgi-faq details[open] summary::after {
  content: '−';
}
.tgi-faq details > p,
.tgi-faq details > div {
  padding: 0.875rem 1.25rem 1rem;
  font-size: 0.9rem;
  line-height: 1.65;
  color: #444;
  border-top: 1px solid #e5e5e5;
  margin: 0;
}

/* Quellenbox */
.tgi-quellen {
  background: #fafafa;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  margin: 2rem 0;
  font-size: 0.85rem;
}
.tgi-quellen h3 {
  font-size: 0.9rem;
  color: #2D4A3E;
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.tgi-quellen ul {
  margin: 0;
  padding-left: 1.25rem;
}
.tgi-quellen li {
  margin-bottom: 0.4rem;
  color: #555;
  line-height: 1.5;
}
.tgi-quellen-hinweis {
  margin-top: 0.75rem;
  color: #888;
  font-size: 0.8rem;
}
