/*
 * Heimrat Kalwes corporate design — Grav FAQ (Quark2)
 * Tokens match hub / Authentik / LibreBooking.
 */
@import url("https://fonts.googleapis.com/css2?family=Barlow:wght@400;500;600;700&display=swap");

:root,
:root[data-theme="light"] {
  --heimrat-terra: #c4573a;
  --heimrat-terra-deep: #a4432a;
  --heimrat-ink: #262c33;
  --heimrat-zinc: #5a646e;
  --heimrat-paper: #f5f1ec;
  --heimrat-teal: #1fa9a6;

  --q2-accent: var(--heimrat-terra);
  --q2-accent-contrast: #ffffff;
  --q2-link: var(--heimrat-terra);
  --q2-focus-ring: color-mix(in oklab, var(--heimrat-terra) 45%, transparent);

  --q2-bg: var(--heimrat-paper);
  --q2-bg-elev: #ffffff;
  --q2-bg-muted: color-mix(in oklab, var(--heimrat-paper) 70%, var(--heimrat-ink) 8%);
  --q2-bg-inverse: var(--heimrat-ink);

  --q2-text: var(--heimrat-ink);
  --q2-text-strong: var(--heimrat-ink);
  --q2-text-muted: var(--heimrat-zinc);
  --q2-text-inverse: #ffffff;

  --q2-border: color-mix(in oklab, var(--heimrat-ink) 12%, transparent);
  --q2-border-ring: color-mix(in oklab, var(--heimrat-ink) 10%, transparent);

  --pico-font-family: "Barlow", "Segoe UI", system-ui, sans-serif;
  --pico-font-family-sans-serif: "Barlow", "Segoe UI", system-ui, sans-serif;
  --pico-font-family-display: "Barlow", "Segoe UI", system-ui, sans-serif;
  --pico-background-color: var(--q2-bg);
  --pico-color: var(--q2-text);
  --pico-primary: var(--heimrat-terra);
  --pico-primary-background: var(--heimrat-terra);
  --pico-primary-border: var(--heimrat-terra);
  --pico-primary-hover: var(--heimrat-terra-deep);
  --pico-primary-hover-background: var(--heimrat-terra-deep);
  --pico-primary-hover-border: var(--heimrat-terra-deep);
  --pico-primary-focus: var(--q2-focus-ring);
  --pico-card-background-color: var(--q2-bg-elev);
}

:root[data-theme="dark"] {
  --heimrat-terra: #e07a5f;
  --heimrat-terra-deep: #c4573a;
  --heimrat-ink: #f5f1ec;
  --heimrat-zinc: #9aa3ac;
  --heimrat-paper: #1a1e24;
  --heimrat-teal: #3bc4c1;

  --q2-accent: var(--heimrat-terra);
  --q2-link: var(--heimrat-terra);
  --q2-bg: #161a20;
  --q2-bg-elev: #222831;
  --q2-bg-muted: #2c333d;
  --q2-bg-inverse: #f5f1ec;
  --q2-text: #e8e4df;
  --q2-text-strong: #f5f1ec;
  --q2-text-muted: #9aa3ac;
  --q2-text-inverse: #161a20;
  --q2-border: rgba(245, 241, 236, 0.12);
  --q2-border-ring: rgba(245, 241, 236, 0.1);

  --pico-background-color: var(--q2-bg);
  --pico-color: var(--q2-text);
  --pico-primary: var(--heimrat-terra);
  --pico-primary-background: var(--heimrat-terra);
  --pico-primary-border: var(--heimrat-terra);
}

html,
body {
  font-family: "Barlow", "Segoe UI", system-ui, sans-serif;
  background: var(--q2-bg);
  color: var(--q2-text);
}

h1,
h2,
h3,
h4,
h5,
h6,
.card-title :is(h1, h2, h3, h4, h5, h6) {
  font-family: "Barlow", "Segoe UI", system-ui, sans-serif;
  color: var(--q2-text-strong);
  letter-spacing: -0.02em;
}

a {
  color: var(--heimrat-terra);
}

a:hover {
  color: var(--heimrat-terra-deep);
}

/* —— Header: ink bar like Hub / Rooms —— */
#header {
  background: #262c33 !important;
  border-bottom: none;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2);
}

#header .navbar-brand,
#header .theme-toggle,
#header .login-status-wrapper,
#header .dropmenu > ul > li > a {
  color: rgba(245, 241, 236, 0.92) !important;
}

#header .dropmenu > ul > li > a:hover,
#header .dropmenu > ul > li > a.active {
  color: #ffffff !important;
}

#header .dropmenu > ul > li > a.active {
  box-shadow: inset 0 -2px 0 var(--heimrat-terra);
}

#header .navbar-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
}

#header .navbar-brand img.heimrat-logo,
#header .navbar-brand svg.heimrat-logo {
  display: block;
  height: 2.15rem;
  width: auto;
  max-width: 10.5rem;
}

#header .navbar-brand .heimrat-wordmark {
  font-family: "Barlow", "Segoe UI", system-ui, sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #f5f1ec;
}

