/*
 * 6Flaschen WeinApp
 * Master Page Hero – Hotfix 8.4.9 Revision 9
 * Stand: 2026-08-08 Europe/Berlin
 *
 * Zielbild:
 * [ Bild über volle Breite ]
 * [ Eyebrow                     ]
 * [ große Serif-Headline        ]
 * [ Unterzeile                  ]
 *
 * Keine Desktop-Split-Ansicht mehr.
 */

html.coastal-ui .wr6-master-page-hero {
  --wr6-master-hero-bg: #0b2733;
  --wr6-master-hero-text: #fffaf0;
  --wr6-master-hero-muted: #f3eee3;
  --wr6-master-hero-border: rgba(222, 210, 184, 0.22);
  --wr6-master-hero-radius: 30px;
  --wr6-master-hero-image-height: clamp(205px, 29vw, 265px);

  box-sizing: border-box !important;
  width: 100% !important;
  max-width: 100% !important;
  min-height: 0 !important;
  margin: 0 0 18px !important;
  padding: 0 !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  grid-template-rows: var(--wr6-master-hero-image-height) auto !important;
  align-items: stretch !important;
  position: relative !important;
  overflow: hidden !important;
  border: 1px solid var(--wr6-master-hero-border) !important;
  border-radius: var(--wr6-master-hero-radius) !important;
  background: var(--wr6-master-hero-bg) !important;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.20) !important;
  isolation: isolate !important;
}

/* Alte individuelle Hero-Hintergründe vollständig neutralisieren. */
html.coastal-ui .wr6-master-page-hero::before,
html.coastal-ui .wr6-master-page-hero::after,
html.coastal-ui .wr6-master-page-hero .wr6-master-page-hero-legacy-overlay {
  display: none !important;
  content: none !important;
}

html.coastal-ui .wr6-master-page-hero .wr6-master-page-hero-hidden-mark {
  display: none !important;
}

/* --------------------------------------------------------------
   Bild
   -------------------------------------------------------------- */
html.coastal-ui .wr6-master-page-hero .wr6-master-page-hero-visual,
html.coastal-ui .wr6-master-page-hero .wr6-master-page-hero-visual picture,
html.coastal-ui .wr6-master-page-hero .wr6-master-page-hero-visual img {
  box-sizing: border-box !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  display: block !important;
}

html.coastal-ui .wr6-master-page-hero .wr6-master-page-hero-visual {
  grid-column: 1 !important;
  grid-row: 1 !important;
  position: relative !important;
  inset: auto !important;
  overflow: hidden !important;
  background: #c7c1b4 !important;
}

html.coastal-ui .wr6-master-page-hero .wr6-master-page-hero-visual img {
  object-fit: cover !important;
  object-position: center 46% !important;
  filter: saturate(0.88) contrast(1.03) brightness(1.02) !important;
}

/* weicher Übergang vom Foto in den dunklen Textblock wie im Zielbild */
html.coastal-ui .wr6-master-page-hero .wr6-master-page-hero-visual::after {
  content: "" !important;
  display: block !important;
  position: absolute !important;
  inset: 0 !important;
  pointer-events: none !important;
  background:
    linear-gradient(
      180deg,
      rgba(11, 39, 51, 0.00) 0%,
      rgba(11, 39, 51, 0.02) 54%,
      rgba(11, 39, 51, 0.32) 78%,
      var(--wr6-master-hero-bg) 100%
    ) !important;
}

/* --------------------------------------------------------------
   Textbereich
   -------------------------------------------------------------- */
html.coastal-ui .wr6-master-page-hero .wr6-master-page-hero-copy {
  box-sizing: border-box !important;
  grid-column: 1 !important;
  grid-row: 2 !important;
  width: 100% !important;
  max-width: none !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 26px 30px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  justify-content: flex-start !important;
  position: relative !important;
  z-index: 2 !important;
  text-align: left !important;
  background: var(--wr6-master-hero-bg) !important;
}

/* Eyebrow: Screenshot-Referenz – weiß, kompakt, in Versalien */
html.coastal-ui .wr6-master-page-hero .wr6-master-page-hero-eyebrow,
html.coastal-ui .wr6-master-page-hero .eyebrow,
html.coastal-ui .wr6-master-page-hero .coastal-home-greeting {
  width: auto !important;
  max-width: 100% !important;
  margin: -2px 0 10px !important;
  padding: 0 !important;
  color: #ffffff !important;
  font-size: 12px !important;
  font-weight: 900 !important;
  line-height: 1.2 !important;
  letter-spacing: 0.115em !important;
  text-transform: uppercase !important;
  text-align: left !important;
}

