/* ==========================================================================
   Schwimmkurse Oberland - Stylesheet
   Rebuilt from the original Jimdo site (theme "Ocean").
   ========================================================================== */

@import url("../fonts/fonts.css");

/* --------------------------------------------------------------------------
   Design tokens (taken from the original colour palette / font set)
   -------------------------------------------------------------------------- */
:root {
  --color-black: #000000;
  --color-white: #ffffff;
  --color-shade1: #318190;        /* dark petrol - hero / banner backgrounds */
  --color-shade2: #82cad9;        /* light petrol */
  --color-main: #d1ebf0;          /* pale blue */
  --color-secondary: #26b3cf;
  --color-text: #323335;          /* body text on light backgrounds */

  --font-headline: "Rubik", "Helvetica Neue", Arial, sans-serif;
  --font-copy: "Martel", Georgia, "Times New Roman", serif;
  --weight-headline: 500;
  --weight-headline-bold: 700;

  --header-height: 72px;
  --content-width: 900px;
  --radius-button: 25px;
}

/* --------------------------------------------------------------------------
   Reset / base
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-copy);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-white);
  overflow-x: hidden;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
}

/* Headlines use the headline font; sizes follow the original scale. */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-headline);
  font-weight: var(--weight-headline);
  margin: 0 0 0.4em;
  line-height: 1.3;
}

h1 { font-size: 40px; }
h2 { font-size: 28px; }
h3, h4, h5, h6 { font-size: 16px; }

p,
li {
  font-size: 16px;
  margin: 0 0 1em;
}

ul {
  padding-left: 1.2em;
  margin: 0 0 1em;
}

li { margin-bottom: 0.35em; }

/* The original scales type down on narrower screens. */
@media (max-width: 1280px) {
  h1 { font-size: 32px; }
  h2 { font-size: 20px; }
  h3, h4, h5, h6 { font-size: 14px; }
  p, li { font-size: 14px; }
}

.text-align-center { text-align: center; }
.text-align-right  { text-align: right; }

/* Utility to hide content visually but keep it for screen readers. */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* --------------------------------------------------------------------------
   Header / navigation
   A solid bar in the petrol brand colour sitting above the content. The
   original floated transparently over the first section, which left the menu
   unreadable wherever an image or a light area was underneath it.
   -------------------------------------------------------------------------- */
.site-header {
  position: relative;
  width: 100%;
  height: var(--header-height);
  z-index: 100;
  background: var(--color-shade1);
  color: var(--color-white);
}

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

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  height: var(--header-height);
  padding: 0 20px;
}

.site-nav {
  display: flex;
  align-items: center;
  flex: 1 1 auto;
  min-width: 0;
}

.site-nav__list {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 22px;
  width: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Overflow menu: items that do not fit move into a "Mehr" dropdown,
   mirroring the behaviour of the original navigation. */
.site-nav__more { position: relative; flex: 0 0 auto; }

.site-nav__more[hidden] { display: none; }

.site-nav__more-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 0;
  border: 0;
  background: transparent;
  color: inherit;
  font-family: var(--font-copy);
  font-size: 15px;
  line-height: 1.4;
  cursor: pointer;
}

.site-nav__more-toggle:hover { text-decoration: underline; }

.site-nav__more-toggle::after {
  content: "";
  width: 6px;
  height: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform 0.2s ease;
}

.site-nav__more[data-open="true"] .site-nav__more-toggle::after {
  transform: translateY(1px) rotate(-135deg);
}

.site-nav__more-list {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  z-index: 10;
  display: none;
  min-width: 260px;
  margin: 0;
  padding: 8px 0;
  list-style: none;
  background: var(--color-black);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
}

.site-nav__more[data-open="true"] .site-nav__more-list { display: block; }

.site-nav__more-list a {
  display: block;
  padding: 11px 22px;
  color: var(--color-white);
  font-family: var(--font-copy);
  font-size: 15px;
  text-decoration: none;
  white-space: nowrap;
}

