/* OffertaLogica Informa — home editoriale v0.11.7 */
body[data-editorial-view="archive"] .ol-hero {
  padding: 28px 0 12px;
}

body[data-editorial-view="archive"] .ol-hero h1 {
  margin: 4px 0 8px;
  font-size: clamp(34px, 4.7vw, 52px);
  line-height: 1.02;
}

body[data-editorial-view="archive"] .ol-hero p {
  max-width: 760px;
  font-size: 17px;
  line-height: 1.55;
}

body[data-editorial-view="archive"] .ol-informa-lead-section {
  padding-top: 10px;
}

body[data-editorial-view="archive"] .ol-informa-lead-grid {
  grid-template-columns: minmax(0, 1.7fr) minmax(290px, .78fr);
  gap: 24px;
}

body[data-editorial-view="archive"] .ol-section-heading {
  margin-bottom: 10px;
}

body[data-editorial-view="archive"] .ol-section-heading h2 {
  font-size: 24px;
}

/* Allineamento desktop: il primo riquadro guida parte alla stessa quota della card principale. */
body[data-editorial-view="archive"] .ol-informa-guides {
  margin-top: 20px;
}

/* Articolo principale: immagine + contenuto con gerarchia editoriale stabile. */
body[data-editorial-view="archive"] .ol-informa-featured .ol-article-item-featured {
  display: grid;
  grid-template-columns: minmax(230px, .88fr) minmax(0, 1.35fr);
  grid-template-areas:
    "media badge"
    "media meta"
    "media title"
    "media excerpt"
    "media author";
  grid-template-rows: auto auto auto 1fr auto;
  column-gap: 24px;
  row-gap: 8px;
  min-height: 320px;
  padding: 22px;
  overflow: hidden;
  background: #fff;
  border-color: #86efac;
}

body[data-editorial-view="archive"] .ol-informa-featured .ol-article-item-featured:not(.ol-article-item-has-image) {
  grid-template-columns: 1fr;
  grid-template-areas:
    "badge"
    "meta"
    "title"
    "excerpt"
    "author";
  min-height: 260px;
}

.ol-archive-image-link {
  display: block;
  overflow: hidden;
  background: #e2e8f0;
  text-decoration: none;
}

.ol-archive-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

body[data-editorial-view="archive"] .ol-informa-featured .ol-archive-image-link {
  grid-area: media;
  min-height: 100%;
  border-radius: 10px;
}

body[data-editorial-view="archive"] .ol-informa-featured .ol-new-badge {
  grid-area: badge;
  width: max-content;
  margin: 0 0 2px;
}

body[data-editorial-view="archive"] .ol-informa-featured .ol-article-meta {
  grid-area: meta;
  margin: 0;
  padding: 0;
}

body[data-editorial-view="archive"] .ol-informa-featured .ol-article-item-featured h3 {
  grid-area: title;
  display: block;
  min-height: 0;
  margin: 0;
  overflow: visible;
  font-size: clamp(27px, 3vw, 36px);
  line-height: 1.12;
  -webkit-line-clamp: unset;
}

body[data-editorial-view="archive"] .ol-informa-featured .ol-article-item-featured > p {
  grid-area: excerpt;
  margin: 0;
  font-size: 16px;
  line-height: 1.55;
}

.ol-card-author-row {
  display: flex;
  align-items: center;
  min-width: 0;
}

body[data-editorial-view="archive"] .ol-informa-featured .ol-card-author-row {
  grid-area: author;
  padding-top: 5px;
  border-top: 1px solid #e2e8f0;
}

.ol-card-author {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
  color: #334155;
  font-size: 13px;
  font-weight: 850;
  text-decoration: none;
}

.ol-card-author[href]:hover {
  color: var(--ol-primary-dark);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.ol-card-author:focus-visible {
  outline: 3px solid #1d4ed8;
  outline-offset: 3px;
  border-radius: 999px;
}

.ol-card-author-avatar {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--ol-border);
  border-radius: 50%;
  background: #e2e8f0;
  color: #334155;
  font-weight: 900;
}

.ol-card-author-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Guide: più compatte e visivamente subordinate all'articolo principale. */
body[data-editorial-view="archive"] .ol-resource-list {
  gap: 8px;
}

