/*
 * Rübezahl-Spinnereien – Optik auf Basis von Bootstrap 6
 * Übernommen und angepasst aus dem Sitepackage "sitepackage_ruebezahl_spinnereien"
 * (variables.css, font_google.css, layout.css, menu.css).
 */

/* ============================================================
   VARIABLEN
   ============================================================ */

:root {
  --font-family: 'Roboto', sans-serif;
  --font-standard: .95rem;
  --font-color: #0A0C59;
  --border: #ccc;
  --blue: #0A0C59;
  --green: #3f7000;
  --white: #fff;
  --star: #cc0000;
  --space: .5rem;
}

/* ============================================================
   SCHRIFTEN (lokal)
   ============================================================ */

@font-face {
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../Fonts/roboto-v20-latin-regular.woff2') format('woff2'),
       url('../Fonts/roboto-v20-latin-regular.woff') format('woff');
}

@font-face {
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../Fonts/roboto-v20-latin-500.woff2') format('woff2'),
       url('../Fonts/roboto-v20-latin-500.woff') format('woff');
}

@font-face {
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../Fonts/roboto-v20-latin-700.woff2') format('woff2'),
       url('../Fonts/roboto-v20-latin-700.woff') format('woff');
}

/* ============================================================
   GRUNDLAGEN
   ============================================================ */

html {
  overflow-y: scroll;
}

body {
  font-family: var(--font-family), sans-serif;
  font-size: var(--font-standard);
  line-height: 1.58;
  color: var(--font-color);
  text-align: left;
  background-color: rgb(211 211 211 / .3);
}

main, aside {
  padding-top: 1rem;
}

@media (min-width: 768px) {
  main, aside {
    padding-top: 3rem;
  }
}

/* Seitenleiste ist unter 1280px komplett ausgeblendet (Navigation über mmenu), daher auch kein Leerraum */
@media (max-width: 1279.98px) {
  aside { display: none; }
}

#page-content {
  margin-bottom: 10rem;
}

.page-title h1 {
  display: none;
}

h1, h2, h3, h4, h5, h6 { color: var(--font-color); }
h2, .h2 { font-size: 150%; }
h2 { padding: 20px 0 16px; }
h3, .h3 { font-size: 125%; padding-bottom: 1rem; }
h4, .h4 { font-size: .875rem; line-height: 1.3rem; padding-block: .5rem; }
p { margin-bottom: .6rem; }
figcaption { font-size: 90%; }

a {
  color: var(--blue);
  text-decoration: none;
}

/* Punktierte Linie nur bei Links in Fließtexten (Inhaltselemente, Produktbeschreibungen) */
.ce-bodytext a,
.tx-cart-products :is(.description, .teaser, .list_teaser) a {
  border-bottom: 1px dotted currentcolor;
}

a:hover, a:focus, a:active {
  text-decoration: none;
}

/* Sichtbarer Tastaturfokus (WCAG 2.4.7) */
a:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

.site-navbar a:focus-visible,
.site-footer a:focus-visible,
.mobile-menu-button:focus-visible,
.mm-spn a:focus-visible,
.bs-background__panel[data-bs-theme="dark"] a:focus-visible {
  outline-color: var(--white);
}

.mobile-menu-button button:focus-visible {
  outline: 2px solid var(--white);
  outline-offset: 2px;
}

img { border-radius: .3rem; }

@media (max-width: 575.98px) {
  img { max-width: 100%; height: auto; }
  #page-content { padding-inline: .5rem; }
}

table.contenttable td:not(:last-child) { vertical-align: top; padding: .5rem 2rem .5rem 0; }
table.contenttable tr { background-color: transparent; border-color: var(--border); }

.frame-ruler-before::before {
  content: '';
  display: block;
  border-top: 1px solid rgb(0 0 0 / .6);
  margin-bottom: 1rem;
}

.frame-ruler-after::after {
  content: '';
  display: block;
  border-bottom: 1px solid rgb(0 0 0 / .6);
  margin-top: 1rem;
}

/* ============================================================
   NAVIGATION (Kopfzeile)
   ============================================================ */

.site-navbar {
  background-color: #0a0c59;
  color: var(--white);
  padding-block: .5rem;
}

.site-navbar__inner {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
}

.site-navbar__brand,
.site-navbar__brand:hover {
  border: 0;
}

