/*
 * DRE hub — Light Atelier production layout (/interior-doors/dre/).
 * Composition from layout-preview V6; CMS-backed. Shell: --storefront-content-max.
 * Legacy archive: interior_doors_dre_legacy.css (not routed).
 */

body.footer-interior-doors-dre {
  --idre-blue: #123c86;
  --idre-navy: #0e3477;
  --idre-muted: #49618d;
  --idre-line: #d0d9e8;
  --idre-shell: var(--storefront-content-max, 1248px);
  background: #f3f8fe;
}

/* Outer gutter (like PVC .pvc-latvia-guide) — content sits on white surface */
.idre-page {
  width: 100%;
  margin: 0;
  padding: 18px 0 36px;
  color: #20365f;
  font-family: var(--font-sans);
}

/* White substrate only — same idea as .pvc-guide__surface */
.idre-page__surface {
  overflow: hidden;
  width: min(var(--idre-shell), calc(100% - 32px));
  margin-inline: auto;
  border: 1px solid rgba(116, 156, 204, 0.28);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 18px 48px rgba(23, 73, 130, 0.08);
}

/* Body under full-bleed hero (no second card — surface is the only shell) */
.idre-atelier {
  padding: 18px clamp(14px, 2vw, 24px) 24px;
}

.idre-crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 16px;
  color: #657185;
  font-size: var(--text-small);
}

.idre-crumbs a {
  color: var(--idre-navy);
  font-weight: 700;
  text-decoration: none;
}

.idre-crumbs a:hover {
  text-decoration: underline;
}

.idre-kicker {
  margin: 0 0 8px;
  color: var(--idre-blue);
  font-size: var(--text-caption);
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.idre-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 8px;
  font-size: var(--text-body);
  font-weight: 700;
  text-decoration: none;
  border: 1px solid transparent;
}

.idre-btn--primary {
  background: var(--idre-blue);
  color: #fff;
  box-shadow: 0 8px 20px rgba(18, 60, 134, 0.2);
}

.idre-btn--primary:hover {
  background: var(--idre-navy);
}

.idre-btn--ghost {
  background: #fff;
  color: var(--idre-blue);
  border-color: #b8c9e2;
}

.idre-btn--ghost:hover {
  border-color: var(--idre-blue);
  background: #f3f8fe;
}

/* --- Hero: full-bleed composite image (text baked into PNG) --- */
.idre-hero {
  position: relative;
  width: 100%;
  margin: 0;
  border: 0;
  border-bottom: 1px solid rgba(116, 156, 204, 0.28);
  border-radius: 0;
  overflow: hidden;
  background: #eef3fa;
  box-shadow: none;
}

.idre-hero--image {
  display: block;
  line-height: 0;
}

/* Full composite artboard — no crop */
.idre-hero__image {
  display: block;
  width: 100%;
  line-height: 0;
}
.idre-hero__image img {
  display: block;
  width: 100%;
  height: auto;
  max-height: none;
  object-fit: contain;
  object-position: center top;
}

.idre-hero__mobile {
  display: none;
}