.site-nav__more-list a:hover { background: rgba(255, 255, 255, 0.12); }

/* Full opacity on purpose: the menu sits on the petrol brand colour, where
   even slight transparency pushes the contrast below the readable range. */
.site-nav__link {
  display: inline-block;
  padding: 4px 0;
  font-family: var(--font-copy);
  font-size: 15px;
  line-height: 1.4;
  text-decoration: none;
  white-space: nowrap;
}

.site-nav__link:hover,
.site-nav__link:focus-visible {
  text-decoration: underline;
}

.site-nav__link--active {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.site-header__brand {
  font-family: var(--font-copy);
  font-size: 16px;
  text-decoration: none;
  white-space: nowrap;
}


/* Mobile navigation toggle (hidden on desktop). */
.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.nav-toggle__bar,
.nav-toggle__bar::before,
.nav-toggle__bar::after {
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle__bar { position: relative; }

.nav-toggle__bar::before,
.nav-toggle__bar::after {
  content: "";
  position: absolute;
  left: 0;
}

.nav-toggle__bar::before { top: -7px; }
.nav-toggle__bar::after  { top: 7px; }

.nav-toggle[aria-expanded="true"] .nav-toggle__bar { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar::before { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar::after  { transform: translateY(-7px) rotate(-45deg); }

/* Below 1100px the menu collapses into a black dropdown, as in the original. */
@media (max-width: 1100px) {
  .nav-toggle { display: flex; }

  .site-nav {
    position: absolute;
    top: var(--header-height);
    left: 0;
    width: 100%;
    max-height: 0;
    overflow: hidden;
    background: var(--color-black);
    transition: max-height 0.28s ease;
  }

  .site-nav[data-open="true"] { max-height: 80vh; overflow-y: auto; }

  .site-nav__list {
    flex-direction: column;
    align-items: flex-start;
    flex-wrap: nowrap;
    gap: 0;
    padding: 8px 0;
    width: 100%;
  }

  .site-nav__list li { width: 100%; }

  /* The hamburger replaces the overflow menu on small screens. */
  .site-nav__more { display: none; }

  .site-nav__link {
    display: block;
    width: 100%;
    padding: 12px 24px;
    font-size: 16px;
  }
}

/* --------------------------------------------------------------------------
   Sections & layout primitives
   -------------------------------------------------------------------------- */
.section {
  position: relative;
}

/* Background colour variants matching the original palette names. */
.bg-shade1    { background-color: var(--color-shade1); color: var(--color-white); }
.bg-shade2    { background-color: var(--color-shade2); }
.bg-main      { background-color: var(--color-main); }
.bg-white     { background-color: var(--color-white); }
.bg-black     { background-color: var(--color-black); color: var(--color-white); }

.bg-shade1 h1, .bg-shade1 h2, .bg-shade1 h3,
.bg-shade1 h4, .bg-shade1 h5, .bg-shade1 h6,
.bg-black  h1, .bg-black  h2, .bg-black  h3 { color: var(--color-white); }

/* Centred content column - 900px wide, as measured on the original. */
.container {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 60px 20px;
}

/* Kept as a hook: the header is a solid bar in the flow, so no extra
   offset is needed any more. */
.container--below-header { padding-top: 60px; }

/* --------------------------------------------------------------------------
   Split layout: half colour / half image, full viewport height
   Used by the home hero, "Feuerwehr / Polizei" and "Kontakt".
   -------------------------------------------------------------------------- */
.split {
  display: flex;
  min-height: calc(100vh - var(--header-height));
}

.split__panel {
  position: relative;
  flex: 1 1 50%;
  min-width: 0;
}

.split__media {
  position: relative;
  overflow: hidden;
}

.split__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.split__content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100%;
  min-height: calc(100vh - var(--header-height));
  padding: 40px 60px 60px;
}

.split__content--center { text-align: center; align-items: center; }

.split__content-inner { width: 100%; max-width: 520px; }

/* Media on the left, content on the right. */
.split--media-first .split__media { order: -1; }

@media (max-width: 900px) {
  .split { flex-direction: column; min-height: 0; }

  .split__media { min-height: 55vh; }

  .split__content,
  .split__content--center {
    min-height: 0;
    padding: 48px 24px 56px;
  }

  .split--media-first .split__media { order: 0; }

  /* On mobile the hero keeps its full-height look. */
  .split--hero .split__content { min-height: 60vh; justify-content: center; }
}

/* Scroll-down arrow at the bottom of the hero. */
.scroll-arrow {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--color-white);
  line-height: 0;
  opacity: 0.9;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.scroll-arrow:hover { opacity: 1; transform: translateX(-50%) translateY(3px); }

/* --------------------------------------------------------------------------
   Banner: image on one side, text on the other (home "Lebenslauf")
   -------------------------------------------------------------------------- */
.banner { display: flex; align-items: stretch; }

.banner__media { flex: 1 1 50%; min-width: 0; }

.banner__media img { width: 100%; height: 100%; object-fit: cover; }

.banner__body {
  flex: 1 1 50%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 70px 60px;
}

.banner__body-inner { max-width: 600px; }

@media (max-width: 900px) {
  .banner { flex-direction: column; }
  .banner__media { min-height: 300px; }
  .banner__body { padding: 44px 24px; }
}

/* --------------------------------------------------------------------------
   Full-bleed background image with centred text (page "Abrechnung")
   -------------------------------------------------------------------------- */
.hero-image {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - var(--header-height));
  overflow: hidden;
}

.hero-image__bg {
  position: absolute;
  inset: 0;
}

.hero-image__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Slight scrim keeps the copy legible on top of the photo. */
.hero-image__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.72);
}

