/* ================================================
   Novita "Betreutes Wohnen" (Gunzenhausen) microsite
   ================================================
   Scoped entirely under .bewo so it never leaks into the rest of the
   Novita deployment (which stays on the brand's navy/orange + Red Hat
   Text tokens). Colors/font here are deliberately NOT brand tokens:
   - gold (#8F8647 / #6E6636) comes from the source brochure's own
     "Gold 1" InDesign swatch (CMYK 20/25/60/30), matching its
     "Der Goldstandard..." headline theme — see
     template/content/novita_bewo_*.inc.php header comments.
   - body/heading font is Cardo (serif), replacing the brochure's
     original Bembo per explicit instruction; Cardo is already
     self-hosted site-wide via brand/fonts.css, no new @font-face needed.
   10 pages (bewo-start..bewo-kontakt), each its own content/ include,
   linked in sequence by .bewo-next at the bottom of every page and
   grouped by the shared horizontal pillbox subnav (.bewo-pillnav).
*/

.bewo {
  --bewo-gold: #8F8647;
  --bewo-gold-dark: #6E6636;
  --bewo-ink: #3D4552;
  --bewo-cream: #F8F6F0;
  /* Red Hat Text everywhere by default (headlines, nav, buttons, labels,
     captions, list items) — only actual <p> paragraph text switches to
     Cardo below, per explicit instruction. Both already self-hosted
     site-wide via brand/fonts.css, no new @font-face needed. */
  --bewo-font-heading: 'Red Hat Text', sans-serif;
  --bewo-font-body: 'Cardo', serif;
  font-family: var(--bewo-font-heading);
  color: var(--bewo-ink);
}

.bewo p {
  font-family: var(--bewo-font-body);
}

.bewo h1, .bewo h2, .bewo h3, .bewo h4 {
  font-family: var(--bewo-font-heading);
  color: var(--bewo-ink);
  /* Overrides the shared "main h1, main h2 { font-style: italic; }" rule
     (css/theme.css) — bewo headlines stay upright, weight 500. */
  font-style: normal;
  font-weight: 500;
}

.bewo a {
  color: var(--bewo-gold-dark);
}

/* ---- Hero (bewo-start only) ---- */

.bewo-hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  color: #fff;
  background-size: cover;
  background-position: center;
  padding: 3rem 1.5rem 3.5rem;
}

.bewo-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(20, 20, 15, .05) 0%, rgba(20, 18, 10, .42) 100%);
}

.bewo-hero-inner {
  /* Absolutely positioned (not flex-centered via .bewo-hero's own
     align-items) so its vertical midpoint sits at a fixed 2/3 down the
     hero regardless of content height — shared by every .bewo-hero use
     (bewo-start, Pflege-WG's own start page), not just one of them.
     Deliberately NOT the element carrying .pm-reveal/.pm-reveal-in —
     that class's own .is-visible rule sets `transform: translateY(0)`
     once the scroll-reveal observer fires, which (2 classes) outranks
     this rule's own `transform` (1 class) and silently cancels the
     translate(-50%,-50%) centering offset, making the block anchor by
     its top-left corner instead of its center. The reveal fade/slide
     lives on the nested .bewo-hero-content below instead, so the two
     transforms never collide on the same element. */
  position: absolute;
  left: 50%;
  top: 66%;
  transform: translate(-50%, -50%);
  width: calc(100% - 3rem);
  max-width: 900px;
  text-align: center;
}

.bewo-hero-eyebrow {
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: .85rem;
  color: #fff;
  font-weight: 500;
  margin-bottom: .75rem;
}

.bewo-hero h1 {
  color: #fff;
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 1.15;
  margin-bottom: .5rem;
  text-shadow: 0 2px 6px rgba(0, 0, 0, .55), 0 1px 16px rgba(0, 0, 0, .35);
}

.bewo-hero .bewo-hero-claim {
  display: inline-block;
  font-family: var(--bewo-font-heading);
  font-size: clamp(1.05rem, 2.1vw, 1.4rem);
  font-weight: 600;
  font-style: normal;
  color: #fff;
  background: var(--bewo-gold);
  padding: .5rem 1.4rem;
  border-radius: 999px;
  margin-bottom: 0;
}

