/* Ratgeber-Übersicht (/ratgeber/, views/ratgeber.tsx).
   Eigene Datei statt Erweiterung von blog-post.css: dort steht die Typografie
   der Einzelbeiträge, hier die Kartenliste der Übersicht. */

.ratgeber-main {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 var(--seitenrand) 3rem;
}

/* ----- Kopfbereich ----- */
.ratgeber-hero {
  padding: 0.5rem 0 1.6rem;
}
.ratgeber-hero h1 {
  margin: 0 0 0.6rem;
  color: var(--dunkelblau);
}
.ratgeber-hero-intro {
  max-width: 62ch;
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.6;
  color: #4a616b;
}

/* Sprungmarken zu den Rubriken — auf dem Handy waagerecht scrollbar, damit
   die Leiste nicht vier Zeilen hoch wird. */
.ratgeber-jump {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.3rem;
}
.ratgeber-jump a {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.85rem;
  border: 1px solid #e2eaf0;
  border-radius: 999px;
  background: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--dunkelblau);
  text-decoration: none;
  transition:
    background 0.16s ease,
    border-color 0.16s ease;
}
.ratgeber-jump a:hover,
.ratgeber-jump a:focus-visible {
  background: var(--hellblau);
  border-color: #cfe0ef;
}
.ratgeber-jump a span {
  padding: 0 0.4rem;
  border-radius: 999px;
  background: #f1f5f8;
  font-size: 0.78rem;
  font-weight: 700;
  color: #6b7f89;
  font-variant-numeric: tabular-nums;
}

/* ----- Rubriken ----- */
.ratgeber-section {
  /* Sprungziel unter dem Sticky-Header freihalten */
  scroll-margin-top: 6rem;
  padding-top: 1.8rem;
}
.ratgeber-section-head {
  display: flex;
  align-items: baseline;
  gap: 0.8rem;
  padding-bottom: 0.6rem;
  border-bottom: 2px solid var(--horange);
}
.ratgeber-section-head h2 {
  margin: 0;
  font-size: 1.45rem;
  color: var(--dunkelblau);
}
.ratgeber-section-count {
  flex: none;
  margin-left: auto;
  font-size: 0.85rem;
  color: #7b8b93;
  font-variant-numeric: tabular-nums;
}
.ratgeber-section-intro {
  max-width: 68ch;
  margin: 0.8rem 0 0;
  font-size: 0.98rem;
  line-height: 1.55;
  color: #4a616b;
}

/* ----- Kartenraster ----- */
.ratgeber-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.4rem;
  margin-top: 1.3rem;
}
.ratgeber-card {
  display: flex;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 0 18px rgba(193, 193, 193, 0.42);
  overflow: hidden;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease;
}
.ratgeber-card:hover,
.ratgeber-card:focus-within {
  transform: translateY(-3px);
  box-shadow: 0 10px 26px -10px rgba(25, 51, 63, 0.4);
}
.ratgeber-card-link {
  display: flex;
  flex-direction: column;
  width: 100%;
  color: inherit;
  text-decoration: none;
}
.ratgeber-card-media {
  aspect-ratio: 16 / 9;
  background: var(--hellblau);
  overflow: hidden;
}
.ratgeber-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}
.ratgeber-card:hover .ratgeber-card-media img {
  transform: scale(1.04);
}
.ratgeber-card-placeholder {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--hellblau) 0%, var(--horange) 100%);
}
.ratgeber-card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 1rem 1.1rem 1.1rem;
}
.ratgeber-card-title {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
  line-height: 1.35;
  color: var(--dunkelblau);
}
.ratgeber-card-text {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.5;
  color: #4a616b;
}
.ratgeber-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  margin: 0.9rem 0 0;
  padding-top: 0.7rem;
  border-top: 1px solid #eef2f6;
  font-size: 0.82rem;
  color: #7b8b93;
}
.ratgeber-card-more {
  font-weight: 700;
  color: var(--dorange);
}

/* ----- Abschluss-Box ----- */
.ratgeber-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.2rem;
  margin-top: 2.6rem;
  padding: 1.5rem 1.7rem;
  border-radius: 16px;
  background: linear-gradient(140deg, var(--horange) 0%, var(--hellblau) 100%);
}
.ratgeber-cta h2 {
  margin: 0 0 0.35rem;
  font-size: 1.25rem;
  color: var(--dunkelblau);
}
.ratgeber-cta p {
  max-width: 58ch;
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.5;
  color: #3d5865;
}
.ratgeber-cta-button {
  flex: none;
  padding: 0.75rem 1.4rem;
  border-radius: 999px;
  background: var(--dunkelblau);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.16s ease;
}
.ratgeber-cta-button:hover,
.ratgeber-cta-button:focus-visible {
  background: var(--dorange);
  color: #fff;
}

@media (max-width: 719px) {
  .ratgeber-hero h1 {
    font-size: 1.9rem;
  }
  .ratgeber-section-head {
    flex-wrap: wrap;
  }
  .ratgeber-cta {
    padding: 1.2rem;
  }
  .ratgeber-cta-button {
    width: 100%;
    text-align: center;
  }
}
