/*
 * Additions to Webflow's stylesheet (which stays untouched). Patrick, 2026-09-29.
 * Written by scripts/changes.py: change it there, not here.
 * The file's name carries its date: files under /assets/ are kept by browsers for a year,
 * so a change needs a new name (EIGENES_CSS_NAME in scripts/changes.py).
 *
 *   1, 2  Stoerer (banners)
 *   3     cookie banner: equal buttons; fits below the header on phones
 *   4     long headlines of the legal pages on phones
 *   5     a tile that is alone in its row stands in the middle
 *   6     Stoerer on phones: room between text, buttons and the edge of the screen
 *   7     "Community": two tiles fill the row
 *   8     Banner, the slim notice on course pages (src/components/Banner.astro)
 */

/* 1. Text readable on any picture: a dark veil over the picture, strongest where the text is.
      On wide screens the text stands on the left; on phones it runs over the whole banner. */
.uui-section_stoerer .background-is-image { position: relative; }
.uui-section_stoerer .background-is-image::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(90deg, rgba(0, 0, 50, 0.62) 0%, rgba(0, 0, 50, 0.42) 38%, rgba(0, 0, 50, 0.08) 72%, rgba(0, 0, 50, 0) 100%);
}
.uui-section_stoerer .background-is-image > * { position: relative; }
.uui-section_stoerer .background-is-image h2,
.uui-section_stoerer .background-is-image .text-color-white { text-shadow: 0 1px 14px rgba(0, 0, 50, 0.45); }
@media screen and (max-width: 767px) {
  .uui-section_stoerer .background-is-image::before {
    background-image: linear-gradient(180deg, rgba(0, 0, 50, 0.38) 0%, rgba(0, 0, 50, 0.58) 100%);
  }
}

/* 2. A place without any Stoerer shows nothing (Webflow would print "No items found."). */
.uui-section_stoerer .w-dyn-empty { display: none; }

/* 3. Cookie banner.
      a) No choice is highlighted: all four buttons look the same. */