/* ---- Highlight circles (bewo-start, bottom of page) ----
   .bewo-highlight-icon wraps an inlined <svg> (bewoIconSvg(), see
   template_novita/index.php) — a first pass used CSS mask-image instead
   (same technique as the .list_aeb checkmark, css/standort.css) but it
   didn't render reliably on every desktop browser, so this is plain
   inline SVG with fill="currentColor" now; color comes from `color`
   below, not background-color. Icons are the custom set extracted from
   new_content_novita_only/gun_icons_3.pdf (see
   template_novita/img/icons/README.md). */

.bewo-highlights {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2.2rem 2.75rem;
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.bewo-highlight {
  width: 150px;
  text-align: center;
}

.bewo-highlight-circle {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: var(--bewo-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto .9rem;
  transform: scale(.55);
  opacity: 0;
  transition: transform .5s cubic-bezier(.34, 1.56, .64, 1), opacity .4s ease;
}

.bewo-highlight-icon {
  display: inline-flex;
  width: 36px;
  height: 36px;
  color: #fff;
}

.bewo-highlight-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.bewo-highlight.is-visible .bewo-highlight-circle {
  transform: scale(1);
  opacity: 1;
}

.bewo-highlight:nth-child(1) .bewo-highlight-circle { transition-delay: .05s; }
.bewo-highlight:nth-child(2) .bewo-highlight-circle { transition-delay: .12s; }
.bewo-highlight:nth-child(3) .bewo-highlight-circle { transition-delay: .19s; }
.bewo-highlight:nth-child(4) .bewo-highlight-circle { transition-delay: .26s; }
.bewo-highlight:nth-child(5) .bewo-highlight-circle { transition-delay: .33s; }
.bewo-highlight:nth-child(6) .bewo-highlight-circle { transition-delay: .40s; }

.bewo-highlight-label {
  font-size: .95rem;
  line-height: 1.4;
  margin: 0;
}

@media (prefers-reduced-motion: reduce) {
  .bewo-highlight-circle {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* ---- Generic page sections ---- */

.bewo-section {
  max-width: 980px;
  margin: 0 auto;
  padding: 3.5rem 1.5rem;
}

.bewo-section--wide {
  max-width: 1140px;
}

.bewo-eyebrow {
  text-transform: uppercase;
  letter-spacing: .1em;
  font-size: .8rem;
  font-weight: 500;
  color: var(--bewo-gold-dark);
  margin-bottom: .5rem;
}

.bewo-section h2 {
  font-size: clamp(1.6rem, 3.2vw, 2.3rem);
  margin-bottom: 1.25rem;
}

.bewo-section p {
  font-size: 1.08rem;
  line-height: 1.75;
}

.bewo-lead {
  font-size: 1.25rem;
  font-style: italic;
  color: var(--bewo-gold-dark);
}

/* Modifier for the one .bewo-lead instance that should read as a
   headline-style line (Red Hat, upright, weight 500) rather than the
   default italic Cardo lead style — e.g. the Inklusivleistungen page's
   "Rezeptionsdienst: ..." line. */
.bewo-lead--redhat {
  font-family: var(--bewo-font-heading);
  font-style: normal;
  font-weight: 500;
}

.bewo-signoff {
  margin-top: 1.5rem;
  font-style: italic;
}

/* ---- Images ---- */

.bewo-img {
  width: 100%;
  height: auto;
  border-radius: .4rem;
  display: block;
}

.bewo-img-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin: 2rem 0;
}

/* Same unification as .bewo-gallery below — paired photos are rarely the
   same source orientation (e.g. a landscape building exterior next to a
   portrait-cropped headshot), so force both tiles to match. */
.bewo-img-pair .bewo-img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
  width: 100%;
  height: 100%;
}

.bewo-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin: 2rem 0;
}

/* Source photos are a mix of portrait/landscape (e.g. the Lage page's
   tall Altstadt shot next to 3 landscape ones) — a fixed aspect-ratio +
   object-fit:cover keeps every tile the same size regardless of the
   source image's own orientation. */
.bewo-gallery .bewo-img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

figure.bewo-figure {
  margin: 0;
}

.bewo-figure figcaption {
  font-size: .85rem;
  color: var(--bewo-ink);
  opacity: .7;
  margin-top: .4rem;
  text-align: center;
}

@media (max-width: 700px) {
  .bewo-img-pair { grid-template-columns: 1fr; }
}

/* ---- Checkmark list (own small system, not .aeb-box — that one is tied
   to brand --primary/--secondary tokens, which this gold microsite
   intentionally doesn't use) ---- */

.bewo-list {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
  display: grid;
  /* Wider minmax basis than a typical 3-up list grid on purpose — at
     .bewo-section--wide's 1140px max-width a 260px basis fit 3 cramped
     columns; 2 wider, more spaced-out columns read more easily. */
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 1.1rem 3rem;
}

.bewo-list--single {
  grid-template-columns: 1fr;
}

.bewo-list li {
  position: relative;
  padding: .1rem 0 .1rem 1.9rem;
  line-height: 1.45;
}

.bewo-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .12em;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background-color: var(--bewo-gold);
}