.hero-image__content {
  position: relative;
  max-width: 780px;
  padding: 40px 24px 60px;
  text-align: center;
}

@media (max-width: 900px) {
  .hero-image { min-height: 0; }
  .hero-image__content { padding: 32px 20px 48px; }
}

/* --------------------------------------------------------------------------
   Stacked cover: heading + text on top, wide image below ("Mach mit")
   -------------------------------------------------------------------------- */
.cover-stack {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - var(--header-height));
}

.cover-stack__top {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  gap: 40px;
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
  padding: 50px 24px 40px;
}

.cover-stack__title { flex: 1 1 45%; }

.cover-stack__title h1 { font-size: 56px; margin: 0; }

.cover-stack__text { flex: 1 1 55%; }

.cover-stack__media { flex: 0 0 auto; }

.cover-stack__media img {
  width: 100%;
  max-height: 46vh;
  object-fit: cover;
}

@media (max-width: 1280px) {
  .cover-stack__title h1 { font-size: 36px; }
}

@media (max-width: 900px) {
  .cover-stack { min-height: 0; }
  .cover-stack__top { flex-direction: column; align-items: flex-start; gap: 16px; padding: 32px 20px 32px; }
  .cover-stack__media img { max-height: none; }
}

/* --------------------------------------------------------------------------
   Card grid (services, bathing rules, team)
   -------------------------------------------------------------------------- */
.cards {
  display: grid;
  gap: 30px;
  margin-top: 26px;
}

.cards--3 { grid-template-columns: repeat(3, 1fr); }
.cards--4 { grid-template-columns: repeat(4, 1fr); }
.cards--5 { grid-template-columns: repeat(5, 1fr); }

.card__media {
  margin-bottom: 14px;
  overflow: hidden;
}

.card__media img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

/* Portrait imagery (team, bathing rules) keeps its taller crop. */
.cards--portrait .card__media img { aspect-ratio: 3 / 4; }

.card h3 {
  margin-bottom: 0.5em;
  font-size: 16px;
}

.card p,
.card li { font-size: 14px; }

.card ul { padding-left: 1.1em; }

