/* Scoped additions for backend layout "Simple Page mit linker Navigation".

   The two-column structure now deliberately reuses the same product-selection
   layout classes as the already finished template with product/kachel menus:
   - .product-selection-layout
   - .product-selection-sidebar
   - .product-selection-content

   This makes the left navigation/content distance identical to that template
   instead of approximating it with a separate SimplePage grid override. */

.simple-page-layout-section--left-navigation .simple-page-header-image--content {
  width: 100%;
  margin: 0 0 42px 0;
  overflow: hidden;
  background: #f5f5f5;
}

.simple-page-layout-section--left-navigation .simple-page-header-image--content .content-area,
.simple-page-layout-section--left-navigation .simple-page-header-image--content .frame,
.simple-page-layout-section--left-navigation .simple-page-header-image--content .ce-image,
.simple-page-layout-section--left-navigation .simple-page-header-image--content .ce-gallery,
.simple-page-layout-section--left-navigation .simple-page-header-image--content .ce-outer,
.simple-page-layout-section--left-navigation .simple-page-header-image--content .ce-inner,
.simple-page-layout-section--left-navigation .simple-page-header-image--content .ce-row,
.simple-page-layout-section--left-navigation .simple-page-header-image--content .ce-column,
.simple-page-layout-section--left-navigation .simple-page-header-image--content .image,
.simple-page-layout-section--left-navigation .simple-page-header-image--content .pn-image-grid,
.simple-page-layout-section--left-navigation .simple-page-header-image--content .pn-image-grid__item,
.simple-page-layout-section--left-navigation .simple-page-header-image--content figure,
.simple-page-layout-section--left-navigation .simple-page-header-image--content picture,
.simple-page-layout-section--left-navigation .simple-page-header-image--content a {
  display: block;
  width: 100% !important;
  max-width: none !important;
  margin: 0;
  padding: 0;
}

/*
 * The TYPO3 spacing class "frame-space-after-small" adds a 24px bottom margin
 * to the image content element. Inside the header-image area this would make
 * the outer image container taller than the actual image.
 */
.simple-page-layout-section--left-navigation .simple-page-header-image--content > .content-area > .frame {
  margin-bottom: 0 !important;
}

.simple-page-layout-section--left-navigation .simple-page-header-image--content .pn-image-grid,
.simple-page-layout-section--left-navigation .simple-page-header-image--content .ce-image,
.simple-page-layout-section--left-navigation .simple-page-header-image--content .ce-gallery,
.simple-page-layout-section--left-navigation .simple-page-header-image--content .ce-outer,
.simple-page-layout-section--left-navigation .simple-page-header-image--content .ce-inner,
.simple-page-layout-section--left-navigation .simple-page-header-image--content .ce-row {
  display: block;
}

.simple-page-layout-section--left-navigation .simple-page-header-image--content img,
.simple-page-layout-section--left-navigation .simple-page-header-image--content .image-embed-item {
  display: block;
  width: 100% !important;
  max-width: none !important;
  height: auto;
  aspect-ratio: 16 / 5;
  object-fit: cover;
}

/* Exact layout alignment with the product-selection/kachel template.
   These declarations intentionally keep the same 4-column grid and 18px gap.
   The rules are scoped and specific enough to override the older SimplePage
   max-width rule from reinecker.css without changing other templates. */
.simple-page-layout-section--left-navigation .simple-page-layout {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}

.simple-page-layout-section--left-navigation .simple-page-sidebar {
  grid-column: span 1;
  min-width: 0;
}

.simple-page-layout-section--left-navigation .simple-page-layout > .simple-page-content {
  grid-column: span 3;
  width: 100%;
  max-width: none;
  min-width: 0;
  margin-left: 0;
  margin-right: 0;
}

/* The shared simple-page CSS resets nav links to a flat width. For this
   backend layout we intentionally restore the small stepped indentation from
   the product-selection navigation used in the finished left-nav template. */
.simple-page-layout-section--left-navigation .simple-page-side-nav.left-navigation-content-nav .product-selection-nav-link--level-1 {
  width: 100%;
  margin-left: 0;
}

.simple-page-layout-section--left-navigation .simple-page-side-nav.left-navigation-content-nav .product-selection-nav-link--level-2 {
  width: calc(100% - 17px);
  margin-left: 17px;
}

.simple-page-layout-section--left-navigation .simple-page-side-nav.left-navigation-content-nav .product-selection-nav-link--level-3 {
  width: calc(100% - 34px);
  margin-left: 34px;
}

@media (max-width: 1199.98px) {
  .simple-page-layout-section--left-navigation .simple-page-layout {
    grid-template-columns: 1fr;
  }

  .simple-page-layout-section--left-navigation .simple-page-sidebar {
    display: none;
  }

  .simple-page-layout-section--left-navigation .simple-page-layout > .simple-page-content {
    grid-column: auto;
    max-width: none;
  }
}

@media (max-width: 991.98px) {
  .simple-page-layout-section--left-navigation .simple-page-header-image--content {
    margin-bottom: 34px;
  }

  .simple-page-layout-section--left-navigation .simple-page-header-image--content img {
    aspect-ratio: 16 / 7;
  }
}

@media (max-width: 575.98px) {
  .simple-page-layout-section--left-navigation .simple-page-header-image--content img {
    aspect-ratio: 4 / 3;
  }
}

/* Simple-page content typography
   Matches the already finished product/kachel page template typography used in
   left-navigation-content.css and the static reference
   dist/produkte-fuer-sehbehinderte-elektronische-lupen.html.

   Scope is deliberately limited to the right content column of the backend
   layout "Simple Page mit linker Navigation" so finished content elements,
   menus and other page templates remain untouched. */
.simple-page-layout-section--left-navigation .simple-page-text-content > .content-area > .frame-type-header {
  margin: 0 0 16px 0;
}

.simple-page-layout-section--left-navigation .simple-page-text-content > .content-area > .frame-type-header:first-child {
  margin-bottom: 18px;
}

.simple-page-layout-section--left-navigation .simple-page-text-content > .content-area > .frame-type-header header {
  margin: 0;
  text-align: left;
}

.simple-page-layout-section--left-navigation .simple-page-text-content > .content-area > .frame-type-header h1 {
  margin: 0;
  font-size: clamp(2rem, 3vw, 2.75rem);
  line-height: 1.08;
  font-weight: 600;
  letter-spacing: normal;
  text-transform: none;
}

.simple-page-layout-section--left-navigation .simple-page-text-content > .content-area > .frame-type-header h2 {
  margin: 0 0 3px 0;
  font-size: clamp(1.45rem, 1.8vw, 2rem);
  line-height: 1.1;
  font-weight: 600;
  letter-spacing: normal;
  text-transform: none;
}

.simple-page-layout-section--left-navigation .simple-page-text-content > .content-area > .frame-type-header h3 {
  margin: 0;
  font-size: 16px;
  line-height: 1.25;
  font-weight: 500;
  letter-spacing: normal;
  text-transform: none;
}

@media (max-width: 1199.98px) {
  .simple-page-layout-section--left-navigation .simple-page-text-content > .content-area > .frame-type-header h1 {
    font-size: 2.05rem;
  }
}

@media (max-width: 767.98px) {
  .simple-page-layout-section--left-navigation .simple-page-text-content > .content-area > .frame-type-header h2 {
    font-size: 1.4rem;
  }

  .simple-page-layout-section--left-navigation .simple-page-text-content > .content-area > .frame-type-header h3 {
    font-size: 16px;
  }
}