/*
Theme Name: SCRIPTUS Destaques Seguros
Template: scriptus-editorial
Version: 2.8.0
Description: Tema filho com mudanças restritas aos quatro destaques da página inicial.
Text Domain: scriptus-destaques
*/
.highlights .scriptus-highlight-column{min-width:0;}
.highlights .scriptus-feature{height:100%;}
.highlights .scriptus-feature h3 a{color:inherit;text-decoration:none;}
.highlights .scriptus-feature h3 a:hover{text-decoration:underline;}
.highlights .scriptus-feature audio{width:100%;margin:14px 0;}
.highlights .scriptus-feature .featured-video{margin-top:8px;width:100%;}
.highlights .scriptus-feature .featured-video iframe,.highlights .scriptus-feature video{display:block;width:100%;aspect-ratio:16/9;max-width:100%;}
.highlights .scriptus-feature .article-excerpt{overflow-wrap:anywhere;}

/* Keep the article introduction readable beside the video highlight. */
.highlights .scriptus-feature .article-excerpt{line-height:1.7;}

.highlights .scriptus-highlight-subtitle{margin:12px 0 8px;font-weight:500;line-height:1.55;}
.highlights .scriptus-highlight-intro{margin-top:8px;}

/* Editorial subtitle between article title and author, LER only. */
.written-heading .scriptus-ler-header-subtitle{font-family:'Cormorant Garamond',Georgia,serif;font-size:clamp(19px,2.1vw,27px);line-height:1.35;font-weight:400;margin:14px 0 22px;max-width:840px;color:var(--foreground,#20201e);}

/* Subtitle needs to be legible even when parent theme sets .written-heading p. */
body .written-article .written-heading p.scriptus-ler-header-subtitle {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(21px, 2.1vw, 25px);
  line-height: 1.42;
  font-weight: 400;
  letter-spacing: normal;
  text-transform: none;
  color: #514a43;
  margin: 16px 0 22px;
  max-width: 760px;
}
@media (max-width: 700px) {
  body .written-article .written-heading p.scriptus-ler-header-subtitle {
    font-size: 19px;
    line-height: 1.4;
    margin: 12px 0 18px;
  }
}

/* LER: breathing room after editorial header and first-line paragraph indents. */
body .written-page .written-article .written-heading {
  margin-bottom: 44px;
  padding-bottom: 38px;
}
body .written-page .written-article .written-body > p {
  text-indent: 1.45em;
}
/* Do not indent standalone media/captions or aligned WordPress elements. */
body .written-page .written-article .written-body > p:has(img),
body .written-page .written-article .written-body > p:has(audio),
body .written-page .written-article .written-body > p:has(video),
body .written-page .written-article .written-body > p.has-text-align-center,
body .written-page .written-article .written-body > p.has-text-align-right {
  text-indent: 0;
}
@media (max-width: 700px) {
  body .written-page .written-article .written-heading {
    margin-bottom: 34px;
    padding-bottom: 30px;
  }
  body .written-page .written-article .written-body > p {
    text-indent: 1.2em;
  }
}

/* v1.7: larger editorial theme of LER articles, without changing title or body. */
body .written-page .written-article .written-heading p.scriptus-ler-header-subtitle {
  font-size: clamp(26px, 2.45vw, 31px);
  line-height: 1.34;
  margin: 18px 0 26px;
  max-width: 840px;
}
@media (max-width: 700px) {
  body .written-page .written-article .written-heading p.scriptus-ler-header-subtitle {
    font-size: 23px;
    line-height: 1.38;
    margin: 16px 0 23px;
  }
}


/* v1.8: generous separation between article heading and content. */
body .written-page .written-article .written-heading { margin-bottom: 68px; padding-bottom: 42px; }
body .written-page .written-article .written-body { padding-top: 18px; }
/* Introductory internal heading and following paragraph remain distinct. */
body .written-page .written-article .written-body > h2:first-child,
body .written-page .written-article .written-body > h3:first-child,
body .written-page .written-article .written-body > h4:first-child,
body .written-page .written-article .written-body > p:first-child:not(:only-child) { margin-bottom: 34px; }
@media (max-width:700px) {
body .written-page .written-article .written-heading { margin-bottom: 46px; padding-bottom: 32px; }
body .written-page .written-article .written-body { padding-top: 12px; }
body .written-page .written-article .written-body > h2:first-child,
body .written-page .written-article .written-body > h3:first-child,
body .written-page .written-article .written-body > h4:first-child,
body .written-page .written-article .written-body > p:first-child:not(:only-child) { margin-bottom: 26px; }
}

/* v1.9: first-line indentation in LER article paragraphs.
   Does not affect navigation cards, highlights, headings or excerpts. */
body .written-page .written-article .written-body > p:not(.has-text-align-center):not(.has-text-align-right):not(:has(img, audio, video, iframe)) {
  text-indent: 2.2em;
}
@media (max-width: 700px) {
  body .written-page .written-article .written-body > p:not(.has-text-align-center):not(.has-text-align-right):not(:has(img, audio, video, iframe)) {
    text-indent: 1.7em;
  }
}

/* v2.0: high-specificity paragraph indentation, checked against Safari inspector.
   Excludes first-level media and alignment paragraphs; leaves all other layout unchanged. */
html body.single-post .written-page .written-article .written-body > p.wp-block-paragraph,
html body.single-post .written-page .written-article .written-body > p:not([class]) {
  text-indent: 2.2em;
}
html body.single-post .written-page .written-article .written-body > p:has(img, audio, video, iframe),
html body.single-post .written-page .written-article .written-body > p.has-text-align-center,
html body.single-post .written-page .written-article .written-body > p.has-text-align-right {
  text-indent: 0;
}
@media (max-width:700px) {
  html body.single-post .written-page .written-article .written-body > p.wp-block-paragraph,
  html body.single-post .written-page .written-article .written-body > p:not([class]) {
    text-indent: 1.7em;
  }
}

/* v2.1: precise layout correction based on Safari DOM inspection.
   The earlier v1.8 spacing expanded the gap ABOVE the internal heading.
   Restore the original heading-to-body rhythm and enlarge the gap BELOW h2. */
html body.single-post .written-page .written-article .written-heading {
  margin-bottom: 32px;
  padding-bottom: 18px;
}
html body.single-post .written-page .written-article .written-body {
  padding-top: 0;
}
html body.single-post .written-page .written-article .written-body > h2:first-child,
html body.single-post .written-page .written-article .written-body > h3:first-child,
html body.single-post .written-page .written-article .written-body > h4:first-child {
  margin-bottom: 56px;
}
/* Paragraph indentation, including Gutenberg's wp-block-paragraph markup. */
html body.single-post .written-page .written-article .written-body > p,
html body.single-post .written-page .written-article .written-body > p.wp-block-paragraph {
  text-indent: 3em !important;
}
/* Do not indent media, captions and explicitly aligned paragraphs. */
html body.single-post .written-page .written-article .written-body > p:has(img, audio, video, iframe),
html body.single-post .written-page .written-article .written-body > p.has-text-align-center,
html body.single-post .written-page .written-article .written-body > p.has-text-align-right {
  text-indent: 0 !important;
}
@media (max-width:700px) {
  html body.single-post .written-page .written-article .written-heading {margin-bottom:26px;padding-bottom:16px;}
  html body.single-post .written-page .written-article .written-body > h2:first-child,
  html body.single-post .written-page .written-article .written-body > h3:first-child,
  html body.single-post .written-page .written-article .written-body > h4:first-child {margin-bottom:38px;}
  html body.single-post .written-page .written-article .written-body > p,
  html body.single-post .written-page .written-article .written-body > p.wp-block-paragraph {text-indent:2em !important;}
}

/* OUVIR: cover and editorial summary; limit scope to this section. */
.scriptus-ouvir-cover{margin:20px 0 22px;}
.scriptus-ouvir-cover img{display:block;width:100%;height:auto;object-fit:cover;border-radius:3px;}
.scriptus-ouvir-cover-highlight{margin:12px 0 12px;}
.scriptus-ouvir-cover-highlight img{max-height:285px;object-fit:cover;}
.scriptus-ouvir-excerpt{margin:10px 0 10px;}
.written-heading .scriptus-ouvir-header-summary{font-family:Georgia,'Times New Roman',serif;font-size:clamp(20px,2vw,26px);line-height:1.5;margin:22px 0 26px;color:var(--foreground,#20201e);font-weight:400;}
.written-article > .scriptus-ouvir-cover-single{margin:32px 0 28px;}
@media(max-width:700px){.written-heading .scriptus-ouvir-header-summary{font-size:19px}.scriptus-ouvir-cover-highlight img{max-height:none}}

/* VER: summary after title, before author; match the approved OUVIR hierarchy. */
.written-heading .scriptus-ver-header-summary{font-family:Georgia,'Times New Roman',serif;font-size:clamp(20px,2vw,26px);line-height:1.5;margin:22px 0 26px;color:var(--foreground,#20201e);font-weight:400;}
.scriptus-ver-excerpt{margin:14px 0 13px;}
@media(max-width:700px){.written-heading .scriptus-ver-header-summary{font-size:19px;}}

/* SCRIPTUS 2.8: VER archive embeds native videos or YouTube/Vimeo once. */
.watch-page .watch-featured .featured-video iframe, .watch-page .watch-featured .featured-video video {display:block;max-width:100%;width:100%;aspect-ratio:16/9;height:auto;}
.watch-page .watch-featured .featured-video iframe {height:auto;min-height:260px;}
.watch-page .watch-featured .scriptus-ver-list-summary {margin:1rem 0 1.1rem;line-height:1.6;}

/* SCRIPTUS 2.9: images and abstracts for Atualidades listing and highlights */
.scriptus-news-cover { margin: 16px 0 18px; overflow: hidden; }
.scriptus-news-cover img { display: block; max-width: 100%; width: 100%; height: auto; object-fit: cover; border-radius: 4px; }
.scriptus-news-cover-highlight img { max-height: 260px; }
.news-item .scriptus-news-cover-list { max-width: 800px; margin-top: 18px; }
.news-item .scriptus-news-cover-list img { max-height: 420px; }
.scriptus-feature .scriptus-atualidades-excerpt { margin-top: 12px; }
.news-item .scriptus-atualidades-excerpt { margin: 16px 0 20px; text-indent: 0; }
@media(max-width: 700px) { .scriptus-news-cover-highlight img, .news-item .scriptus-news-cover-list img { max-height: none; } }