/* Desktop: CMS title stays for SEO/a11y; compact note sits on the photo. */
.idre-hero__copy {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.idre-hero__note {
  position: absolute;
  z-index: 2;
  top: calc(20% - 13px);
  left: 4.4%;
  max-width: min(360px, 34%);
  margin: 0;
  line-height: 1.35;
  color: #10244a;
  pointer-events: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

.idre-hero__note-kicker,
.idre-hero__note-title,
.idre-hero__note-lead {
  display: block;
}

.idre-hero__note-kicker {
  margin: 0 0 14px;
  color: #000;
  font-family: "Grenze Gotisch", "Times New Roman", serif;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.04em;
  -webkit-text-fill-color: #000;
}

.idre-hero__note-sep {
  display: inline;
  margin: 0 0.7em;
  letter-spacing: 0;
  font-weight: 400;
}

.idre-hero__note-title {
  font-family: var(--font-display);
  font-size: clamp(22px, 1.87vw, 28px);
  font-weight: var(--fw-title);
  letter-spacing: -0.02em;
  color: #0b1220;
}

.idre-hero__note-lead {
  margin: 8px 0 0;
  color: #0b1220;
  font-size: clamp(calc(17px * 0.95), calc(1.36vw * 0.95), calc(20px * 0.95));
  font-weight: 500;
  line-height: 1.45;
}

.idre-hero__title {
  margin: 0;
}

.idre-hero__lead {
  margin: 0;
}

.idre-crumbs--on-hero {
  position: absolute;
  z-index: 2;
  top: 12px;
  left: 14px;
  right: 14px;
  margin: 0;
  padding: 0;
  width: fit-content;
  max-width: calc(100% - 28px);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  line-height: 1.3;
  color: #0b1220;
  font-size: calc(var(--text-small) + 1px);
  text-shadow: none;
  filter: none;
}

.idre-crumbs--on-hero a,
.idre-crumbs--on-hero a:visited,
.idre-crumbs--on-hero a:hover,
.idre-crumbs--on-hero span {
  color: #0b1220;
  font-weight: 700;
  font-style: normal;
  text-decoration: none;
}

.idre-crumbs--on-hero a,
.idre-crumbs--on-hero [aria-current="page"] {
  border-bottom: 1px solid #0b1220;
  padding-bottom: 1px;
}

.idre-crumbs--on-hero > span[aria-hidden="true"] {
  border-bottom: 0;
  padding-bottom: 0;
}

/* --- Content body (flat on surface; original nested shell removed) --- */
.idre-shell {
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.idre-section {
  margin-top: 36px;
}

.idre-section:first-child {
  margin-top: 0;
}

.idre-section__head h2 {
  margin: 0 0 8px;
  color: var(--idre-navy);
  font-family: var(--font-display);
  font-size: clamp(22px, 3vw, 28px);
  font-weight: var(--fw-display);
}

#idre-supreme .idre-section__head {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

#idre-supreme .idre-section__head h2 {
  width: fit-content;
  max-width: 100%;
  margin: 0 auto;
  text-align: center;
}

#idre-supreme .idre-section__head h2::after {
  content: "";
  display: block;
  width: 100%;
  height: 2px;
  margin-top: 8px;
  background: var(--idre-navy);
}

.idre-section__head p {
  margin: 0 0 18px;
  color: var(--idre-muted);
  font-family: var(--font-sans);
  font-size: var(--text-body);
  line-height: 1.45;
}

/* SUPREME stacked deck — portrait door product shots (~378×898) */
.idre-deck {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-end;
  gap: 0;
  min-height: 280px;
  padding: 31px 8px 32px;
}

.idre-deck__card {
  position: relative;
  width: min(36vw, 200px);
  margin-left: -32px;
  text-decoration: none;
  color: var(--idre-navy);
  transform: rotate(calc((var(--i, 0) - 2) * 2.2deg)) translateY(calc(var(--i, 0) * 6px));
  transition: transform 0.2s ease, z-index 0s;
  z-index: calc(10 - var(--i, 0));
}

.idre-deck__card:first-child {
  margin-left: 0;
}

.idre-deck__card:hover {
  transform: rotate(0deg) translateY(-10px) scale(1.03);
  z-index: 20;
}

.idre-deck__card img {
  width: 100%;
  /* Match source door ratio so the leaf fills the frame without crop */
  aspect-ratio: 378 / 898;
  height: auto;
  min-height: 320px;
  max-height: min(52vh, 480px);
  object-fit: contain;
  object-position: center bottom;
  border-radius: 14px;
  border: 2px solid #fff;
  box-shadow: 0 16px 40px rgba(18, 60, 134, 0.16);
  display: block;
  background: linear-gradient(180deg, #f7faff 0%, #eef3fa 100%);
}

.idre-deck__card span {
  display: block;
  margin-top: 10px;
  font-size: var(--text-caption);
  font-weight: var(--fw-title);
  color: var(--idre-navy);
  text-align: center;
}

/* Classic + special gallery */
.idre-gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 18px;
}

.idre-gallery__item {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid var(--idre-line);
  text-decoration: none;
  color: inherit;
  background: #fff;
  box-shadow: 0 8px 22px rgba(18, 60, 134, 0.06);
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.idre-gallery__item:hover {
  border-color: #a8bfd9;
  box-shadow: 0 12px 28px rgba(18, 60, 134, 0.1);
}

.idre-gallery__item--shift {
  transform: translateY(18px);
}

.idre-gallery__item--no-media {
  grid-template-columns: 1fr;
}

.idre-gallery__item img {
  width: 100%;
  height: 100%;
  min-height: 154px;
  object-fit: cover;
  display: block;
  background: #eef3fa;
}

.idre-gallery__item div {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 16px;
  background: #f7faff;
}

.idre-gallery__item strong {
  color: var(--idre-navy);
  font-size: var(--text-lg);
  font-weight: var(--fw-title);
}

.idre-gallery__item em {
  margin-top: 6px;
  color: var(--idre-muted);
  font-size: var(--text-small);
  font-style: normal;
  line-height: 1.4;
}

/* Benefits */
.idre-benefits {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.idre-benefits article {
  padding: 16px;
  border-radius: 12px;
  border: 1px solid var(--idre-line);
  background: #f8fbfe;
}

.idre-benefits__mark {
  display: block;
  width: 28px;
  height: 2px;
  margin-bottom: 12px;
  background: linear-gradient(90deg, var(--idre-blue), transparent);
}

.idre-benefits strong {
  display: block;
  margin-bottom: 6px;
  color: var(--idre-navy);
  font-size: var(--text-body);
}

.idre-benefits p {
  margin: 0;
  color: var(--idre-muted);
  font-size: var(--text-small);
  line-height: 1.4;
}

.idre-benefits__link {
  display: inline-block;
  margin-top: 10px;
  color: var(--idre-blue);
  font-size: var(--text-small);
  font-weight: 700;
  text-decoration: none;
}

.idre-benefits__link:hover {
  text-decoration: underline;
}

/* CTA band */
.idre-cta {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 0;
  margin-top: 40px;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid var(--idre-line);
  background: #fff;
  box-shadow: 0 14px 36px rgba(18, 60, 134, 0.08);
}

.idre-cta:not(:has(img)) {
  grid-template-columns: 1fr;
}

.idre-cta img {
  width: 100%;
  height: 100%;
  min-height: 240px;
  object-fit: cover;
  display: block;
}

.idre-cta div {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
  padding: 28px;
  background: linear-gradient(160deg, #f7fbff, #fff);
}

.idre-cta h2 {
  margin: 0;
  color: var(--idre-navy);
  font-family: var(--font-display);
  font-size: clamp(22px, 3vw, 28px);
  font-weight: 500;
}

.idre-cta p {
  margin: 0;
  color: var(--idre-muted);
  font-size: var(--text-body);
  line-height: 1.5;
}

.idre-cta .idre-btn {
  align-self: flex-start;
}

@media (max-width: 1023px) {
  .idre-gallery {
    grid-template-columns: 1fr;
  }

  .idre-gallery__item--shift {
    transform: none;
  }

  .idre-benefits {
    grid-template-columns: 1fr 1fr;
  }

  .idre-cta {
    grid-template-columns: 1fr;
  }

  .idre-cta img {
    min-height: 180px;
    max-height: 220px;
  }
}

@media (max-width: 767px) {
  .idre-hero,
  .idre-hero--image {
    display: flex;
    flex-direction: column;
    line-height: inherit;
    background-color: #f3f8fe;
    background-image:
      linear-gradient(rgba(18, 60, 134, 0.07) 1px, transparent 1px),
      linear-gradient(90deg, rgba(18, 60, 134, 0.07) 1px, transparent 1px);
    background-size: 28px 28px;
  }

  .idre-crumbs--on-hero {
    position: relative;
    z-index: 2;
    top: auto;
    left: auto;
    right: auto;
    order: 1;
    width: auto;
    max-width: none;
    margin: 0;
    padding: 16px 20px 0;
    background: transparent;
    box-shadow: none;
    border-radius: 0;
    color: #0b1220;
    text-shadow: none;
    filter: none;
  }

  .idre-crumbs--on-hero a,
  .idre-crumbs--on-hero a:visited,
  .idre-crumbs--on-hero a:hover,
  .idre-crumbs--on-hero span {
    color: #0b1220;
    font-weight: 700;
    font-style: normal;
    text-decoration: none;
  }

  .idre-crumbs--on-hero a,
  .idre-crumbs--on-hero [aria-current="page"] {
    border-bottom-color: #0b1220;
  }

  .idre-hero__copy {
    position: relative;
    order: 2;
    width: auto;
    height: auto;
    margin: 0;
    padding: 16px 20px 18px;
    overflow: visible;
    clip: auto;
    white-space: normal;
    border: 0;
  }

  .idre-hero__note {
    display: none;
  }

  .idre-hero__title {
    color: #0e3477;
    font-family: var(--font-display);
    font-size: clamp(36px, 4.5vw, 48px);
    font-weight: 600;
    line-height: 1.15;
  }

  .idre-hero__lead {
    margin-top: 12px;
    color: #49618d;
    font-size: var(--text-small);
    line-height: 1.5;
  }

  .idre-hero__image {
    display: none;
  }

  .idre-hero__mobile {
    display: block;
    order: 3;
    width: calc(100% - 16px);
    margin-inline: 8px;
    margin-bottom: 8px;
    line-height: 0;
  }

  .idre-hero__mobile img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
    object-position: center top;
  }
}

@media (max-width: 640px) {
  .idre-page {
    padding: 8px 0 16px;
  }

  .idre-page__surface {
    width: min(var(--idre-shell), calc(100% - 16px));
    border-radius: 10px;
  }

  .idre-atelier {
    padding: 12px 12px 18px;
  }

  .idre-hero {
    border-radius: 0;
  }

  .idre-crumbs--on-hero {
    padding: 12px 16px 0;
    font-size: calc(var(--text-caption) + 1px);
  }

  .idre-hero__copy {
    padding: 12px 16px 16px;
  }

  .idre-benefits {
    grid-template-columns: 1fr;
  }

  .idre-deck {
    justify-content: center;
    padding-bottom: 20px;
  }

  .idre-deck__card {
    width: min(46vw, 168px);
    margin-left: -22px;
  }

  .idre-deck__card img {
    min-height: 260px;
    max-height: 380px;
  }

  .idre-gallery__item {
    grid-template-columns: 1fr;
  }

  .idre-gallery__item img {
    min-height: 174px;
    max-height: 214px;
  }

  .idre-cta h2 {
    font-size: clamp(22px, 3vw, 28px);
  }

  .idre-cta div {
    padding: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .idre-deck__card {
    transition: none;
  }
}