/* gleiche Headline auf allen Seiten */
html.coastal-ui .wr6-master-page-hero h1,
html.coastal-ui .wr6-master-page-hero .page-title,
html.coastal-ui .wr6-master-page-hero .wr6-master-page-hero-title {
  width: 100% !important;
  max-width: 860px !important;
  margin: 0 !important;
  padding: 0 !important;
  color: var(--wr6-master-hero-text) !important;
  font-family: var(--font-serif, ui-serif, Georgia, "Times New Roman", serif) !important;
  font-size: clamp(40px, 6vw, 58px) !important;
  font-weight: 500 !important;
  line-height: 0.99 !important;
  letter-spacing: -0.038em !important;
  text-align: left !important;
}

/* gleiche Unterzeile auf allen Seiten */
html.coastal-ui .wr6-master-page-hero .page-subtitle,
html.coastal-ui .wr6-master-page-hero .coastal-home-intro,
html.coastal-ui .wr6-master-page-hero .wr6-master-page-hero-subtitle {
  width: 100% !important;
  max-width: 760px !important;
  margin: 18px 0 0 !important;
  padding: 0 !important;
  color: var(--wr6-master-hero-muted) !important;
  font-size: 16px !important;
  font-weight: 400 !important;
  line-height: 1.62 !important;
  text-align: left !important;
}

/* --------------------------------------------------------------
   Alte Seitenlayouts überschreiben
   -------------------------------------------------------------- */
html.coastal-ui
body.coastal-home-page.is-authenticated
.coastal-home-hero--split.wr6-master-page-hero,
html.coastal-ui
body.coastal-archive-page
.archive-page-hero.wr6-master-page-hero,
html.coastal-ui
.wine-recommendation-page-hero.wr6-master-page-hero,
html.coastal-ui
.profile-page-hero.wr6-master-page-hero,
html.coastal-ui
.form-page-hero.wr6-master-page-hero,
html.coastal-ui
.edit-title-card.wr6-master-page-hero,
html.coastal-ui
.scan-placeholder-card--hero.wr6-master-page-hero {
  grid-template-columns: minmax(0, 1fr) !important;
  grid-template-rows: var(--wr6-master-hero-image-height) auto !important;
  min-height: 0 !important;
  padding: 0 !important;
  border-radius: var(--wr6-master-hero-radius) !important;
  background: var(--wr6-master-hero-bg) !important;
}

/* eventuell verbleibende alte Text-Hüllen dürfen das Masterlayout nicht beeinflussen */
html.coastal-ui .wr6-master-page-hero .coastal-home-hero-content,
html.coastal-ui .wr6-master-page-hero .archive-page-hero-copy,
html.coastal-ui .wr6-master-page-hero .wine-recommendation-page-hero-copy,
html.coastal-ui .wr6-master-page-hero .profile-hero-row,
html.coastal-ui .wr6-master-page-hero .edit-title-row,
html.coastal-ui .wr6-master-page-hero .wr6-unified-page-hero-copy {
  width: auto !important;
  max-width: none !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  display: contents !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

/* 6Flaschen war vorher zentriert – jetzt bewusst identisch linksbündig */
html.coastal-ui
.wine-recommendation-page-hero.wr6-master-page-hero * {
  text-align: left !important;
}

/* --------------------------------------------------------------
   Bild-Aktion, z. B. Profil aktualisieren
   -------------------------------------------------------------- */
html.coastal-ui .wr6-master-page-hero .wr6-master-page-hero-image-action {
  position: absolute !important;
  top: 22px !important;
  right: 22px !important;
  z-index: 5 !important;
  width: 52px !important;
  height: 52px !important;
  min-width: 52px !important;
  min-height: 52px !important;
  margin: 0 !important;
  padding: 0 !important;
  display: grid !important;
  place-items: center !important;
  border: 1px solid rgba(255, 255, 255, 0.22) !important;
  border-radius: 50% !important;
  color: #fffaf0 !important;
  background: rgba(25, 48, 59, 0.82) !important;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18) !important;
  backdrop-filter: blur(8px) !important;
}