.bewo-list li::after {
  content: "";
  position: absolute;
  left: 0;
  top: .12em;
  width: 20px;
  height: 20px;
  background-color: #fff;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='5 13 10 18 19 7'%3E%3C/polyline%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='5 13 10 18 19 7'%3E%3C/polyline%3E%3C/svg%3E");
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: 12px 12px;
  mask-size: 12px 12px;
}

/* ---- Package / spec cards (Komfort-Leistungen, Apartment-Kategorien) ---- */

.bewo-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.25rem;
  margin: 2rem 0;
}

/* Komfort-Leistungen-only modifier: 1 column on mobile, 2 ("col-6") on
   desktop — the shared auto-fit above gave Komfort's 5 cards 4 cramped
   columns with the 5th (Sonstiges) stranded alone on its own row; 2
   wider columns read much better. Kept off the base class so Kosten's
   3-card row (same .bewo-card-grid) keeps its own auto-fit layout. */
.bewo-card-grid--komfort {
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .bewo-card-grid--komfort {
    grid-template-columns: repeat(2, 1fr);
  }
}

.bewo-card {
  background: var(--bewo-cream);
  border-radius: .6rem;
  padding: 1.75rem;
  box-shadow: 0 2px 10px rgba(61, 69, 82, .06);
  /* Also carries .pm-reveal (opacity/transform fade-up, css/theme.css) —
     transform is reused by both that entrance animation and the hover
     lift below, so both need to share this one transition declaration
     (a separate "transition: transform .25s" rule here would silently
     replace .pm-reveal's own, since `transition` is a shorthand and the
     later-loaded stylesheet wins outright rather than merging). */
  transition: opacity .6s ease, transform .5s ease, box-shadow .3s ease;
}

.bewo-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(61, 69, 82, .12);
}

.bewo-card h3 {
  font-size: 1.15rem;
  color: var(--bewo-gold-dark);
  margin-bottom: .7rem;
}

/* Icon + heading row (Komfort-Leistungen's cards) — icon wraps an
   inlined <svg>, same technique as .bewo-highlight-icon (see its own
   comment above; a first pass used CSS mask-image, swapped out for not
   rendering reliably on every desktop browser). A card with no matching
   icon (Sonstiges) just omits .bewo-card-head and uses a plain <h3>, no
   empty icon slot. */
.bewo-card-head {
  display: flex;
  align-items: center;
  gap: .9rem;
  margin-bottom: 1rem;
}

.bewo-card-head h3 {
  margin-bottom: 0;
}

/* Solid gold circle badge, matching the highlight-circle language used
   on bewo-start, instead of a bare flat icon. */
.bewo-card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--bewo-gold);
  color: #fff;
  flex: 0 0 auto;
}

.bewo-card-icon svg {
  width: 26px;
  height: 26px;
  display: block;
}

/* Per-card staggered fade/slide-in, same pattern as .bewo-highlight — a
   first pass animated the whole .bewo-card-grid as one block, so all 5
   cards popped in together instead of one at a time. */
.bewo-card:nth-child(1) { transition-delay: .05s; }
.bewo-card:nth-child(2) { transition-delay: .12s; }
.bewo-card:nth-child(3) { transition-delay: .19s; }
.bewo-card:nth-child(4) { transition-delay: .26s; }
.bewo-card:nth-child(5) { transition-delay: .33s; }

.bewo-card p {
  font-size: .98rem;
  margin: 0;
}

