/* =====================================================
  styles.css – Projekt: skilift-lenz.ch
  Design, Umsetzung: patmueller.ch
  Hinweis: Reihenfolge & Struktur beachten
======================================================== */

/*	0. Fonts
________________________________________________________ */
@font-face {
  font-family: 'Barlow Condensed';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/barlow-condensed-500.woff2') format('woff2');
}

@font-face {
  font-family: 'Barlow Condensed';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/barlow-condensed-600.woff2') format('woff2');
}

@font-face {
  font-family: 'Barlow Condensed';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/barlow-condensed-700.woff2') format('woff2');
}

@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/dm-sans-400.woff2') format('woff2');
}

@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/dm-sans-500.woff2') format('woff2');
}

@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/dm-sans-600.woff2') format('woff2');
}

@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/dm-sans-700.woff2') format('woff2');
}


/* 1. Reset / Fixes
________________________________________________________ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; }
figure { margin: 0; }
img { display: block; max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; }
/* Die Float-Anordnung des Contao LayoutBuilders wird hier ersetzt. */
#container { display: block; }
#main { float: none; width: 100%; }
#main > .inside { margin: 0; padding: 0; }
#wrapper { width: 100%; max-width: none; margin: 0; }

/* 2. Farbdefinitionen / Grundmasse
________________________________________________________ */
:root {
  --navy: #102f50;
  --text: #405468;
  --ice: #e7f2f4;
  --blue: #b9e2ed;
  --green: #497969;
  --line: #dbe5e9;
  --white: #fff;
  --content-width: 1200px;
  --gutter: 48px;
}

/* 3. Typografie
________________________________________________________ */
body {
  font-family: 'DM Sans', sans-serif;
  font-weight: 400;
  font-size: 18px;
  line-height: 1.7;
  color: var(--text);
  background: var(--white);
}
h1, h2, h3, h4, h5, h6 {
  margin: 0 0 24px;
  color: var(--navy);
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 600;
  line-height: 1.05;
  overflow-wrap: break-word;
  font-kerning: normal;
  font-variant-ligatures: common-ligatures;
}
h1 { font-size: clamp(56px, 6.5vw, 94px); letter-spacing: normal; }
h2 { font-size: clamp(40px, 4vw, 60px); letter-spacing: normal; }
h3 { font-size: 34px; }
h4, h5, h6 { font-size: 26px; }
h1 .headline-eyebrow {
  display: block;
  margin-bottom: 20px;
  color: var(--green);
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: .14em;
  text-transform: uppercase;
}
p { margin: 0 0 1.15em; }
p:last-child { margin-bottom: 0; }
strong { font-weight: 700; }

/* 4. Header
________________________________________________________ */
#header { position: relative; z-index: 10; background: var(--white); border-bottom: 1px solid var(--line); }
#header > .inside {
  width: min(var(--content-width), calc(100% - 2 * var(--gutter)));
  margin-inline: auto;
  min-height: 120px;
  padding-block: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 36px;
}
.site-logo { display: block; flex: 0 1 330px; }
.site-logo img { width: 100%; height: auto; }

/* 5. Navigation
________________________________________________________ */
/* 5.1 Metanavigation: bei Bedarf ergänzen. */
/* 5.2 Hauptnavigation */
.main-navigation { flex: 0 1 auto; overflow: visible; }
.main-navigation ul { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 28px; margin: 0; padding: 0; list-style: none; }
.main-navigation li { margin: 0; padding: 0; }
.main-navigation .level_1 > li > a,
.main-navigation .level_1 > li > strong {
  display: block;
  position: relative;
  padding: 12px 0;
  color: var(--navy);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  text-decoration: none;
}
.main-navigation .level_1 > li > a::after,
.main-navigation .level_1 > li > strong::after {
  content: ''; position: absolute; inset: auto 0 3px;
  height: 2px; background: var(--green);
  transform: scaleX(0); transform-origin: left;
  transition: transform .2s ease;
}
.main-navigation .level_1 > li > a:hover::after,
.main-navigation .level_1 > li > a:focus-visible::after,
.main-navigation .level_1 > li > .active::after,
.main-navigation .level_1 > li > .trail::after { transform: scaleX(1); }
/* 5.3 Mobile: vorläufig offen und umgebrochen; Menüschalter folgt separat. */

/* 6. Container / Artikel
________________________________________________________ */
#main > .inside > .mod_article {
  width: min(var(--content-width), calc(100% - 2 * var(--gutter)));
  margin-inline: auto;
  padding-block: 88px;
}
#main > .inside > .page-intro { padding-top: 88px; padding-bottom: 72px; }
.page-intro h1 { max-width: 900px; }
.page-intro .content-text { max-width: 790px; font-size: 21px; line-height: 1.65; }

