/* ==========================================================================
   oberursel-wetter.de – eigene Anpassungen für Helix Ultimate
   Farben aus dem bisherigen Design (Orange/Blau), auf WCAG-AA-Kontrast abgestimmt.
   ========================================================================== */

:root {
  --ow-orange: #ff7400;        /* Markenfarbe, nur für Flächen/Akzente (kein Fließtext) */
  --ow-orange-dunkel: #b93a00; /* Orange für Text/Hover, Kontrast 5,6:1 auf Weiß */
  --ow-blau: #1836ad;          /* Links/Menü, Kontrast 8,6:1 auf Weiß */
  --ow-grau-hell: #f6f7f9;
  --ow-rahmen: #e3e6ea;
  --ow-radius: 10px;
}

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1rem;
  font-style: normal;
  line-height: 1.6;
  background: var(--ow-grau-hell);
}

/* Orange Markenleiste oben + Kopfbereich */
#sp-header {
  border-top: 6px solid var(--ow-orange);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .06);
}
#sp-header .logo img {
  border-radius: 6px;
}

/* Hauptmenü */
.sp-megamenu-parent > li > a,
.sp-megamenu-parent > li > span {
  font-weight: 600;
}
.sp-megamenu-parent > li.active > a,
.sp-megamenu-parent > li > a:hover {
  box-shadow: inset 0 -3px 0 var(--ow-orange);
}

/* Inhalt und Module als ruhige Karten */
#sp-main-body {
  padding: 32px 0;
}
#sp-component > .sp-column,
#sp-left .sp-module,
#sp-right .sp-module,
#sp-content-top .sp-module,
#sp-content-bottom .sp-module {
  background: #fff;
  border: 1px solid var(--ow-rahmen);
  border-radius: var(--ow-radius);
  padding: 20px;
}
#sp-left .sp-module,
#sp-right .sp-module {
  margin-bottom: 24px;
}
.sp-module .sp-module-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ow-blau);
  padding-bottom: 10px;
  margin-bottom: 14px;
  border-bottom: 3px solid var(--ow-orange);
}

/* Seitenmenü (Wetter Content / Sonstiges) */
#sp-left .sp-module ul.menu > li > a {
  display: block;
  padding: 6px 0;
}

/* Bilder nie breiter als ihre Spalte (Wettergrafiken) */
#sp-main-body img {
  max-width: 100%;
  height: auto;
}

/* Joomla-Modul „Beiträge“ (mod_articles) als Kartenraster – Helix bringt die
   Grid-Klassen von Cassiopeia nicht mit */
.mod-articles-items {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 20px;
}
.mod-articles-grid.grid-cols-2 { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.mod-articles-grid.grid-cols-3 { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.mod-articles-grid.grid-cols-4 { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.mod-articles-items > li {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--ow-rahmen);
  border-radius: var(--ow-radius);
  overflow: hidden;
  background: #fff;
}
.mod-articles-items > li img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  order: -1;
}
.mod-articles-items .mod-articles-title {
  font-size: 1.05rem;
  line-height: 1.35;
  margin: 12px 14px 4px;
}
.mod-articles-items > li > *:not(img):not(figure):not(.mod-articles-title) {
  margin-left: 14px;
  margin-right: 14px;
}
.mod-articles-items .readmore {
  margin-top: auto;
  padding-bottom: 14px;
}

/* Seiten mit Seitenklasse „ow-vollbreit“ (Menüpunkt → Seitenanzeige → Seitenklasse):
   ohne Seitenleisten, Inhalt über die volle Breite – z. B. die Wetterdiagramme */
body.ow-vollbreit #sp-left,
body.ow-vollbreit #sp-right {
  display: none;
}
body.ow-vollbreit #sp-component {
  flex: 0 0 100%;
  max-width: 100%;
}

/* „Featured“-Schild an hervorgehobenen Beiträgen ausblenden */
.featured-article-badge {
  display: none;
}

/* Mobil/Tablet (Spalten untereinander): Inhalt zuerst, dann Seitenmenü und rechte Spalte */
@media (max-width: 991.98px) {
  #sp-main-body .row > #sp-component {
    order: -1;
  }
}

/* Hervorgehobene Beiträge (Startseite) nicht noch einmal einrahmen – die Inhaltskarte reicht */
#sp-component .blog-featured {
  padding-left: 0;
  padding-right: 0;
}
#sp-component .blog-featured .blog-item.article {
  padding: 0;
  border: 0;
  box-shadow: none;
  background: transparent;
}

/* Handy: Innenabstände zusammenstreichen (vorher ~160 px Summe → Kacheln liefen über den Rand) */
@media (max-width: 575.98px) {
  #sp-main-body > .container {
    padding-left: 8px;
    padding-right: 8px;
  }
  #sp-main-body .row {
    margin-left: 0;
    margin-right: 0;
  }
  #sp-main-body .row > [class*="col-"] {
    padding-left: 0;
    padding-right: 0;
  }
  #sp-component > .sp-column,
  .sp-module {
    padding: 14px 12px;
  }
}

/* Fußbereich */
#sp-bottom {
  background: #313131;
  color: #e6e6e6;
}
#sp-bottom a {
  color: #ffb27a;
}

/* Barrierefreiheit: deutlich sichtbarer Tastaturfokus */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid var(--ow-orange);
  outline-offset: 2px;
}

/* Oberes Hauptmenü (Monatsgrafiken usw.): ab 992 px immer sichtbar.
   Passt es nicht neben das Logo, bekommt es eine eigene, umbrechende Zeile darunter.
   Unter 992 px übernimmt das Hamburger-Menü (zeigt dasselbe Menü). */
@media (min-width: 992px) {
  #sp-header {
    height: auto !important;
  }
  #sp-header .row {
    flex-wrap: wrap;
  }
  #sp-header #sp-menu {
    flex: 1 1 auto;
  }
  #sp-header .sp-megamenu-parent {
    display: flex !important;
    flex-wrap: wrap;
    justify-content: flex-end;
    row-gap: 0;
  }
  #sp-header .sp-megamenu-parent > li > a,
  #sp-header .sp-megamenu-parent > li > span {
    line-height: 44px;
    padding: 0 10px;
    font-size: .95rem;
  }
  #sp-header .offcanvas-toggler-right {
    display: none !important;
  }
}
@media (min-width: 992px) and (max-width: 1399.98px) {
  #sp-header #sp-menu {
    flex-basis: 100%;
    border-top: 1px solid var(--ow-rahmen);
  }
  #sp-header .sp-megamenu-parent {
    justify-content: flex-start;
  }
}

@media (max-width: 991.98px) {
  #sp-main-body {
    padding: 16px 0;
  }
  #sp-component > .sp-column,
  .sp-module {
    padding: 16px;
  }
}
