/* =====================================================================
   Nachbarschaftsgrundschule Staig – Anpassungen für Cassiopeia (Joomla 6)
   Farben und Bildsprache aus dem alten Design (2015) übernommen.
   Datei: media/templates/site/cassiopeia/css/user.css (update-sicher)
   ===================================================================== */

:root {
  --ngs-orange: #eb8500;
  --ngs-rot: #cb3434;
  --ngs-rot-dunkel: #a82828;
  --ngs-blau: #1f7aa8;          /* etwas dunkler als #2286b4 für besseren Kontrast */
  --ngs-blau-hell: #e3f0f7;
  --ngs-gelb: #f9a91f;
  --ngs-navy: #303f50;
  --ngs-text: #2c3a49;
  --ngs-hintergrund: #eef1f4;

  --cassiopeia-color-primary: var(--ngs-rot);
  --cassiopeia-color-link: var(--ngs-blau);
  --cassiopeia-color-hover: var(--ngs-orange);
  --cassiopeia-font-family-body: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --cassiopeia-font-family-headings: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

body {
  background: var(--ngs-hintergrund);
  color: var(--ngs-text);
  font-family: var(--cassiopeia-font-family-body);
}

a { color: var(--ngs-blau); }
a:hover, a:focus { color: var(--ngs-orange); }
:focus-visible { outline: 3px solid var(--ngs-gelb); outline-offset: 2px; }

/* ---------- Header: Konfetti + Logo ---------- */
.container-header {
  background-color: #fff;
  background-image: url("../../../../../images/design/konfetti-links.svg"),
                    url("../../../../../images/design/konfetti-rechts.svg");
  background-repeat: no-repeat;
  background-position: left -20px top 6px, right -20px top 6px;
  background-size: auto 136px;
  color: var(--ngs-text);
  box-shadow: 0 2px 6px rgba(0, 0, 0, .08);
  position: relative;
}
.container-header .navbar-brand {
  margin-inline: auto;
  padding: .5rem 0;
}
.container-header .navbar-brand img,
.container-header .brand-logo img {
  max-height: 120px;
  width: auto;
}
.container-header .site-description { display: none; }

/* Kontaktzeile (Modul in "below-top") */
.container-below-top { position: relative; z-index: 2; }
.ngs-kontakt {
  font-size: .9rem;
  font-weight: 600;
  color: var(--ngs-navy);
  text-align: right;
  line-height: 1.4;
}
.ngs-kontakt a { color: var(--ngs-navy); text-decoration: none; }
.ngs-kontakt a:hover { color: var(--ngs-orange); }
@media (min-width: 992px) {
  .container-below-top {
    position: absolute;
    right: max(1rem, calc((100vw - 1320px) / 2 + 1rem));
    top: 92px;
  }
  .ngs-kontakt { background: rgba(255, 255, 255, .85); padding: .25rem .5rem; border-radius: 4px; }
}
@media (max-width: 991.98px) {
  .container-header { background-size: auto 90px; background-position: left -40px top 4px, right -40px top 4px; }
  .container-header .navbar-brand img { max-height: 90px; }
  .ngs-kontakt { text-align: center; padding: .25rem 0; }
}

/* ---------- Hauptnavigation: orange Leiste über volle Breite ---------- */
.container-header .container-nav {
  background: var(--ngs-orange);
  box-shadow: 0 0 0 100vmax var(--ngs-orange);
  clip-path: inset(0 -100vmax);
  padding-block: 0;
  margin-top: .25rem;
}
.container-header .mod-menu > li > a,
.container-header .mod-menu > li > button,
.container-header .mod-menu > li > .mod-menu__heading,
.container-header .metismenu > li > a,
.container-header .metismenu > li > button {
  color: #fff;
  font-weight: 600;
  padding: .7rem 1rem;
  text-decoration: none;
}
.container-header .mod-menu > li > a:hover,
.container-header .metismenu > li > a:hover,
.container-header .metismenu > li.active > a,
.container-header .mod-menu > li.active > a {
  background: rgba(0, 0, 0, .14);
  color: #fff;
}
.container-header .metismenu .mm-collapse,
.container-header .metismenu ul {
  background: #fff;
  border-top: 3px solid var(--ngs-rot);
  box-shadow: 0 6px 16px rgba(0, 0, 0, .15);
}
.container-header .metismenu ul a { color: var(--ngs-rot); padding: .5rem 1rem; }
.container-header .metismenu ul a:hover { background: var(--ngs-blau-hell); color: var(--ngs-rot-dunkel); }
.container-header .navbar-toggler { color: #fff; border-color: rgba(255, 255, 255, .7); margin: .4rem 0; }

/* ---------- Banner-Slider (nur Startseite) ---------- */
.ngs-slider {
  position: relative;
  aspect-ratio: 6 / 1;
  overflow: hidden;
  border-radius: 6px;
  margin-block: 1rem .5rem;
  background: #ddd;
}
.ngs-slider img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0;
  animation: ngs-fade 18s infinite;
}
.ngs-slider img:nth-child(1) { animation-delay: 0s; }
.ngs-slider img:nth-child(2) { animation-delay: 6s; }
.ngs-slider img:nth-child(3) { animation-delay: 12s; }
@keyframes ngs-fade {
  0% { opacity: 0; } 5% { opacity: 1; } 33% { opacity: 1; } 38% { opacity: 0; } 100% { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .ngs-slider img { animation: none; }
  .ngs-slider img:first-child { opacity: 1; }
}
@media (max-width: 575.98px) { .ngs-slider { aspect-ratio: 3 / 1; } }

/* ---------- Inhalt ---------- */
.container-component,
.container-sidebar-right > .card,
.container-sidebar-left > .card:not(.ngs-untermenue) {
  background: #fff;
  border: 0;
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .08);
}
.container-component { padding: 1.5rem; }

h1, h2, h3, .page-header h1, .page-header h2, .item-title {
  color: var(--ngs-rot);
  font-weight: 600;
}
.page-header h1, .page-header h2 { font-size: 1.75rem; }
.item-title a, .page-header h2 a { color: var(--ngs-rot); text-decoration: none; }
.item-title a:hover, .page-header h2 a:hover { color: var(--ngs-orange); }

.blog-item, .com-content-category-blog__item {
  padding-bottom: 1.25rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px dashed #cfd6dd;
}
.blog-featured .blog-item {
  background: var(--ngs-blau-hell);
  border: 0;
  border-left: 5px solid var(--ngs-orange);
  border-radius: 4px;
  padding: 1rem 1.25rem;
}
.readmore .btn, .btn-primary {
  background: var(--ngs-rot);
  border-color: var(--ngs-rot);
}
.readmore .btn:hover, .btn-primary:hover { background: var(--ngs-orange); border-color: var(--ngs-orange); }
.article-info, .article-info-term { color: #5f7081; font-size: .85rem; }
.com-content-article img, .blog-item img { max-width: 100%; height: auto; border-radius: 4px; }

/* Breadcrumbs */
.mod-breadcrumbs { font-size: .85rem; background: transparent; padding: .5rem 0; margin: 0; }

/* ---------- Seitenmenü links (rot wie früher) ---------- */
.container-sidebar-left .ngs-untermenue {
  background: var(--ngs-rot);
  color: #fff;
  border: 0;
  border-radius: 6px;
  overflow: hidden;
}
.ngs-untermenue .card-header { background: var(--ngs-rot-dunkel); color: #fff; font-weight: 600; border: 0; }
.ngs-untermenue .card-body { padding: .5rem 0; }
.ngs-untermenue ul { list-style: none; margin: 0; padding: 0; }
.ngs-untermenue li a {
  display: block;
  color: #fff;
  padding: .45rem 1rem .45rem 1.75rem;
  text-decoration: none;
  position: relative;
}
.ngs-untermenue li a::before { content: "›"; position: absolute; left: 1rem; font-weight: 700; }
.ngs-untermenue li a:hover { background: rgba(0, 0, 0, .12); }
.ngs-untermenue li.current > a, .ngs-untermenue li.active > a { color: var(--ngs-gelb); font-weight: 600; }
.ngs-untermenue ul ul a { padding-left: 2.5rem; font-size: .92rem; }
.ngs-untermenue ul ul a::before { left: 1.75rem; }

/* ---------- Fotogalerien ---------- */
.ngs-galerie {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: .5rem;
  margin: 1.5rem 0;
}
.ngs-galerie a { display: block; border-radius: 4px; overflow: hidden; background: #e5e9ed; }
.ngs-galerie img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform .25s ease;
}
.ngs-galerie a:hover img, .ngs-galerie a:focus img { transform: scale(1.04); }

.ngs-lightbox {
  border: 0; padding: 0; max-width: 100vw; max-height: 100vh;
  width: 100vw; height: 100vh; background: rgba(20, 26, 32, .94);
}
.ngs-lightbox::backdrop { background: rgba(20, 26, 32, .94); }
.ngs-lightbox figure { margin: 0; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ngs-lightbox img { max-width: 94vw; max-height: 84vh; object-fit: contain; border-radius: 4px; }
.ngs-lightbox figcaption { color: #fff; margin-top: .75rem; font-size: .95rem; }
.ngs-lightbox button {
  position: absolute; background: rgba(255, 255, 255, .15); color: #fff; border: 0;
  width: 3rem; height: 3rem; border-radius: 50%; font-size: 1.6rem; line-height: 1; cursor: pointer;
}
.ngs-lightbox button:hover, .ngs-lightbox button:focus-visible { background: var(--ngs-orange); }
.ngs-lightbox .ngs-lb-schliessen { top: 1rem; right: 1rem; }
.ngs-lightbox .ngs-lb-zurueck { left: 1rem; top: 50%; transform: translateY(-50%); }
.ngs-lightbox .ngs-lb-weiter { right: 1rem; top: 50%; transform: translateY(-50%); }

/* ---------- Footer ---------- */
.container-footer {
  background: var(--ngs-navy);
  background-image: none;
  color: #dfe6ec;
  margin-top: 2rem;
}
.container-footer a { color: #fff; }
.container-footer a:hover { color: var(--ngs-gelb); }
.ngs-fuss {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem 2rem;
  padding: 1.5rem 0;
  font-size: .92rem;
}
.ngs-fuss strong { color: #fff; display: block; margin-bottom: .25rem; }
.ngs-fuss ul { list-style: none; margin: 0; padding: 0; }
.ngs-fuss li { margin-bottom: .25rem; }

@media print {
  .container-header, .container-footer, .container-sidebar-left, .ngs-slider { display: none !important; }
  .container-component { box-shadow: none; }
}