/* 7. Buttons & Links
________________________________________________________ */
a { color: var(--navy); text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { color: var(--green); }
a:focus-visible, button:focus-visible { outline: 3px solid var(--green); outline-offset: 5px; }
#main .content-hyperlink { display: inline-block; margin: 26px 16px 0 0; overflow: visible; }
#main .content-hyperlink a {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 22px; min-height: 54px; padding: 14px 22px;
  background: var(--navy); color: var(--white);
  border: 1px solid var(--navy); border-radius: 4px;
  font-size: 15px; font-weight: 600; line-height: 1.5;
  text-decoration: none; transition: background .2s ease, border-color .2s ease;
}
#main .content-hyperlink a::after { content: '↗'; font-size: 20px; line-height: 1; }
#main .content-hyperlink a:hover { background: var(--green); border-color: var(--green); }

/* 8. Content
________________________________________________________ */
/* 8.1 Wiederverwendbare Spalten
   Auf Elementgruppen setzen. Jedes direkte Kind bildet eine Spalte.
   Mehrere Elemente je Spalte in einer weiteren Elementgruppe bündeln.
   winter-experience bleibt als kompatible bisherige Variante bestehen. */
.content-element-group.col-half,
.content-element-group.col-third,
#main > .inside > .winter-experience {
  display: grid;
  align-items: start;
  gap: 48px;
}
.content-element-group.col-half,
#main > .inside > .winter-experience {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.content-element-group.col-third {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.content-element-group:is(.col-half, .col-third) > *,
.winter-experience > * { min-width: 0; }
/* Zeilenabstand auch zwischen getrennten Gruppen, z.B. Geschichte. */
.content-element-group + .content-element-group { margin-top: 48px; }
.content-element-group:is(.col-half, .col-third) .content-image {
  border-radius: 6px; overflow: hidden;
}
.content-element-group:is(.col-half, .col-third) .content-image img {
  width: 100%; height: auto;
}
#main > .inside > .winter-experience {
  align-items: center; padding-top: 0; padding-bottom: 88px;
}
.winter-experience .content-image { border-radius: 6px; overflow: hidden; }
.winter-experience .content-image img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.winter-experience .content-text { padding-block: 16px; }

/* 8.2 Besucherinformationen / Zwischenüberschriften */
#main > .inside > .visitor-info {
  background: var(--ice); padding: 52px 56px 56px;
  margin-bottom: 48px; border-radius: 6px;
}
.visitor-info .content-text:not(.ce_accordion) { max-width: 790px; }
/* Einzelne Inhaltselemente sowie Überschriften innerhalb eines Textes. */
.visitor-info > .content-text:not(.ce_accordion) + .content-text:not(.ce_accordion),
.visitor-info > .content-headline:not(:first-child) { margin-top: 36px; }
.visitor-info .rte > h3:not(:first-child) { margin-top: 36px; }
.visitor-info h3 { margin-bottom: 14px; line-height: 1.15; }

/* 8.3 Tabellen: feine Linien, gut vergleichbare Preis-Spalten */
.content-table { min-width: 0; overflow-x: auto; }
.content-table table {
  width: 100%; border-collapse: collapse;
  font-size: 16px; line-height: 1.5;
  font-variant-numeric: lining-nums tabular-nums;
}
.content-table th, .content-table td {
  padding: 14px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left; vertical-align: top;
}
.content-table thead th {
  color: var(--navy); font-weight: 600;
  background: var(--ice); border-bottom-color: #b7cbd2;
}
.content-table th:first-child, .content-table td:first-child { padding-left: 16px; }
.content-table th:last-child, .content-table td:last-child { padding-right: 16px; }
.content-table th:not(:first-child), .content-table td:not(:first-child) {
  text-align: right; white-space: nowrap;
}
.content-table tbody tr:last-child td { border-bottom-color: #b7cbd2; }

/* 8.4 Klassische Contao-Akkordeons: Single und Wrapper identisch.
   Öffnen/Schliessen übernimmt Contao (js_accordion), nicht diese CSS. */
.ce_accordion {
  margin: 0;
  border-bottom: 1px solid #102f5030;
  overflow: visible;
}
.ce_accordion:not(.ce_accordion + .ce_accordion) { border-top: 1px solid #102f5030; }
.ce_accordion > .toggler {
  position: relative; padding: 23px 56px 23px 0;
  color: var(--navy); cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  font-size: 18px; font-weight: 600; line-height: 1.5;
}
.ce_accordion > .toggler::before,
.ce_accordion > .toggler::after {
  content: ''; position: absolute; right: 14px; top: 50%;
  width: 16px; height: 2px; background: var(--green);
}
.ce_accordion > .toggler::after { transform: rotate(90deg); transition: transform .2s ease; }
.ce_accordion > .toggler:is(.active, .ui-state-active, [aria-expanded="true"])::after {
  transform: rotate(0deg);
}
.ce_accordion > .toggler:hover { color: var(--green); }
.ce_accordion > .toggler:focus-visible {
  outline: 3px solid var(--green); outline-offset: -3px;
}
.ce_accordion > .accordion > div { padding: 0 0 28px; }
.ce_accordion .content-text { max-width: none; }
.ce_accordion .accordion p:last-child { margin-bottom: 0; }

/* Der erzeugte Button übernimmt die gesamte Klickfläche. */
.ce_accordion > .toggler {
  padding: 0;
}

.ce_accordion > .toggler > button {
  display: block;
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  margin: 0;
  padding: 23px 56px 23px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

/* Das Plus/Minus lässt Klicks zum Button durch. */
.ce_accordion > .toggler::before,
.ce_accordion > .toggler::after {
  pointer-events: none;
}

.ce_accordion > .toggler > button:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: -3px;
}

/* Minus bereits während des Öffnens anzeigen. */
.ce_accordion > .toggler.open::after {
  transform: rotate(0deg);
}

@media (max-width: 767px) {
  .ce_accordion > .toggler > button {
	padding-block: 20px;
  }
}

/* 9. Footer
________________________________________________________ */
#footer { color: var(--white); background: var(--navy); }
#footer > .inside {
  width: min(var(--content-width), calc(100% - 2 * var(--gutter)));
  margin-inline: auto; padding-block: 64px 32px;
  display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: 28px 72px;
}
#footer .content-text:first-child { grid-column: 1; grid-row: 1; }
#footer .content-text:nth-child(2) { grid-column: 2; grid-row: 1; }
#footer .content-text:first-child p:first-child {
  max-width: 480px; margin-bottom: 18px;
  font-family: 'Barlow Condensed', sans-serif; font-size: 44px; font-weight: 600; line-height: 1.1;
}
#footer .content-text { font-size: 16px; }
#footer .content-text:first-child p + p { color: var(--blue); }
#footer a { color: var(--white); }
#footer a:hover { color: var(--blue); }
#footer a:focus-visible { outline-color: var(--blue); }
#footer .content-hyperlink { font-size: 13px; padding-top: 24px; border-top: 1px solid #ffffff35; }
#footer .content-hyperlink a { text-decoration: none; }