.cw-button_primary,
.cw-button_secondary,
.cw-button_primary:hover,
.cw-button_secondary:hover {
  color: #fff;
  background-color: #023047;
  border: 1px solid #023047;
  font-weight: 400;
}
.cw-button_primary:hover,
.cw-button_secondary:hover { background-color: #344054; border-color: #344054; }
/*    b) Never taller than the window (the list of choices can be opened). */
.cw-cookie_banner { max-height: calc(100vh - 40px); max-height: calc(100dvh - 40px); overflow-y: auto; overscroll-behavior: contain; }
/*    c) Phones: the banner ends below the header (logo and menu stay free), its long text
         scrolls inside it, the buttons are always in view and stand closer together. */
@media screen and (max-width: 767px) {
  .cw-cookie_banner {
    padding: 0.875rem 1rem 1rem;
    max-height: calc(100vh - 190px);
    max-height: calc(100dvh - 108px);
    overflow: hidden;
  }
  .cw-cookie_content {
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 190px - 1.875rem);
    max-height: calc(100dvh - 108px - 1.875rem);
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  .cw-cookie_content > * { flex: none; }
  .cw-cookie_content > h3 { margin-top: 0; margin-bottom: 0.375rem; font-size: 0.9375rem; line-height: 1.3; }
  .cw-cookie_content > p {
    flex: 0 1 auto;
    min-height: 4.5rem;
    max-height: 9.75rem;
    margin-bottom: 0.5rem;
    overflow-y: auto;
    line-height: 1.4;
  }
  .cw-cookie_buttons { grid-row-gap: 0.5rem; row-gap: 0.5rem; margin-top: 0.75rem; }
  .cw-cookie_options { grid-row-gap: 0.625rem; row-gap: 0.625rem; margin-top: 1rem; margin-bottom: 0.75rem; }
  .cw-button_primary,
  .cw-button_secondary { width: 100%; padding: 0.8125rem 1.5rem; }
}

/* 4. Legal pages: a headline of one long word ("Datenschutzerklaerung") was wider than a phone.
      These headlines are the ones whose whole text is bold. */
@media screen and (max-width: 767px) {
  h1.heading-xlarge > strong:only-child { overflow-wrap: break-word; hyphens: auto; }
}
@media screen and (max-width: 479px) {
  h1.heading-xlarge:has(> strong:only-child) { font-size: min(2.25rem, 7.4vw); line-height: 1.2; }
  /* The net below every headline: a word that is wider than the phone is broken instead of cut off.
     It changes nothing where the words fit. Nicer: a soft hyphen in the word (scripts/changes.py). */
  h1, h2, h3 { overflow-wrap: break-word; }
}

/* 5. A tile that is alone in a row of two (the location, since there is only one) stands in
      the middle, and so does the headline above it. With a second tile all is as before. */
@media screen and (min-width: 768px) {
  .uui-blogsection07_list > .uui-blogsection07_item:only-child { grid-column: 1 / -1; justify-self: center; width: calc(50% - 0.5rem); }
  .uui-blogsection07_component:has(.uui-blogsection07_list > .uui-blogsection07_item:only-child) .uui-blogsection07_heading { grid-column: 1 / -1; margin-right: 0; text-align: center; }
  .uui-blogsection07_component:has(.uui-blogsection07_list > .uui-blogsection07_item:only-child) .uui-blogsection07_heading > * { margin-left: auto; margin-right: auto; }
}

/* 6. Stoerer on phones: the home page's design had no room on the left, and its buttons ran from
      edge to edge. Now text and buttons keep the distance the other sections keep. */
@media screen and (max-width: 767px) {
  .uui-section_stoerer .uui-page-padding-5,
  .uui-section_stoerer .uui-page-padding-5.padding-left--none { padding-left: 1.25rem; padding-right: 1.25rem; }
}

/* 7. "Community" (Supieria, About You Pangea): two tiles in a row made for three left a third of
      the row empty. Two tiles share the whole row; a third brings the three columns back. */
@media screen and (min-width: 480px) {
  .uui-section_community .uui-layout89_component.grid-3:has(> .uui-layout89_item:nth-child(2):last-child) { grid-template-columns: 1fr 1fr; }
}

/* 8. Banner: a strip of text with one button. "Aktion" blue, "Hinweis" light. */
.ssk-banner { padding: 0 2rem; margin: 2rem 0; }
.ssk-banner_inhalt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
  max-width: 80rem;
  margin: 0 auto;
  padding: 1.125rem 1.5rem;
  border-radius: 0.75rem;
  border-left: 0.375rem solid #e6003c;
}
.ssk-banner--aktion .ssk-banner_inhalt { background-color: #023047; color: #fff; }
.ssk-banner--hinweis .ssk-banner_inhalt { background-color: #e4eafa; color: #1e1a35; border-left-color: #006dff; }
.ssk-banner_text { min-width: 0; }
.ssk-banner_ueberschrift { margin: 0; font-family: custom_Sourcecodepro, monospace; font-size: 1.125rem; font-weight: 600; line-height: 1.35; letter-spacing: 0.01em; text-transform: uppercase; overflow-wrap: break-word; }
.ssk-banner_zeile { margin: 0.25rem 0 0; font-size: 1rem; line-height: 1.5; }
.ssk-banner_ueberschrift:only-child, .ssk-banner_zeile:only-child { margin: 0; }
.ssk-banner_knopf {
  flex: none;
  padding: 0.6875rem 1.25rem;
  border-radius: 0.5rem;
  font-family: custom_Sourcecodepro, monospace;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.2s;
}
.ssk-banner--aktion .ssk-banner_knopf { background-color: #fff; color: #023047; }
.ssk-banner--hinweis .ssk-banner_knopf { background-color: #006dff; color: #fff; }
.ssk-banner_knopf:hover { transform: translateY(-2px); }
@media screen and (max-width: 767px) {
  .ssk-banner { padding: 0 0.5rem; margin: 1.5rem 0; }
  .ssk-banner_inhalt { flex-direction: column; align-items: flex-start; padding: 1rem 1.125rem; }
  .ssk-banner_ueberschrift { font-size: 1rem; }
  .ssk-banner_zeile { font-size: 0.9375rem; }
  .ssk-banner_knopf { white-space: normal; }
}