.site-navbar__brand {
  flex: 0 1 370px;
  min-width: 0;
}

.site-navbar__brand img {
  width: 100%;
  max-width: 370px;
  height: auto;
  aspect-ratio: 370 / 114;
}

.mobile-menu-button {
  flex: 0 0 auto;
  margin-bottom: .75rem;
  border: 0;
  text-decoration: none;
}

.mobile-menu-button button {
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  padding: 0;
  background: transparent;
  border: 2px solid rgb(255 255 255 / .85);
  border-radius: 50%;
  cursor: pointer;
  transition: background-color .15s, border-color .15s;
}

.mobile-menu-button:hover button,
.mobile-menu-button:focus-visible button {
  background: rgb(255 255 255 / .15);
  border-color: var(--white);
}

.mobile-menu-button__bars,
.mobile-menu-button__bars::before,
.mobile-menu-button__bars::after {
  display: block;
  width: 1.375rem;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
}

.mobile-menu-button__bars { position: relative; }
.mobile-menu-button__bars::before,
.mobile-menu-button__bars::after { content: ''; position: absolute; left: 0; }
.mobile-menu-button__bars::before { top: -7px; }
.mobile-menu-button__bars::after { top: 7px; }

@media (min-width: 1280px) {
  .mobile-menu-button { display: none; }
}

/* Mobiles Menü: mmenu-light (mmenu-light.css) */
#mobile-menu:not(.mm-spn) { display: none; }

/* ============================================================
   ABSCHNITTSMENÜ (Seitenleiste) und Untermenüs
   ============================================================ */

#sectionmenu.list-group {
  display: none; /* mobil ausgeblendet, Navigation läuft über das mobile Menü */
  position: sticky;
  top: 1rem;
  flex-direction: row;
  flex-wrap: wrap;
  padding-top: 2rem;
}

@media (min-width: 1280px) {
  #sectionmenu.list-group {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    padding-top: 0;
  }
}

#sectionmenu .list-group-item,
.frame-type-menu_subpages a,
.frame-type-menu_categorized_pages a {
  display: block;
  padding: .5rem .5rem .5rem 12px;
  color: var(--blue);
  text-decoration: none;
  background-color: var(--white);
  border: 1px solid rgb(0 0 0 / .125);
}

#sectionmenu .list-group-item:hover,
.frame-type-menu_subpages a:hover,
.frame-type-menu_categorized_pages a:hover,
.frame-type-menu_subpages a[aria-current="page"],
.frame-type-menu_categorized_pages a[aria-current="page"] {
  padding-left: 10px;
  border-left: 3px solid #0a0c59;
}

.frame-type-menu_subpages ul,
.frame-type-menu_categorized_pages ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (max-width: 1279.98px) {
  .frame-type-menu_subpages,
  .frame-type-menu_categorized_pages { display: none; }
}


/* ============================================================
   FOOTER
   ============================================================ */

.site-footer {
  padding: 1rem;
  color: var(--white);
  background: var(--blue);
}

@media (min-width: 768px) {
  .site-footer { padding: 1rem 0; }
}

.site-footer a {
  color: var(--white);
}

.site-footer p { color: var(--white); }

/* ============================================================
   BOX-KOMPONENTE
   ============================================================ */

.box {
  padding: 10px;
  background: rgb(211 211 211 / .8);
  border-radius: .3rem;
}

@media (max-width: 767.98px) {
  .box { margin-bottom: 1rem !important; }
}

/* Boxen in Rasterspalten (ce_grid): alle Boxen einer Zeile gleich hoch */
.frame-type-ce_grid .grid > * > .box { height: 100%; }

.box h2 {
  padding: 0 0 10px !important;
  font-size: 150%;
  border-bottom: 2px solid var(--white);
}

.box .ce-bodytext { padding-top: 10px; }
.box p, .box ul li { color: var(--font-color); }

/* ============================================================
   ABSCHNITTE DER STARTSEITE
   ============================================================ */

/* Startbild: feste Höhe wie im Original (überschreibt bs_background-Höhe "nach Inhalt") */
.bs-background.spinn_wheel_image { min-height: 500px; height: 500px; }