/* 10. Utilities / Helferklassen
________________________________________________________ */
.invisible {
  position: absolute; width: 1px; height: 1px; padding: 0;
  margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0);
  clip-path: inset(50%); white-space: nowrap; border: 0;
}
a.invisible:focus {
  width: auto; height: auto; margin: 0; clip: auto; clip-path: none;
  top: 8px; left: 8px; padding: 12px 18px;
  background: var(--white); color: var(--navy); z-index: 100;
}

/* 11. Responsive Anpassungen
________________________________________________________ */
@media (max-width: 1100px) {
  :root { --gutter: 32px; }
  #header > .inside { gap: 24px; }
  .site-logo { flex-basis: 270px; }
  .main-navigation ul { gap: 8px 20px; }
  .content-element-group:is(.col-half, .col-third),
  #main > .inside > .winter-experience { gap: 32px; }
}
@media (max-width: 900px) {
  #header > .inside { flex-wrap: wrap; gap: 12px; padding-block: 22px 12px; }
  .site-logo { flex: 0 1 290px; }
  .main-navigation { flex-basis: 100%; }
  .main-navigation ul { gap: 4px 24px; }
  #main > .inside > .mod_article { padding-block: 60px; }
  #main > .inside > .page-intro { padding-bottom: 48px; }
  #main > .inside > .winter-experience { padding-top: 0; gap: 32px; }
  #main > .inside > .visitor-info { padding: 40px; margin-bottom: 32px; }
  .content-element-group.col-third { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 767px) {
  :root { --gutter: 24px; }
  body { font-size: 17px; }
  h1 { font-size: clamp(48px, 10vw, 72px); }
  h2 { font-size: 42px; }
  .page-intro .content-text { font-size: 19px; }
  .content-element-group.col-half,
  .content-element-group.col-third,
  #main > .inside > .winter-experience { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .content-element-group + .content-element-group { margin-top: 36px; }
  .content-table table { font-size: 14px; }
  .content-table th, .content-table td { padding: 12px 8px; }
  .content-table th:first-child, .content-table td:first-child { padding-left: 8px; }
  .content-table th:last-child, .content-table td:last-child { padding-right: 8px; }
  .ce_accordion > .toggler { font-size: 17px; }
  .winter-experience .content-text { padding: 0; }
  #main > .inside > .visitor-info { padding: 32px 24px; }
  #main .content-hyperlink { display: block; margin: 20px 0 0; }
  #main .content-hyperlink + .content-hyperlink { margin-top: 12px; }
  #main .content-hyperlink a { width: 100%; gap: 16px; justify-content: space-between; }
  #footer > .inside { grid-template-columns: minmax(0, 1fr); gap: 28px; padding-block: 48px 28px; }
  #footer .content-text:nth-child(2) { grid-column: 1; grid-row: 2; }
  #footer .content-text:first-child p:first-child { font-size: 40px; }
  #footer .content-hyperlink { padding-top: 18px; }
  #footer .content-hyperlink + .content-hyperlink { border-top: 0; padding-top: 0; margin-top: -12px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
