/* =========================================================
   westphal-schiffahrt.de – Design für Cassiopeia (Child)
   Datei: media/templates/site/cassiopeia_child/css/user.css
   Palette: Nacht #0f161c · Stahl #1b2630 · Linie #34424d
            Messing #c9a45c · Text #e8e4da · Gedämpft #a3afb8
   Schriften: nur Systemschriften (keine Google Fonts, DSGVO-sicher)
   ========================================================= */

:root {
  --ws-night: #0f161c;
  --ws-steel: #1b2630;
  --ws-line: #34424d;
  --ws-brass: #c9a45c;
  --ws-brass-light: #e2c581;
  --ws-text: #e8e4da;
  --ws-muted: #a3afb8;

  --ws-serif: "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --ws-sans: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;

  /* Cassiopeia-Variablen umbiegen */
  --cassiopeia-color-primary: var(--ws-steel);
  --cassiopeia-color-hover: var(--ws-brass);
  --cassiopeia-color-link: var(--ws-brass);
  --bs-body-color: var(--ws-text);
  --bs-link-color: var(--ws-brass);
  --bs-link-hover-color: var(--ws-brass-light);
  --bs-border-color: var(--ws-line);
}

/* ---------- Grundlage ---------- */
html {
  background: var(--ws-night);
}

body {
  background: transparent;
  color: var(--ws-text);
  font-family: var(--ws-sans);
  font-size: 1.0625rem;
  line-height: 1.65;
}

h1, h2, h3, h4, h5, h6,
.page-header h1,
.page-header h2 {
  font-family: var(--ws-serif);
  font-weight: 600;
  color: var(--ws-text);
  letter-spacing: 0.01em;
}

h1 { font-size: 2.1rem; line-height: 1.2; }
h2 { font-size: 1.6rem; line-height: 1.25; }
h3 { font-size: 1.3rem; }

a { color: var(--ws-brass); }
a:hover, a:focus { color: var(--ws-brass-light); }

a:focus-visible,
button:focus-visible,
.btn:focus-visible {
  outline: 2px solid var(--ws-brass-light);
  outline-offset: 2px;
}

/* ---------- Header + Wasserlinie ---------- */
.container-header {
  background-color: rgba(15, 22, 28, 0.62);
  background-image: none;
  border-bottom: 2px solid var(--ws-brass);
  box-shadow: none;
  position: relative;
  z-index: 5;
}

.container-header .navbar-brand,
.container-header .navbar-brand a,
.container-header .site-description {
  color: var(--ws-text);
  font-family: var(--ws-serif);
}

.container-header .brand-logo img {
  max-height: 80px;
  width: auto;
}

/* ---------- Hauptmenü (Position "menu") ---------- */
.container-header .mod-menu a,
.container-header .mod-menu span.mod-menu__heading {
  color: var(--ws-text);
  font-family: var(--ws-sans);
  font-weight: 500;
  padding: 0.6rem 0.9rem;
  text-decoration: none;
  transition: color 0.15s ease;
}

.container-header .mod-menu a:hover,
.container-header .mod-menu a:focus,
.container-header .mod-menu .active > a,
.container-header .mod-menu .current > a {
  color: var(--ws-brass-light);
  background: transparent;
}

.container-header .mod-menu .current > a,
.container-header .mod-menu .active > a {
  box-shadow: inset 0 -2px 0 var(--ws-brass);
}

/* Untermenüs (Dropdown) */
.container-header .mod-menu ul,
.container-header .metismenu .mm-collapse {
  background: var(--ws-steel);
  border: 1px solid var(--ws-line);
  border-top: 2px solid var(--ws-brass);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.45);
  min-width: 12rem;
  z-index: 20;
}

.container-header .mod-menu ul a {
  display: block;
  white-space: nowrap;
}

/* ---------- Inhaltsfläche über dem Foto ---------- */
.container-component,
.container-top-a,
.container-top-b,
.container-bottom-a,
.container-bottom-b,
.container-main-top,
.container-main-bottom,
.container-breadcrumbs {
  background: rgba(8, 12, 16, 0.66);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}

.container-component {
  padding: 1.5rem 1.75rem;
  margin-top: 1.25rem;
  margin-bottom: 1.25rem;
  border: 1px solid var(--ws-line);
  border-radius: 3px;
}

/* Lesbare Zeilenlänge für Fließtext 
.com-content-article__body,
.item-page,
.blog-item {
  max-width: 75ch;
}
*/
.com-content-article__body,
.item-page,
.blog-item {
  max-width: 100ch;
}

.item-page,
.blog-item {
  margin-left: auto;
  margin-right: auto;
}

.page-header {
  border-bottom: 1px solid var(--ws-line);
  margin-bottom: 1.25rem;
  padding-bottom: 0.5rem;
}