/* --------------------------------------------------------------
   Seitenspezifische Zusatzfunktionen bewusst UNTER dem Banner
   -------------------------------------------------------------- */
html.coastal-ui .wr6-page-hero-followup {
  width: 100%;
  margin: -4px 0 18px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
}

html.coastal-ui .wr6-page-hero-followup:empty {
  display: none;
}

html.coastal-ui .wr6-page-hero-followup .tasting-stepper {
  width: 100% !important;
  margin: 0 !important;
}

html.coastal-ui .wr6-page-hero-followup .profile-data-line,
html.coastal-ui .wr6-page-hero-followup .profile-intro-expanded,
html.coastal-ui .wr6-page-hero-followup .wine-profile-feedback {
  margin: 0 !important;
}

/* Profil-"Mehr Infos" bleibt im Banner, aber kompakt. */
html.coastal-ui .wr6-master-page-hero .profile-hero-more {
  width: 100%;
  max-width: 760px;
  margin-top: 18px !important;
  padding-top: 12px !important;
  border-top-color: rgba(255,255,255,.14) !important;
}

html.coastal-ui .wr6-master-page-hero .profile-hero-more > summary,
html.coastal-ui .wr6-master-page-hero .profile-hero-more-body,
html.coastal-ui .wr6-master-page-hero .profile-hero-more-heading,
html.coastal-ui .wr6-master-page-hero .profile-hero-more-intro {
  color: var(--wr6-master-hero-muted) !important;
}

/* --------------------------------------------------------------
   Responsive – Aufbau bleibt IDENTISCH, nur Maße werden kleiner
   -------------------------------------------------------------- */
@media (max-width: 760px) {
  html.coastal-ui .wr6-master-page-hero {
    --wr6-master-hero-radius: 28px;
    --wr6-master-hero-image-height: clamp(190px, 31vw, 220px);
    margin-bottom: 16px !important;
  }

  html.coastal-ui .wr6-master-page-hero .wr6-master-page-hero-copy {
    padding: 0 25px 28px !important;
  }

  html.coastal-ui .wr6-master-page-hero h1,
  html.coastal-ui .wr6-master-page-hero .page-title,
  html.coastal-ui .wr6-master-page-hero .wr6-master-page-hero-title {
    font-size: clamp(38px, 7.1vw, 52px) !important;
  }

  html.coastal-ui .wr6-master-page-hero .page-subtitle,
  html.coastal-ui .wr6-master-page-hero .coastal-home-intro,
  html.coastal-ui .wr6-master-page-hero .wr6-master-page-hero-subtitle {
    margin-top: 16px !important;
    font-size: 15px !important;
    line-height: 1.58 !important;
  }

  html.coastal-ui .wr6-master-page-hero .wr6-master-page-hero-image-action {
    top: 18px !important;
    right: 18px !important;
    width: 50px !important;
    height: 50px !important;
    min-width: 50px !important;
    min-height: 50px !important;
  }
}

@media (max-width: 520px) {
  html.coastal-ui .wr6-master-page-hero {
    --wr6-master-hero-image-height: 180px;
    --wr6-master-hero-radius: 24px;
  }

  html.coastal-ui .wr6-master-page-hero .wr6-master-page-hero-copy {
    padding: 0 20px 24px !important;
  }

  html.coastal-ui .wr6-master-page-hero h1,
  html.coastal-ui .wr6-master-page-hero .page-title,
  html.coastal-ui .wr6-master-page-hero .wr6-master-page-hero-title {
    font-size: clamp(34px, 10.7vw, 45px) !important;
  }

  html.coastal-ui .wr6-master-page-hero .page-subtitle,
  html.coastal-ui .wr6-master-page-hero .coastal-home-intro,
  html.coastal-ui .wr6-master-page-hero .wr6-master-page-hero-subtitle {
    font-size: 14px !important;
  }
}


/* Revision 9 – serverseitige Folgeblöcke außerhalb des Master-Heros */
html.coastal-ui .profile-page-intro { margin-bottom: 18px; }
html.coastal-ui .profile-page-intro .profile-page-hero { margin-bottom: 12px !important; }
html.coastal-ui .profile-intro-followup { display: grid; gap: 12px; }
html.coastal-ui .profile-intro-followup .profile-hero-contrast,
html.coastal-ui .profile-intro-followup .profile-data-line { margin: 0; }
html.coastal-ui .profile-page-intro.is-refreshing .wine-profile-refresh-button span { animation: wine-profile-spin .85s linear infinite; }
html.coastal-ui .scan-placeholder-card--status { margin-top: 0; }