.mobile-container .overlay {
  background: #262c33;
  color: #f5f1ec;
}

.mobile-container .overlay a {
  color: #f5f1ec;
}

/* Language switcher */
.langswitcher {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  list-style: none;
  margin: 0 0 0 1rem;
  padding: 0;
}

.langswitcher li {
  margin: 0;
}

.langswitcher a {
  display: inline-block;
  padding: 0.15rem 0.45rem;
  border-radius: 0.25rem;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  color: rgba(245, 241, 236, 0.7) !important;
  opacity: 1;
}

.langswitcher li.active a,
.langswitcher a[aria-current="true"] {
  color: #ffffff !important;
  background: color-mix(in oklab, var(--heimrat-terra) 55%, transparent);
}

.mobile-container .langswitcher {
  margin: 1.5rem 0 0;
  justify-content: center;
}

/* —— Page title —— */
#body-wrapper h1 {
  font-weight: 700;
  font-size: clamp(2rem, 4vw, 2.75rem);
}

#body-wrapper h2 {
  font-weight: 500;
  color: var(--heimrat-zinc);
  border: none;
}

/* —— FAQ accordion (details/summary) —— */
#body-wrapper details {
  background: var(--q2-bg-elev);
  border: 1px solid var(--q2-border);
  border-radius: 0.5rem;
  margin: 0 0 0.75rem;
  overflow: hidden;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

#body-wrapper details[open] {
  border-color: color-mix(in oklab, var(--heimrat-terra) 45%, var(--q2-border));
  box-shadow: 0 1px 0 color-mix(in oklab, var(--heimrat-terra) 18%, transparent);
}

#body-wrapper details summary {
  cursor: pointer;
  list-style: none;
  padding: 0.95rem 1.15rem;
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--q2-text-strong);
  background: var(--q2-bg-elev);
  position: relative;
  padding-right: 2.75rem;
}

#body-wrapper details summary::-webkit-details-marker {
  display: none;
}

#body-wrapper details summary::after {
  content: "";
  position: absolute;
  right: 1.15rem;
  top: 50%;
  width: 0.55rem;
  height: 0.55rem;
  border-right: 2px solid var(--heimrat-terra);
  border-bottom: 2px solid var(--heimrat-terra);
  transform: translateY(-65%) rotate(45deg);
  transition: transform 0.2s ease;
}

#body-wrapper details[open] summary::after {
  transform: translateY(-25%) rotate(225deg);
}

#body-wrapper details summary:hover {
  color: var(--heimrat-terra);
}

#body-wrapper details > *:not(summary) {
  padding-left: 1.15rem;
  padding-right: 1.15rem;
}

#body-wrapper details > *:not(summary):last-child {
  padding-bottom: 1.1rem;
}

/* List markers need room inside the card (overflow:hidden clips outside markers). */
#body-wrapper details > ol,
#body-wrapper details > ul {
  padding-left: 2.5rem;
  margin-left: 0;
  list-style-position: outside;
}

#body-wrapper details > ol > li,
#body-wrapper details > ul > li {
  padding-left: 0.25rem;
}

#body-wrapper details > p:first-of-type,
#body-wrapper details > ol:first-of-type,
#body-wrapper details > ul:first-of-type {
  margin-top: 0.25rem;
}

/* —— Notice boxes (shortcode-core) —— */
.sc-notice > div,
.sc-notice > div p,
.sc-notice > div li,
.sc-notice > div strong {
  color: #1c1917 !important;
}

.sc-notice.warning > div:first-child {
  border-top: 30px solid var(--heimrat-terra);
  background: #fde8e1;
}

.sc-notice.warning > div:first-child:after {
  content: "Achtung";
}

html[lang="en"] .sc-notice.warning > div:first-child:after {
  content: "Warning";
}

.sc-notice.info > div:first-child {
  border-top: 30px solid #d97706;
  background: #ffedd5;
}

.sc-notice.note > div:first-child {
  border-top: 30px solid var(--heimrat-teal);
  background: #d9f5f4;
}

.sc-notice.tip > div:first-child {
  border-top: 30px solid #16a34a;
  background: #dcfce7;
}

/* Buttons / primary accents */
.button,
button[type="submit"],
input[type="submit"],
a.button {
  background: var(--heimrat-terra);
  border-color: var(--heimrat-terra);
  color: #ffffff;
}

.button:hover,
button[type="submit"]:hover,
a.button:hover {
  background: var(--heimrat-terra-deep);
  border-color: var(--heimrat-terra-deep);
}

/* Footer */
#footer,
footer {
  background: #262c33;
  color: rgba(245, 241, 236, 0.75);
  border-top: none;
}

#footer a,
footer a {
  color: #f5f1ec;
  text-decoration: none;
}

#footer a:hover,
footer a:hover {
  color: var(--heimrat-terra);
}

#footer .heimrat-footer,
footer .heimrat-footer {
  margin: 0;
  text-align: center;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.01em;
}

#header .navbar-section.actions {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
}

#header .langswitcher {
  margin: 0;
}