/* Modifier for single-sentence cards (e.g. Kosten's Kaltmiete/
   Mietnebenkosten/Servicepauschale) — a dash-bulleted <ul> with exactly
   one <li> looked pointless, so these use a plain <p> plus a small
   numbered badge instead, echoing the gold icon-circle language used
   elsewhere on this microsite (.bewo-highlight-circle). */
.bewo-card--cost {
  position: relative;
  padding-top: 2.75rem;
}

.bewo-card-num {
  position: absolute;
  top: -16px;
  left: 1.5rem;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bewo-gold);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--bewo-font-heading);
  font-weight: 500;
  font-size: 1rem;
  box-shadow: 0 4px 10px rgba(143, 134, 71, .35);
}

.bewo-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: .95rem;
  line-height: 1.6;
}

.bewo-card ul li {
  padding-left: 1rem;
  position: relative;
}

.bewo-card ul li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--bewo-gold);
}

/* Floor-plan spec sheets (Apartments page, the 2 "Beispiel Apartment"
   cards) — drawing + room sizes side by side, like a real-estate listing
   spec sheet, instead of a tiny thumbnail that opened a blown-up low-res
   JPEG on click (the source drawings are only 634×690/726×631px — too
   small for a "zoom" to show anything a reader couldn't already see). */
.bewo-floorplan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.bewo-floorplan-card {
  background: var(--bewo-cream);
  border-radius: .4rem;
  padding: 1.5rem;
}

.bewo-floorplan-card h3 {
  font-size: 1.1rem;
  color: var(--bewo-gold-dark);
  margin-bottom: 1rem;
}

.bewo-floorplan-body {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
}

.bewo-floorplan-img {
  width: 42%;
  max-width: 220px;
  height: auto;
  border-radius: .3rem;
  flex: 0 0 auto;
}

.bewo-floorplan-specs {
  list-style: none;
  margin: 0;
  padding: 0;
  flex: 1 1 auto;
  font-size: .95rem;
}

.bewo-floorplan-specs li {
  display: flex;
  justify-content: space-between;
  gap: .75rem;
  padding: .4rem 0;
  border-bottom: 1px solid rgba(143, 134, 71, .2);
}

.bewo-floorplan-specs li:last-child {
  border-bottom: none;
}

.bewo-floorplan-specs li span:first-child {
  color: var(--bewo-ink);
  opacity: .75;
}

.bewo-floorplan-specs li span:last-child {
  font-weight: 500;
  color: var(--bewo-gold-dark);
  white-space: nowrap;
}

@media (max-width: 480px) {
  .bewo-floorplan-body {
    flex-direction: column;
  }
  .bewo-floorplan-img {
    width: 100%;
    max-width: 260px;
    margin: 0 auto;
  }
}

.bewo-spec-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: .98rem;
}

.bewo-spec-table th,
.bewo-spec-table td {
  text-align: left;
  padding: .6rem .5rem;
  border-bottom: 1px solid rgba(143, 134, 71, .25);
}

.bewo-spec-table th {
  color: var(--bewo-gold-dark);
  font-weight: 700;
}

/* ---- Pillbox subnav ---- */

.bewo-pillnav-wrap {
  position: sticky;
  /* Matches the main nav's own live (scroll-shrunk) height
     (--pm-nav-live-offset, set in template_novita/index.php's scroll
     handler) instead of the static --nav-offset — otherwise this sticks
     at the taller unscrolled offset and leaves a gap once the main nav
     bar shrinks (same fix css/navigation.css already applies to
     .pm-backdrop/.pm-mega). */
  top: var(--pm-nav-live-offset, var(--nav-offset, 90px));
  z-index: 15;
  background: #fff;
  border-bottom: 1px solid rgba(143, 134, 71, .25);
}

.bewo-pillnav {
  display: flex;
  gap: .5rem;
  overflow-x: auto;
  padding: .75rem 1.25rem;
  max-width: 1140px;
  margin: 0 auto;
  scrollbar-width: thin;
}

.bewo-pillnav a {
  flex: 0 0 auto;
  display: inline-block;
  padding: .45rem 1rem;
  border-radius: 999px;
  background: #fff;
  color: var(--bewo-ink);
  font-size: .9rem;
  font-weight: 500;
  white-space: nowrap;
  text-decoration: none;
  border: 1px solid rgba(143, 134, 71, .35);
  transition: background .2s ease, color .2s ease;
}