html.coastal-ui .wr6-step-intro--label-only { padding-top:18px; margin-bottom:16px; }
html.coastal-ui .wr6-step-intro--label-only .wr6-step-label { margin-bottom:0; }


/* ==========================================================================
 * Hotfix 8.4.9 Revision 9.1 – /neue-verkostung.php
 * Erfassen verwendet jetzt strukturell denselben finalen Master-Hero wie Start.
 *
 * Wichtig:
 * - bewusst KEINE .form-page-hero-Klasse mehr
 * - dadurch greifen alte Capture-Regeln, die mobil Titel/Subtitel verstecken,
 *   nicht mehr auf den Hero
 * - keine zusätzliche Außenkarte / kein Innen-Padding um das Foto
 * ========================================================================== */

html.coastal-ui body.coastal-capture-page
.capture-start-reference-hero.wr6-master-page-hero {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 0 18px !important;
  padding: 0 !important;
}

/* Gleicher geschlossener Bild-/Text-Kasten wie auf der Startseite. */
html.coastal-ui body.coastal-capture-page
.capture-start-reference-hero.wr6-master-page-hero
.wr6-master-page-hero-visual {
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
}

/* Capture-Altregeln dürfen den Startseiten-Text nicht ausblenden. */
html.coastal-ui body.coastal-capture-page
.capture-start-reference-hero.wr6-master-page-hero
.wr6-master-page-hero-copy,
html.coastal-ui body.coastal-capture-page
.capture-start-reference-hero.wr6-master-page-hero
.wr6-master-page-hero-eyebrow,
html.coastal-ui body.coastal-capture-page
.capture-start-reference-hero.wr6-master-page-hero
.wr6-master-page-hero-title,
html.coastal-ui body.coastal-capture-page
.capture-start-reference-hero.wr6-master-page-hero
.wr6-master-page-hero-subtitle {
  display: flex !important;
}

html.coastal-ui body.coastal-capture-page
.capture-start-reference-hero.wr6-master-page-hero
.wr6-master-page-hero-eyebrow,
html.coastal-ui body.coastal-capture-page
.capture-start-reference-hero.wr6-master-page-hero
.wr6-master-page-hero-title,
html.coastal-ui body.coastal-capture-page
.capture-start-reference-hero.wr6-master-page-hero
.wr6-master-page-hero-subtitle {
  display: block !important;
}

/* Die Textbreite entspricht der funktionierenden Masterdarstellung. */
html.coastal-ui body.coastal-capture-page
.capture-start-reference-hero.wr6-master-page-hero
.wr6-master-page-hero-title {
  max-width: 860px !important;
}

html.coastal-ui body.coastal-capture-page
.capture-start-reference-hero.wr6-master-page-hero
.wr6-master-page-hero-subtitle {
  max-width: 760px !important;
}

@media (max-width: 760px) {
  html.coastal-ui body.coastal-capture-page
  .capture-start-reference-hero.wr6-master-page-hero {
    display: grid !important;
    min-height: 0 !important;
    margin: 0 0 16px !important;
    padding: 0 !important;
    border-radius: 28px !important;
    overflow: hidden !important;
  }

  html.coastal-ui body.coastal-capture-page
  .capture-start-reference-hero.wr6-master-page-hero
  .wr6-master-page-hero-copy {
    display: flex !important;
    padding: 0 25px 28px !important;
  }

  html.coastal-ui body.coastal-capture-page
  .capture-start-reference-hero.wr6-master-page-hero
  .wr6-master-page-hero-title,
  html.coastal-ui body.coastal-capture-page
  .capture-start-reference-hero.wr6-master-page-hero
  .wr6-master-page-hero-subtitle,
  html.coastal-ui body.coastal-capture-page
  .capture-start-reference-hero.wr6-master-page-hero
  .wr6-master-page-hero-eyebrow {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
  }
}

@media (max-width: 520px) {
  html.coastal-ui body.coastal-capture-page
  .capture-start-reference-hero.wr6-master-page-hero {
    border-radius: 24px !important;
  }

  html.coastal-ui body.coastal-capture-page
  .capture-start-reference-hero.wr6-master-page-hero
  .wr6-master-page-hero-copy {
    padding: 0 20px 24px !important;
  }
}
