/* ============================================
   RATGEBER — Article Styles
   Used by all /ratgeber/* pages
   ============================================ */

/* --- Article Layout --- */
.ratgeber-page {
  padding: 2rem 0 4rem;
}

.ratgeber-page .container {
  max-width: 800px;
}

.ratgeber-page h1 {
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1.2;
  color: var(--moss-deep);
  margin-bottom: 1rem;
}

.ratgeber-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--cream);
}

.ratgeber-meta time {
  font-weight: 500;
}

/* --- Article Content --- */
.ratgeber-content h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--moss-deep);
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  scroll-margin-top: calc(var(--header-h) + 1rem);
}

.ratgeber-content h3 {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text);
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.ratgeber-content p {
  font-size: 1rem;
  line-height: 1.75;
  margin-bottom: 1.25rem;
}

.ratgeber-content ul,
.ratgeber-content ol {
  margin-bottom: 1.25rem;
  padding-left: 1.5rem;
}

.ratgeber-content ul {
  list-style: disc;
}

.ratgeber-content ol {
  list-style: decimal;
}

.ratgeber-content li {
  margin-bottom: 0.5rem;
  line-height: 1.65;
}

.ratgeber-content a {
  color: var(--moss);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
}

.ratgeber-content a:hover {
  color: var(--moss-hover);
  text-decoration-thickness: 2px;
}

.ratgeber-content img {
  border-radius: var(--radius);
  margin: 1.5rem 0;
}

.ratgeber-content figure {
  margin: 2rem 0;
}

.ratgeber-content figcaption {
  font-size: 0.875rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: 0.5rem;
}

/* --- Tables --- */
.ratgeber-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.9375rem;
}

.ratgeber-content thead {
  background: var(--moss);
  color: var(--white);
}

.ratgeber-content th {
  padding: 0.75rem 1rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.875rem;
}

.ratgeber-content td {
  padding: 0.625rem 1rem;
  border-bottom: 1px solid var(--cream);
}

.ratgeber-content tbody tr:hover {
  background: var(--cream);
}

/* Responsive table wrapper */
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 1.5rem 0;
}

.table-wrap table {
  margin: 0;
  min-width: 500px;
}

/* ============================================
   TABLE OF CONTENTS (TOC)
   ============================================ */
.toc {
  background: var(--cream);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin-bottom: 2.5rem;
}

.toc__title {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.75rem;
}

.toc ol {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: toc;
}

.toc li {
  counter-increment: toc;
  margin-bottom: 0.375rem;
}

.toc li::before {
  content: counter(toc) ". ";
  font-weight: 600;
  color: var(--moss);
}

.toc a {
  color: var(--text);
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 500;
}

.toc a:hover {
  color: var(--moss);
}

/* Active TOC link */
.toc a.is-active {
  color: var(--moss);
  font-weight: 700;
}

/* ============================================
   INFO BOX (Tipp, Warnung, Gefahr, Info)
   ============================================ */
.info-box {
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
  border-left: 4px solid;
}

.info-box__title {
  font-size: 0.9375rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.info-box__text {
  font-size: 0.9375rem;
  line-height: 1.65;
}

.info-box__text p:last-child {
  margin-bottom: 0;
}

/* Variants */
.info-box--tip {
  background: #f0f7f0;
  border-color: var(--moss);
}

.info-box--tip .info-box__title {
  color: var(--moss);
}

.info-box--warning {
  background: #fff8f0;
  border-color: #e6a817;
}

.info-box--warning .info-box__title {
  color: #b8860b;
}

.info-box--danger {
  background: #fff0f0;
  border-color: #d32f2f;
}

.info-box--danger .info-box__title {
  color: #c62828;
}

.info-box--info {
  background: #f0f4ff;
  border-color: #1976d2;
}

.info-box--info .info-box__title {
  color: #1565c0;
}

/* ============================================
   FAQ ACCORDION (within articles)
   ============================================ */
.ratgeber-faq {
  margin: 2.5rem 0;
}

.ratgeber-faq h2 {
  text-align: left;
  margin-bottom: 1rem;
}

/* ============================================
   SHOP CTA
   ============================================ */
.shop-cta {
  background: var(--cream);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin: 2rem 0;
  text-align: center;
  border: 2px solid transparent;
  transition: border-color var(--transition);
}

.shop-cta:hover {
  border-color: var(--gold);
}

.shop-cta__text {
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 1rem;
}

.shop-cta .btn {
  display: inline-flex;
}

/* ============================================
   RATGEBER HUB (Teaser Grid)
   ============================================ */
.ratgeber-hub {
  padding: 3rem 0 4rem;
}

.ratgeber-hub h1 {
  text-align: center;
  color: var(--moss-deep);
  margin-bottom: 1rem;
}

.ratgeber-hub__intro {
  max-width: 700px;
  margin: 0 auto 2.5rem;
  text-align: center;
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--text);
}

.ratgeber-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.ratgeber-card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
  text-decoration: none;
  color: var(--text);
}

.ratgeber-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  color: var(--text);
}

.ratgeber-card__img {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--cream);
}

.ratgeber-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.ratgeber-card:hover .ratgeber-card__img img {
  transform: scale(1.05);
}

.ratgeber-card__body {
  padding: 1.25rem 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.ratgeber-card__tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--moss);
  margin-bottom: 0.5rem;
}

.ratgeber-card__body h2 {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--moss-deep);
  margin-bottom: 0.5rem;
  margin-top: 0;
}

.ratgeber-card__body p {
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.6;
  flex: 1;
}

.ratgeber-card__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--moss);
  margin-top: 0.75rem;
}

.ratgeber-card__cta::after {
  content: '\2192';
  transition: transform 0.2s ease;
}

.ratgeber-card:hover .ratgeber-card__cta::after {
  transform: translateX(4px);
}

/* ============================================
   MEDIA QUERIES
   ============================================ */

@media (min-width: 768px) {
  .ratgeber-page h1 {
    font-size: 2.25rem;
  }

  .ratgeber-content h2 {
    font-size: 1.75rem;
  }

  .ratgeber-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .shop-cta {
    padding: 2rem;
  }
}

@media (min-width: 1024px) {
  .ratgeber-page {
    padding: 3rem 0 5rem;
  }

  .ratgeber-page h1 {
    font-size: 2.5rem;
  }

  .ratgeber-hub {
    padding: 4rem 0 5rem;
  }

  .ratgeber-page .container {
    max-width: 1100px;
    display: grid;
    grid-template-columns: 250px 1fr;
    grid-template-rows: auto auto 1fr;
    gap: 0 2.5rem;
  }

  /* h1 and meta span full width */
  .ratgeber-page h1,
  .ratgeber-meta {
    grid-column: 1 / -1;
  }

  /* TOC in left column */
  .toc {
    grid-column: 1;
    grid-row: 3;
    position: sticky;
    top: calc(var(--header-h) + 1.5rem);
    align-self: start;
    margin-bottom: 0;
    max-height: calc(100vh - var(--header-h) - 3rem);
    overflow-y: auto;
  }

  /* Content in right column */
  .ratgeber-content {
    grid-column: 2;
    grid-row: 3;
  }

  /* FAQ and bottom CTA span full width */
  .ratgeber-faq,
  .ratgeber-page .container > .shop-cta {
    grid-column: 1 / -1;
  }
}