/* Module in Seitenleisten */
.card {
  background: rgba(27, 38, 48, 0.75);
  border: 1px solid var(--ws-line);
  color: var(--ws-text);
}

.card-header {
  background: transparent;
  border-bottom: 1px solid var(--ws-line);
  font-family: var(--ws-serif);
  color: var(--ws-text);
}

/* ---------- Bilder (Phoca Gallery, Artikelbilder) ---------- */
.container-component img {
  max-width: 100%;
  height: auto;
}

.container-component img.img-fluid,
.com-content-article__body img,
.pg-image-box img {
  border: 1px solid var(--ws-line);
}

/* ---------- Formulare (z. B. Gästebuch) ---------- */
.form-control,
.form-select,
input[type="text"],
input[type="email"],
textarea {
  background: #141d25;
  color: var(--ws-text);
  border: 1px solid var(--ws-line);
}

.form-control:focus,
.form-select:focus,
textarea:focus {
  background: #141d25;
  color: var(--ws-text);
  border-color: var(--ws-brass);
  box-shadow: 0 0 0 0.2rem rgba(201, 164, 92, 0.25);
}

::placeholder { color: var(--ws-muted); }

.btn-primary,
button.btn-primary {
  background: var(--ws-brass);
  border-color: var(--ws-brass);
  color: #14100a;
  font-weight: 600;
}

.btn-primary:hover,
.btn-primary:focus {
  background: var(--ws-brass-light);
  border-color: var(--ws-brass-light);
  color: #14100a;
}

.btn-secondary {
  background: var(--ws-steel);
  border-color: var(--ws-line);
  color: var(--ws-text);
}

/* ---------- Tabellen ---------- */
.table {
  --bs-table-bg: transparent;
  --bs-table-color: var(--ws-text);
  --bs-table-border-color: var(--ws-line);
  --bs-table-striped-bg: rgba(255, 255, 255, 0.03);
}

/* ---------- Breadcrumbs, Footer ---------- */
.breadcrumb { margin-bottom: 0; }
.breadcrumb-item,
.breadcrumb-item.active { color: var(--ws-muted); }

.container-footer,
.footer {
  background: rgba(15, 22, 28, 0.78);
  border-top: 1px solid var(--ws-line);
  color: var(--ws-muted);
}

.container-footer a,
.footer a { color: var(--ws-muted); }
.container-footer a:hover,
.footer a:hover { color: var(--ws-brass-light); }

/* =========================================================
   Hintergrund-Slideshow – Bilderwechsel steuert user.js
   (zufällige Reihenfolge bei jedem Seitenaufruf).
   Hier nur das Aussehen der zwei Bildebenen.
   ========================================================= */
.ws-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: var(--ws-night);
  pointer-events: none;
}

.ws-bg__layer {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  filter: brightness(0.8);
  opacity: 0;
  transition: opacity 2s ease-in-out;
}

.ws-bg__layer.is-on { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  .ws-bg__layer { transition: none; }
}

/* ---------- Mobil ---------- */
@media (max-width: 767.98px) {
  body { font-size: 1rem; }
  h1 { font-size: 1.7rem; }
  .container-component { padding: 1rem; }
  .container-header .brand-logo img { max-height: 56px; }
}

/* =========================================================
   Korrekturen: Titel, Menü-Pfeile neben dem Titel
   ========================================================= */
.container-header .navbar-brand,
.container-header .navbar-brand a {
  font-size: 1.9rem;
  font-weight: 700;
  text-decoration: none;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.75);
}

.container-header .metismenu.mod-menu {
  align-items: center;
}

.container-header .metismenu.mod-menu > li {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  position: relative;
}

.container-header .metismenu.mod-menu > li > a,
.container-header .metismenu.mod-menu > li > span {
  flex: 0 0 auto;
}

/* Pfeil-Button direkt rechts neben dem Titel */
.container-header .metismenu.mod-menu > li > .mm-toggler {
  position: static;
  flex: 0 0 auto;
  margin-left: -0.6rem;
  padding: 0.5rem 0.6rem 0.5rem 0.2rem;
  background: transparent;
  border: 0;
  color: var(--ws-brass);
}

/* Untermenü schwebt unter dem Menüpunkt, schiebt nichts nach unten */
.container-header .metismenu.mod-menu > li > ul.mm-collapse {
  position: absolute;
  top: 100%;
  left: 0;
}

/* =========================================================
   Bildraster für Galerieseiten (Klasse "ws-grid")
   ========================================================= */
.ws-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.75rem;
  margin: 1.25rem 0;
}

.ws-grid a {
  display: block;
  overflow: hidden;
  border: 1px solid var(--ws-line);
  background: var(--ws-steel);
}