.bewo-pillnav a:hover {
  background: var(--bewo-gold);
  color: #fff;
}

.bewo-pillnav a.is-active {
  background: var(--bewo-gold);
  border-color: var(--bewo-gold);
  color: #fff;
}

/* ---- Next-page link-through ---- */

.bewo-next {
  background: var(--bewo-ink);
  color: #fff;
  padding: 3rem 1.5rem;
  text-align: center;
}

.bewo-next-eyebrow {
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: .85rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: .6rem;
}

.bewo-next a.bewo-next-link {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  font-family: var(--bewo-font-heading);
  font-size: 1.5rem;
  font-weight: 500;
  color: #fff;
  text-decoration: none;
  font-style: normal;
  border-bottom: 2px solid var(--bewo-gold);
  padding-bottom: .15rem;
}

.bewo-next a.bewo-next-link:hover {
  color: var(--bewo-gold);
}

/* ---- Contact CTA (bewo-kontakt) ---- */

.bewo-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-top: 1.5rem;
}

.bewo-btn {
  display: inline-block;
  padding: .85rem 1.8rem;
  border-radius: 999px;
  background: var(--bewo-gold);
  color: #fff !important;
  text-decoration: none;
  font-size: 1.05rem;
  transition: background .2s ease;
}

.bewo-btn:hover {
  background: var(--bewo-gold-dark);
}

.bewo-btn--outline {
  background: transparent;
  color: var(--bewo-gold-dark) !important;
  border: 1.5px solid var(--bewo-gold);
}

.bewo-btn--outline:hover {
  background: var(--bewo-gold);
  color: #fff !important;
}

@media (max-width: 700px) {
  .bewo-card-grid,
  .bewo-gallery { grid-template-columns: 1fr; }
}

/* ---- Lageplan illustration (content/bewo_lageplan.inc.php) ----
   Hand-drawn inline SVG, not a traced copy of the source JPG — shares
   the .bewo-figure/figcaption wrapper, so only its own shapes/text and
   the staggered reveal animation need styling here. */

.bewo-lageplan-svg {
  width: 100%;
  height: auto;
  display: block;
}

.lp-haus-label {
  fill: #fff;
  font-family: var(--bewo-font-heading);
  font-size: 22px;
  font-weight: 500;
}

.lp-eg-text {
  fill: #fff;
  font-family: var(--bewo-font-heading);
  font-size: 16px;
  font-weight: 500;
}

.lp-parken-label {
  fill: var(--bewo-gold-dark);
  font-family: var(--bewo-font-heading);
  font-size: 16px;
  font-weight: 500;
}

.lp-arrow {
  fill: var(--bewo-gold);
}

/* Staggered build-up on scroll-into-view — reuses the shared .pm-reveal/
   .is-visible observer (no new JS); the wrapping <figure> is the
   observed element (.bewo-lageplan carries pm-reveal pm-reveal-up), and
   each group of shapes gets its own transition-delay so Haus A, then
   Haus B, then the EG/Pflege-WG box, then the 3 arrow markers appear in
   sequence instead of all at once. */
.bewo-lageplan .lp-haus,
.bewo-lageplan .lp-eg,
.bewo-lageplan .lp-arrow {
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
  transform: scale(.8);
  transition: opacity .5s ease, transform .5s cubic-bezier(.34, 1.56, .64, 1);
}

.bewo-lageplan.is-visible .lp-haus-a  { opacity: 1; transform: scale(1); transition-delay: .1s; }
.bewo-lageplan.is-visible .lp-haus-b  { opacity: 1; transform: scale(1); transition-delay: .25s; }
.bewo-lageplan.is-visible .lp-eg      { opacity: 1; transform: scale(1); transition-delay: .4s; }
.bewo-lageplan.is-visible .lp-arrow-1 { opacity: 1; transition-delay: .55s; }
.bewo-lageplan.is-visible .lp-arrow-2 { opacity: 1; transition-delay: .62s; }
.bewo-lageplan.is-visible .lp-arrow-3 { opacity: 1; transition-delay: .69s; }

@media (prefers-reduced-motion: reduce) {
  .bewo-lageplan .lp-haus,
  .bewo-lageplan .lp-eg,
  .bewo-lageplan .lp-arrow {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}
