/* =========================================================
   Custom.css – FORCE Issuu full width in Swift Text advanced
   ========================================================= */

/* 1. Når Text advanced indeholder Issuu, må den IKKE centeres */
@supports selector(div:has(iframe)) {

  .item_swift_textadvanced:has(iframe[src*="e.issuu.com"]) {
    justify-content: stretch !important;
    align-items: stretch !important;
  }

  .item_swift_textadvanced:has(iframe[src*="e.issuu.com"]) > .d-inline-flex {
    display: flex !important;       /* stop inline-flex shrink */
    width: 100% !important;
    max-width: 100% !important;
  }
}

/* 2. Fjern evt. font-size wrapper-begrænsning */
.item_swift_textadvanced .fs-6 {
  width: 100% !important;
  max-width: 100% !important;
}

/* 3. Issuu iframe – responsiv */
.item_swift_textadvanced iframe[src*="e.issuu.com"] {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  border: 0 !important;

  aspect-ratio: 4 / 3;
  height: auto !important;
  min-height: 720px;
  max-height: 90vh;
}

/* 4. Desktop: lidt bredere look */
@media (min-width: 992px) {
  .item_swift_textadvanced iframe[src*="e.issuu.com"] {
    aspect-ratio: 3 / 2;
    min-height: 760px;
  }
}
/* ===== Issuu: Mobile fix (avoid tiny 2-page spread) ===== */
@media (max-width: 768px) {

  /* Sørg for at wrapper ikke shrinker/centrerer */
  .item_swift_textadvanced {
    justify-content: stretch !important;
    align-items: stretch !important;
  }

  .item_swift_textadvanced > .d-inline-flex {
    display: flex !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .item_swift_textadvanced .fs-6 {
    width: 100% !important;
    max-width: 100% !important;
  }

  /* Giv Issuu en høj (portrait) ramme, så den skifter til “mobil/single page” UI */
  .item_swift_textadvanced iframe[src*="e.issuu.com/embed.html"] {
    width: 100% !important;
    max-width: 100% !important;
    border: 0 !important;

    /* VIGTIGT: Drop desktop clamps, som kan gøre den lille */
    max-height: none !important;
    height: 78vh !important;      /* justér 70–85vh efter behov */
    min-height: 650px !important;

    /* Portrait ratio hjælper Issuu til mobil-layout */
    aspect-ratio: 3 / 4 !important;
  }
}
@media (max-width: 480px) {
  .item_swift_textadvanced iframe[src*="e.issuu.com/embed.html"] {
    aspect-ratio: 9 / 16 !important;
    height: 82vh !important;
    min-height: 700px !important;
  }
}
/* default: desktop iframe vises */
.issuu-mobile { display: none; }
.issuu-desktop { display: block; }

/* fælles højde */
.issuu-embed iframe {
  display: block;
  width: 100%;
  height: 80vh;
  min-height: 650px;
  border: 0;
}

/* mobil: vis singlePage iframe */
@media (max-width: 768px) {
  .issuu-mobile { display: block; }
  .issuu-desktop { display: none; }

  .issuu-embed iframe {
    height: 82vh;
    min-height: 700px;
  }
}