.ws-grid img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 0;
  transition: transform 0.3s ease, filter 0.3s ease;
}

.ws-grid a:hover img,
.ws-grid a:focus-visible img {
  transform: scale(1.04);
  filter: brightness(1.08);
}

/* Artikel mit Raster darf die volle Breite nutzen */
.com-content-article__body:has(.ws-grid),
.item-page:has(.ws-grid) {
  max-width: none;
}

@media (prefers-reduced-motion: reduce) {
  .ws-grid img { transition: none; }
  .ws-grid a:hover img,
  .ws-grid a:focus-visible img { transform: none; }
}

/* =========================================================
   Seiten ohne Inhaltsfläche (Startseite u. a.)
   Gilt nur für Menüeinträge mit der Seitenklasse "seite-transparent"
   ========================================================= */
body.seite-transparent .container-component {
  background: transparent;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  border: 0;
  box-shadow: none;
}

body.seite-transparent .page-header {
  border-bottom: 0;
}

/* Startseite: volle Breite, Gruß in einer Zeile */
body.seite-transparent .com-content-article__body,
body.seite-transparent .item-page,
body.seite-transparent .blog-item {
  max-width: none;
}

body.seite-transparent .com-content-article__body h1 {
  white-space: nowrap;
  text-align: center;
}

body.seite-transparent .com-content-article__body h1 span {
  font-size: clamp(16px, 2.6vw, 36px) !important;
}

/* Lesbarkeit ohne Fläche: dezenter Schatten hinter der Schrift */
body.seite-transparent .container-component h1,
body.seite-transparent .container-component h2,
body.seite-transparent .container-component h3,
body.seite-transparent .container-component p {
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9), 0 2px 12px rgba(0, 0, 0, 0.7);
}

/* Optional: Hintergrundfotos auf diesen Seiten ungedimmt zeigen
body.seite-transparent .ws-bg__layer { filter: none; }
*/

/* =========================================================
   Weihnachtsdeko (Seitenklasse "weihnacht", gesteuert von user.js)
   Lichterkette: Tannengrün mit roten Schleifen und Lichtern
   ========================================================= */
.ws-garland {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  height: calc(46px * var(--garland-scale));
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='46' viewBox='0 0 160 46'%3E%3Cpath d='M0,6 Q80,40 160,6' fill='none' stroke='%2314402a' stroke-width='9'/%3E%3Cpath d='M0,6 Q80,40 160,6' fill='none' stroke='%231f5d3b' stroke-width='6'/%3E%3Cpath d='M0,5 Q80,39 160,5' fill='none' stroke='%232f7d50' stroke-width='3' stroke-dasharray='2 4'/%3E%3Ccircle cx='0' cy='6' r='5' fill='%23b3262e'/%3E%3Ccircle cx='160' cy='6' r='5' fill='%23b3262e'/%3E%3C/svg%3E");
  background-repeat: repeat-x;
  background-size: calc(160px * var(--garland-scale)) calc(46px * var(--garland-scale));
  --garland-scale: 1.3; /* Größe der Girlande samt Sternen: 1 = klein, 1.5 = groß */
  --star: calc(18px * var(--garland-scale));
}

/* Sterne statt Glühbirnen: Hülle trägt das Leuchten, ::before die Sternform */
.ws-garland__bulb {
  position: absolute;
  width: var(--star);
  height: var(--star);
  margin-left: calc(var(--star) / -2);
  filter: drop-shadow(0 0 4px currentColor);
  animation: ws-twinkle 2.2s ease-in-out infinite;
}

.ws-garland__bulb::before {
  content: "";
  position: absolute;
  inset: 0;
  background: currentColor;
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}

.ws-garland__bulb:nth-child(4n+1) { color: #ffd45e; }
.ws-garland__bulb:nth-child(4n+2) { color: #ff5a4f; }
.ws-garland__bulb:nth-child(4n+3) { color: #6ec6ff; }
.ws-garland__bulb:nth-child(4n+4) { color: #fff3d6; }

.ws-garland__bulb:nth-child(3n)   { animation-delay: -0.7s; }
.ws-garland__bulb:nth-child(5n+2) { animation-delay: -1.4s; animation-duration: 1.7s; }

@keyframes ws-twinkle {
  0%, 100% { opacity: 1;   transform: scale(1); }
  50%      { opacity: 0.4; transform: scale(0.88); }
}

/* Schnee-Ebene über der Seite, Klicks gehen hindurch */
.ws-snow {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 10;
  pointer-events: none;
}

/* Platz für die Girlande über dem Inhalt */
body.ws-xmas .container-component {
  margin-top: 4.25rem;
}

@media (prefers-reduced-motion: reduce) {
  .ws-garland__bulb { animation: none; }
}