body[data-editorial-view="archive"] .ol-resource-list .ol-resource-card {
  min-height: 66px;
  padding: 11px 13px;
  border-radius: 11px;
  box-shadow: none;
}

body[data-editorial-view="archive"] .ol-resource-list .ol-resource-card strong {
  font-size: 14px;
}

/* Archivio: card uniformi, immagini 16:9 e autore sempre in fondo. */
body[data-editorial-view="archive"] .ol-more-articles-section {
  padding-top: 18px;
}

body[data-editorial-view="archive"] .ol-more-articles-section .ol-article-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

body[data-editorial-view="archive"] .ol-more-articles-section .ol-article-item {
  display: flex;
  height: 100%;
  min-height: 260px;
  padding: 16px;
  overflow: hidden;
  border-radius: 12px;
}

body[data-editorial-view="archive"] .ol-more-articles-section .ol-article-item.ol-article-item-has-image {
  min-height: 390px;
}

body[data-editorial-view="archive"] .ol-more-articles-section .ol-archive-image-link {
  width: calc(100% + 32px);
  aspect-ratio: 16 / 9;
  flex: 0 0 auto;
  margin: -16px -16px 14px;
  border-bottom: 1px solid var(--ol-border);
}

body[data-editorial-view="archive"] .ol-more-articles-section .ol-article-meta {
  margin-bottom: 8px;
  font-size: 12px;
}

body[data-editorial-view="archive"] .ol-more-articles-section .ol-article-item h3 {
  min-height: 0;
  margin-bottom: 8px;
  font-size: 20px;
  line-height: 1.2;
  -webkit-line-clamp: 3;
}

body[data-editorial-view="archive"] .ol-more-articles-section .ol-article-item > p {
  margin-bottom: 14px;
  font-size: 14px;
  line-height: 1.48;
  -webkit-line-clamp: 3;
}

body[data-editorial-view="archive"] .ol-more-articles-section .ol-card-author-row {
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid #e2e8f0;
}

/* Disattiva il vecchio autore flottante se il JS base lo inserisce prima dell'enhancement. */
body[data-editorial-view="archive"] .ol-featured-author {
  position: static;
}

@media (max-width: 980px) {
  body[data-editorial-view="archive"] .ol-informa-guides {
    margin-top: 0;
  }

  body[data-editorial-view="archive"] .ol-informa-lead-grid {
    grid-template-columns: 1fr;
  }

  body[data-editorial-view="archive"] .ol-resource-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body[data-editorial-view="archive"] .ol-more-articles-section .ol-article-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  body[data-editorial-view="archive"] .ol-hero {
    padding-top: 24px;
  }

  body[data-editorial-view="archive"] .ol-hero h1 {
    font-size: clamp(34px, 10.8vw, 46px);
  }

  body[data-editorial-view="archive"] .ol-hero p {
    font-size: 16px;
  }

  body[data-editorial-view="archive"] .ol-informa-featured .ol-article-item-featured,
  body[data-editorial-view="archive"] .ol-informa-featured .ol-article-item-featured.ol-article-item-has-image {
    grid-template-columns: 1fr;
    grid-template-areas:
      "media"
      "badge"
      "meta"
      "title"
      "excerpt"
      "author";
    min-height: 0;
    padding: 16px;
    row-gap: 9px;
  }

  body[data-editorial-view="archive"] .ol-informa-featured .ol-archive-image-link {
    width: calc(100% + 32px);
    aspect-ratio: 16 / 9;
    min-height: 0;
    margin: -16px -16px 6px;
    border-radius: 12px 12px 0 0;
    border-bottom: 1px solid var(--ol-border);
  }

  body[data-editorial-view="archive"] .ol-informa-featured .ol-article-item-featured h3 {
    font-size: clamp(25px, 7.8vw, 32px);
    line-height: 1.12;
  }

  body[data-editorial-view="archive"] .ol-resource-list,
  body[data-editorial-view="archive"] .ol-more-articles-section .ol-article-list {
    grid-template-columns: 1fr;
  }

  body[data-editorial-view="archive"] .ol-more-articles-section .ol-article-item,
  body[data-editorial-view="archive"] .ol-more-articles-section .ol-article-item.ol-article-item-has-image {
    min-height: 0;
  }
}