@media (max-width: 1100px) {
  .cards--5, .cards--4 { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 800px) {
  .cards { gap: 24px; }
  .cards--5, .cards--4, .cards--3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 520px) {
  .cards--5, .cards--4, .cards--3 { grid-template-columns: 1fr; }
}

/* --------------------------------------------------------------------------
   Buttons - oval pills, matching the original button style
   -------------------------------------------------------------------------- */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 12px 28px;
  border: 1px solid transparent;
  border-radius: var(--radius-button);
  font-family: var(--font-copy);
  font-size: 16px;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: opacity 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.button:hover,
.button:focus-visible { opacity: 0.85; }

.button--white {
  background-color: var(--color-white);
  color: var(--color-text);
}

.button--black {
  background-color: var(--color-black);
  color: var(--color-white);
}

.button--outline {
  background-color: transparent;
  border-color: var(--color-black);
  color: var(--color-text);
}

.button--outline:hover {
  background-color: var(--color-black);
  color: var(--color-white);
  opacity: 1;
}

.button-row { margin-top: 26px; }
.button-row--center { text-align: center; }
.button-row--right  { text-align: right; }

/* --------------------------------------------------------------------------
   Rich text helpers
   -------------------------------------------------------------------------- */
/* Links inside copy take the surrounding text colour - but buttons keep
   their own colours, so they must be excluded here. */
/* Placeholders in the legal texts that still need real data. Deliberately
   loud so they cannot go live unnoticed. */
.todo {
  display: inline-block;
  background: #ffe9a8;
  color: #6b4b00;
  border: 1px solid #d9a400;
  border-radius: 4px;
  padding: 2px 8px;
  font-weight: 700;
}

.rich-text a:not(.button) { color: inherit; }

.rich-text a:not(.button):hover { text-decoration: none; }

.download-links a {
  display: inline-block;
  margin: 4px 0;
}

/* Image stacked above the copy inside a centred container (contact page). */
.stacked-media {
  width: 100%;
  height: auto;
  margin-bottom: 34px;
}

/* --------------------------------------------------------------------------
   Contact details block
   -------------------------------------------------------------------------- */
.contact-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.contact-list li { margin-bottom: 0.4em; }

/* --------------------------------------------------------------------------
   Forms (withdrawal page)
   -------------------------------------------------------------------------- */
.form-field { margin-bottom: 22px; }

.form-field label {
  display: block;
  margin-bottom: 6px;
  font-size: 15px;
  font-weight: 700;
}

.form-field input,
.form-field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #c9d3d6;
  border-radius: 4px;
  background: var(--color-white);
  font-family: var(--font-copy);
  font-size: 15px;
  color: var(--color-text);
}

.form-field input:focus,
.form-field textarea:focus {
  outline: 2px solid var(--color-secondary);
  outline-offset: 1px;
  border-color: var(--color-secondary);
}

.form-field textarea { min-height: 120px; resize: vertical; }

.form-field__hint {
  margin: 6px 0 0;
  font-size: 13px;
  color: #5d6668;
}

/* Checkbox rows: the full-width rule above would stretch the box itself. */
.form-field--check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.form-field--check input[type="checkbox"] {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin: 3px 0 0;
}

.form-field--check label {
  margin-bottom: 0;
  font-weight: 400;
}

/* --------------------------------------------------------------------------
   Cookie / legal tables
   -------------------------------------------------------------------------- */
.info-block {
  margin-bottom: 34px;
  padding: 24px;
  border: 1px solid #dbe6e9;
  border-radius: 6px;
  background: #f7fbfc;
}

.info-block h3 { margin-bottom: 0.6em; }

.info-block p:last-child { margin-bottom: 0; }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer {
  background: var(--color-white);
  border-top: 1px solid #e8eff1;
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 14px 28px;
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 34px 20px;
}

.site-footer a:not(.button) {
  font-size: 15px;
  text-decoration: none;
  color: var(--color-text);
}

.site-footer a:not(.button):hover { text-decoration: underline; }

.site-footer .button {
  min-height: 44px;
  padding: 10px 22px;
  font-size: 15px;
}

@media print {
  .site-header,
  .site-footer,
  .scroll-arrow { display: none; }
}
