/* VIGILANT 0.4.95
 * Mobile chapter rhythm and homepage Protection crop.
 * Applies to the rendered DE/EN pages and to the matching block-editor markup.
 * No changes to the existing desktop colour system or card geometry.
 */
@media (max-width: 900px) {
  /* The content system has both stored and template-backed pages. Some advisory
     pages have three consecutive .vg-surface-base chapters; old generic odd/even
     rules explicitly skip these. Count only real content sections, not hero/CTA. */
  :is(.vg-site .vg-main > .vg-content-page,
      .vg-site .vg-main > .vg-content-page > .entry-content,
      .vg-site .vg-main,
      .editor-styles-wrapper) > section.vg-page-section:not(.vg-page-section--cta):not(.vg-page-section--signature-cta) {
    --vg-surface-background: #F8F6F1;
    background: #F8F6F1 !important;
  }
  :is(.vg-site .vg-main > .vg-content-page,
      .vg-site .vg-main > .vg-content-page > .entry-content,
      .vg-site .vg-main,
      .editor-styles-wrapper) > section.vg-page-section:not(.vg-page-section--cta):not(.vg-page-section--signature-cta):nth-child(even of section.vg-page-section:not(.vg-page-section--cta):not(.vg-page-section--signature-cta)) {
    --vg-surface-background: #EFEDE6;
    background: #EFEDE6 !important;
  }

  /* The security-services page contains three audiences inside ONE chapter.
     Give each audience a separate, softly toned reading surface. No shadows,
     hover or new links: these are informational subsections, not CTA cards. */
  :is(.vg-site .vg-main, .editor-styles-wrapper) #privatpersonen-liegenschaften .vg-audience-scenarios {
    gap: 0;
    margin-block: clamp(1.4rem, 4vw, 2rem) 0;
  }
  :is(.vg-site .vg-main, .editor-styles-wrapper) #privatpersonen-liegenschaften .vg-audience-scenarios > .vg-content-subsection {
    box-sizing: border-box;
    margin: 0;
    min-width: 0;
    padding: clamp(1.5rem, 5vw, 2rem);
    background: #fff;
    border: 1px solid #DEDCD4;
    border-bottom: 0;
  }
  :is(.vg-site .vg-main, .editor-styles-wrapper) #privatpersonen-liegenschaften .vg-audience-scenarios > .vg-content-subsection:nth-child(even) {
    background: #EFEDE6;
  }
  :is(.vg-site .vg-main, .editor-styles-wrapper) #privatpersonen-liegenschaften .vg-audience-scenarios > .vg-content-subsection:last-child {
    border-bottom: 1px solid #DEDCD4;
  }
  :is(.vg-site .vg-main, .editor-styles-wrapper) #privatpersonen-liegenschaften .vg-audience-scenarios > .vg-content-subsection > h3 {
    margin-block: 0 1rem;
  }
  :is(.vg-site .vg-main, .editor-styles-wrapper) #privatpersonen-liegenschaften .vg-audience-scenarios > .vg-content-subsection > p {
    max-width: 64ch;
  }
}

@media (max-width: 767px) {
  /* The approved portrait shows two complete upper bodies. The previous
     11rem-high horizontal strip with a 30% vertical focal point hid both heads.
     Preserve text-first reading order while showing the actual scene. */
  :is(.vg-site .vg-main, .editor-styles-wrapper) .vg-primary-areas .vg-primary-area-card:not(.vg-primary-area-card--advisory) .vg-primary-area-card__media {
    height: clamp(16rem, 73vw, 20rem);
    max-height: none;
  }
  :is(.vg-site .vg-main, .editor-styles-wrapper) .vg-primary-areas .vg-primary-area-card:not(.vg-primary-area-card--advisory) .vg-primary-area-card__media img:not([style*="--vg-focus"]) {
    object-position: 50% 0% !important;
  }
}
