/* =============================================================
   X-Road SH – Designsystem
   Baut auf den Tokens aus style/extra.css auf.
   Hier: seitenstrukturelle Komponenten und Barrierefreiheit.
   ============================================================= */


/* =============================================================
   Barrierefreiheit – Fokus & Kontrast
   ============================================================= */

/* Sichtbarer Tastaturfokus für alle interaktiven Elemente */
:focus-visible {
  outline: 3px solid var(--sh-blue);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Fokus auf hellem Hintergrund (Standard) */
a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--sh-blue);
  outline-offset: 3px;
}

/* Fokus auf dunklem Hintergrund (Hero, dark sections) */
.xroad-hero a:focus-visible,
.xroad-section--dark a:focus-visible,
.xroad-section--dark button:focus-visible {
  outline-color: var(--sh-white);
}

/* Skip-Link – für Tastaturnutzende */
.xroad-skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 9999;
  padding: 0.5rem 1rem;
  background: var(--sh-blue);
  color: var(--sh-white);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  font-weight: 700;
  text-decoration: none;
  transition: top var(--transition-fast);
}

.xroad-skip-link:focus {
  top: 0;
}


/* =============================================================
   Hero-Bereich
   ============================================================= */

.xroad-hero {
  background: linear-gradient(150deg, var(--sh-blue) 0%, var(--sh-blue-dark) 100%);
  color: var(--sh-white);
  padding: 3rem 2.5rem;
  border-radius: var(--radius-lg);
  margin-bottom: 2.5rem;
  position: relative;
  overflow: hidden;
}

/* Dekoratives Element – SH-Diagonale */
.xroad-hero::after {
  content: "";
  position: absolute;
  bottom: 0;
  right: 0;
  width: 40%;
  height: 100%;
  background: rgba(255, 255, 255, 0.04);
  clip-path: polygon(40% 0%, 100% 0%, 100% 100%, 0% 100%);
  pointer-events: none;
}

.xroad-hero__eyebrow {
  display: inline-block;
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 0.75rem;
}

/* h1 innerhalb des Hero – überschreibt Material-Default auf dunklem Grund */
.xroad-hero h1,
.xroad-hero .xroad-hero__title {
  color: var(--sh-white) !important;
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 300;
  line-height: 1.2;
  margin: 0 0 1rem 0;
  max-width: 680px;
}

.xroad-hero__lead {
  font-size: var(--text-lg);
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.9);
  max-width: 620px;
  margin: 0 0 2rem 0;
}

.xroad-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

/* Button-Variante speziell für Hero (weißer Button) */
.xroad-button--hero {
  background: var(--sh-white);
  color: var(--sh-blue) !important;
  border: 2px solid var(--sh-white);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.75rem 1.25rem;
  border-radius: 0.25rem;
  font-weight: 700;
  text-decoration: none !important;
  line-height: 1.2;
  transition: background var(--transition-fast), color var(--transition-fast);
}

.xroad-button--hero:hover,
.xroad-button--hero:focus-visible {
  background: var(--sh-blue-05);
  color: var(--sh-blue-dark) !important;
}

/* Ghost-Button für Hero (transparenter Hintergrund) */
.xroad-button--hero-ghost {
  background: transparent;
  color: var(--sh-white) !important;
  border: 2px solid rgba(255, 255, 255, 0.6);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.75rem 1.25rem;
  border-radius: 0.25rem;
  font-weight: 700;
  text-decoration: none !important;
  line-height: 1.2;
  transition: background var(--transition-fast), border-color var(--transition-fast);
}

.xroad-button--hero-ghost:hover,
.xroad-button--hero-ghost:focus-visible {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--sh-white);
}

@media (max-width: 600px) {
  .xroad-hero {
    padding: 2rem 1.25rem;
  }

  .xroad-hero__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .xroad-button--hero,
  .xroad-button--hero-ghost {
    text-align: center;
    justify-content: center;
  }
}


/* =============================================================
   Karten-Raster (xroad-card-grid)
   ============================================================= */

.xroad-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
  margin: 1.5rem 0;
}

.xroad-card {
  background: var(--sh-white);
  border: 1px solid var(--xroad-border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: box-shadow var(--transition-fast), transform var(--transition-fast);
}

.xroad-card:hover {
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}

.xroad-card--soft {
  background: var(--xroad-background-soft);
  border-color: transparent;
}

.xroad-card__icon {
  font-size: 1.75rem;
  line-height: 1;
  margin-bottom: 0.25rem;
}

.xroad-card__title {
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--xroad-primary);
  margin: 0;
}

.xroad-card__body {
  font-size: var(--text-sm);
  color: var(--xroad-muted);
  line-height: 1.6;
  margin: 0;
  flex: 1;
}

.xroad-card__link {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--xroad-primary);
  text-decoration: underline;
  margin-top: auto;
}

.xroad-card__link:hover {
  color: var(--xroad-primary-dark);
}


/* =============================================================
   Zweispalten-Layout (Text + Bild/Grafik)
   ============================================================= */

.xroad-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: center;
  margin: 2rem 0;
}

.xroad-split--wide {
  grid-template-columns: 3fr 2fr;
}

@media (max-width: 768px) {
  .xroad-split,
  .xroad-split--wide {
    grid-template-columns: 1fr;
  }
}


/* =============================================================
   FAQ-Teaser
   ============================================================= */

.xroad-faq-teaser {
  background: var(--sh-blue-10);
  border-left: 4px solid var(--sh-blue);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 1.25rem 1.5rem;
  margin: 2rem 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.xroad-faq-teaser__text {
  font-size: var(--text-base);
  color: var(--xroad-primary);
  font-weight: 600;
  margin: 0;
  flex: 1;
  min-width: 200px;
}

@media (max-width: 600px) {
  .xroad-faq-teaser {
    flex-direction: column;
    align-items: stretch;
  }
}


/* =============================================================
   Stat/Kennzahlen-Reihe
   ============================================================= */

.xroad-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin: 1.5rem 0;
}

.xroad-stat {
  flex: 1;
  min-width: 130px;
  text-align: center;
  padding: 1.25rem;
  background: var(--xroad-background-soft);
  border-radius: var(--radius-md);
}

.xroad-stat__value {
  display: block;
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--xroad-primary);
  line-height: 1;
  margin-bottom: 0.4rem;
}

.xroad-stat__label {
  font-size: var(--text-sm);
  color: var(--xroad-muted);
}


/* =============================================================
   Trennlinie mit Label
   ============================================================= */

.xroad-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 2.5rem 0;
  color: var(--xroad-muted);
  font-size: var(--text-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.xroad-divider::before,
.xroad-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--xroad-border);
}


/* =============================================================
   Inhaltsbild – überschreibt Material-Default für Hero-Bilder
   ============================================================= */

.xroad-img-full {
  width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  border: none !important;
  display: block;
  margin: 0;
}

.xroad-img-cover {
  width: 100%;
  height: 240px;
  object-fit: cover;
  border-radius: var(--radius-md);
  border: none !important;
  display: block;
}