/* Abschnitte: kein zusätzlicher Container-Rand, Abstände kommen aus den CSS-Klassen */
.main-content .bs-background__content.container {
  max-width: none;
  padding-inline: .75rem;
}

.bs-background--h-auto .bs-background__content { padding-block: 0; }

/* Text im Vordergrund in der Seitenfarbe (Bootstrap setzt sonst fg-body) */
.bs-background__panel[data-bs-theme="light"] { color: var(--font-color); }
.bs-background__panel[data-bs-theme="dark"] { color: var(--white); }
.bs-background__panel[data-bs-theme="dark"] h1,
.bs-background__panel[data-bs-theme="dark"] h2,
.bs-background__panel[data-bs-theme="dark"] h3,
.bs-background__panel[data-bs-theme="dark"] h4,
.bs-background__panel[data-bs-theme="dark"] p,
.bs-background__panel[data-bs-theme="dark"] a { color: var(--white); }
/* Boxen im dunklen Panel: nur Überschrift und Unterstrich bleiben weiß, Text und Links in
 Standardfarbe */
.bs-background__panel[data-bs-theme="dark"] .box :is(p, li) { color: var(--font-color); }
.bs-background__panel[data-bs-theme="dark"] .box a { color: var(--blue); }

.frame-textcolor-white,
.frame-textcolor-white h1,
.frame-textcolor-white h2,
.frame-textcolor-white h3,
.frame-textcolor-white p { color: var(--white); }

#body-1 .main-content,
.main-content { margin-bottom: 0; }

/* Seitenmenü: Shop-Schaltfläche (c711) und Trenner (c712) */
#c711 {
  position: sticky;
  top: 240px;
  z-index: 1020;
  display: block !important;
  padding: .75rem 1rem .25rem 12px;
  color: var(--blue);
  font-size: .95rem;
  line-height: 1.2;
  text-align: center;
  background-color: var(--white);
  border: 1px solid rgb(0 0 0 / .125);
  border-radius: .3rem;
}

#c711:hover { padding-left: 10px; border-left: 3px solid #0a0c59; }
#c711 h4 { padding: 0; font-weight: normal; }

@media (min-width: 768px) {
  #c711 { width: 100%; text-align: left; }
}

#c712 { position: sticky; top: 200px; z-index: 1020; }

@media (max-width: 1279.98px) {
  #c711, #c712, #c713 { display: none !important; }
}

@media (max-width: 575.98px) {
  #c583, #c584 { display: none; }
}

@media (max-width: 991.98px) {
  #c713 hr { display: none; }
}

/* Mobil: von #c505 nur die Überschrift "Shop" (h2) anzeigen */
@media (max-width: 1279.98px) {
  #c505 :not(h2):not(:has(h2)):not(h2 *) { display: none !important; }
}

/* Trenner #c713 nur anzeigen, wenn das Menü #c584 Einträge enthält */
#c713 { display: none; }

@media (min-width: 1280px) {
  body:has(#c584 a) #c713 { display: block; }

  /* Nur mobil sichtbar */
  #c744 { display: none !important; }
}

/* Seiten-Modal "Social Media" */
#c730 .btn { background-color: #0a0c59; border-color: #000; color: var(--white); }

/* Modal-Schaltfläche im Text (wie auf der Startseite "mehr erfahren") */
.bs-modal--inline .bs-modal__button .btn {
  padding: 10px;
  color: var(--font-color);
  background: rgb(211 211 211 / .8);
  border-color: transparent;
  border-radius: .3rem;
}

.bs-modal--inline .bs-modal__button .btn:hover { background: rgb(211 211 211 / 1); }

/* ============================================================
   FORMULARE
   ============================================================ */

.form-control:focus-visible {
  border-color: var(--blue);
  outline: 2px solid var(--blue);
  outline-offset: 1px;
  box-shadow: none;
}

/* Links, die als Buttons gestaltet sind: Farbe und Rand von Bootstrap behalten */
a.btn,
a.btn:hover,
a.btn:focus {
  color: var(--bs-btn-color, inherit);
  border-bottom: 0;
}

/* Klebende Menü-Shortcuts (zuvor Inline-Style "top:29px" an den Elementen) */
.frame-type-shortcut.sticky-top { top: 29px; }

/* Footer-Links (auch in Textelementen) ohne punktierte Linie */
.site-footer a {
  border-bottom: 0;
}
