/*
Theme Name: TREZZENEWS
Description: Tema editorial para o portal TREZZENEWS.
Version: 0.3.0
Requires at least: 6.8
Requires PHP: 8.2
Text Domain: trezzenews
*/

:root {
    --ink: #191918;
    --muted: #55544f;
    --paper: #fdfcf9;
    --wash: #f3f0eb;
    --rule: #dedad3;
    --red: #a91d25;
    --red-dark: #80121a;
    --white: #fff;
    --reading: 44rem;
    --wrap: 80rem;
    --gutter: clamp(1rem, 3.5vw, 3rem);
    --serif: "Instrument Serif", Georgia, serif;
    --sans: "Inter", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 1rem/1.6 var(--sans); }
img, video, iframe { max-width: 100%; }
img, video { height: auto; }
a { color: inherit; text-underline-offset: .18em; }
button, input { font: inherit; }
button, summary { cursor: pointer; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 4px; }
h1, h2, h3, p, figure { margin: 0; }
.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
.screen-reader-text { position: absolute; clip-path: inset(50%); width: 1px; height: 1px; overflow: hidden; white-space: nowrap; }
.skip:focus { position: fixed; z-index: 9; inset: .75rem auto auto .75rem; clip-path: none; width: auto; height: auto; overflow: visible; padding: .6rem .9rem; background: var(--white); color: var(--ink); }
.site-header { background: var(--white); border-top: .3rem solid var(--red); }
.utility { border-bottom: 1px solid var(--rule); }
.utility-row { display: flex; min-height: 2.6rem; align-items: center; justify-content: space-between; gap: .65rem 1.25rem; flex-wrap: wrap; font-size: .78rem; color: var(--muted); }
.location { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.location b { color: var(--ink); }
.sep { height: .2rem; width: .2rem; background: var(--red); border-radius: 50%; }
.menu { list-style: none; padding: 0; margin: 0; display: flex; gap: .35rem 1rem; flex-wrap: wrap; align-items: center; }
.menu a, .nav-toggle, .search-disclosure summary { text-decoration: none; }
.menu a:hover, .menu .current-menu-item > a { color: var(--red); text-decoration: underline; }
.masthead { min-height: 7.7rem; position: relative; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: .7rem; }
.mast-brand { grid-column: 2; min-width: 0; text-align: center; }
.brand { display: inline-block; color: var(--ink); text-decoration: none; font-size: clamp(2.6rem, 7.7vw, 5.15rem); letter-spacing: -.085em; font-weight: 900; line-height: .96; padding-right: .085em; }
.brand span { color: var(--red); }
.custom-logo { display: block; width: auto; max-width: min(23rem, 66vw); max-height: 5.5rem; margin: auto; object-fit: contain; }
.search-disclosure { grid-column: 3; justify-self: end; }
.search-disclosure summary, .nav-toggle { width: 2.75rem; height: 2.75rem; border: 1px solid var(--rule); border-radius: 50%; background: var(--white); color: var(--ink); display: grid; place-items: center; list-style: none; }
.search-disclosure summary::-webkit-details-marker { display: none; }
.search-disclosure[open] summary { background: var(--wash); }
.search-glyph { border: 2px solid currentColor; width: .91rem; height: .91rem; border-radius: 50%; display: block; position: relative; margin: -.18rem .17rem 0 0; }
.search-glyph::after { content: ""; position: absolute; width: .42rem; height: 2px; background: currentColor; right: -.34rem; bottom: -.1rem; transform: rotate(45deg); }
.search-panel { position: absolute; right: 0; top: calc(50% + 1.8rem); z-index: 3; padding: .65rem; background: var(--white); border: 1px solid var(--rule); box-shadow: 0 .5rem 1.2rem #16161618; width: min(24rem, 100%); }
.search-form { display: flex; gap: .5rem; }
.search-form input { width: 100%; min-width: 0; border: 1px solid var(--muted); color: var(--ink); background: var(--white); padding: .55rem .65rem; }
.search-form button { color: var(--white); background: var(--red); padding: .45rem .8rem; border: 1px solid var(--red); }
.search-form button:hover { background: var(--red-dark); }
.site-nav { border-top: 1px solid var(--rule); border-bottom: 1px solid var(--ink); }
.site-nav .menu { min-height: 3rem; justify-content: center; gap: .25rem 1.5rem; font-size: .86rem; font-weight: 720; }
.site-nav a { display: inline-flex; align-items: center; min-height: 2.75rem; }
.nav-toggle { display: none; }
.hamburger { width: 1rem; height: .75rem; border-block: 2px solid; position: relative; }
.hamburger::after { content: ""; background: currentColor; height: 2px; position: absolute; inset: calc(50% - 1px) 0 auto; }

.content { padding-block: clamp(1.6rem, 4vw, 3.3rem) clamp(3rem, 6vw, 5rem); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: .75rem; border-top: 2px solid var(--ink); padding: .62rem 0 1rem; }
.section-title { font: 700 clamp(1.45rem, 3vw, 2.25rem)/1.12 var(--serif); letter-spacing: -.03em; }
.section-title::before { content: ""; display: inline-block; width: .34rem; height: .8em; margin-right: .55rem; background: var(--red); vertical-align: -.04em; }
.section-link { color: var(--red); font-size: .85rem; font-weight: 750; }
.hero { display: grid; grid-template-columns: 1.8fr 1fr; gap: clamp(1rem, 3vw, 2.25rem); }
.hero--single { grid-template-columns: 1fr; }
.hero-side { border-left: 1px solid var(--rule); padding-left: clamp(1rem, 3vw, 2.25rem); display: grid; gap: 1.1rem; align-content: start; }
.hero-side .card + .card { border-top: 1px solid var(--rule); padding-top: 1.1rem; }
.card { display: grid; align-content: start; gap: .6rem; min-width: 0; }
.card-photo { display: block; overflow: hidden; background: var(--wash); aspect-ratio: 3 / 2; }
.card-photo img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.card--lead { gap: .65rem; }
.card--lead .card-photo { aspect-ratio: 16 / 9; }
.card--lead .card-title { font-size: clamp(2.15rem, 4.85vw, 4.45rem); line-height: .99; letter-spacing: -.046em; }
.card--lead .summary { font-size: clamp(.95rem, 1.45vw, 1.12rem); max-width: 62ch; }
.card--side .card-title { font-size: clamp(1.3rem, 2.3vw, 2.1rem); }
.card--side .card-photo { aspect-ratio: 2.35 / 1; }
.labels { display: flex; align-items: baseline; gap: .35rem .7rem; flex-wrap: wrap; font-size: .75rem; color: var(--muted); }
.category { color: var(--red); font-weight: 800; font-size: .72rem; letter-spacing: .075em; text-transform: uppercase; text-decoration: none; }
.category:hover { text-decoration: underline; }
.card-title { font: 700 clamp(1.25rem, 2vw, 1.8rem)/1.1 var(--serif); letter-spacing: -.024em; overflow-wrap: anywhere; }
.card-title a { text-decoration: none; }
.card-title a:hover { color: var(--red); text-decoration: underline; }
.summary { color: var(--muted); font-size: .91rem; line-height: 1.55; }
.latest { margin-top: clamp(2.1rem, 5vw, 4rem); }
.news-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1.15rem, 3vw, 2.2rem); }
.news-grid .card { border-bottom: 1px solid var(--rule); padding-bottom: 1.1rem; }
.editorial-block .news-grid .card { align-content: start; height: 100%; }
.editorial-block .labels { min-height: 1.2rem; }
.news-grid .card--no-image { border-top: 1px solid var(--rule); padding-top: .8rem; }
.advert { margin: 2.3rem auto; max-width: 61rem; text-align: center; }
.advert-label { display: block; font-size: .7rem; color: var(--muted); margin-bottom: .3rem; letter-spacing: .08em; text-transform: uppercase; }
.advert img { display: block; margin: auto; max-height: 18rem; width: auto; object-fit: contain; }
.archive-head { border-top: 2px solid var(--ink); padding: 1rem 0 1.3rem; margin-bottom: 1rem; border-bottom: 1px solid var(--rule); }
.page-title { font: 700 clamp(2.4rem, 6vw, 4.6rem)/1.05 var(--serif); letter-spacing: -.045em; overflow-wrap: anywhere; }
.archive-head .summary { margin-top: .7rem; }
.pagination { margin-top: 2.2rem; }
.nav-links { display: flex; gap: .45rem; flex-wrap: wrap; }
.page-numbers { display: inline-grid; place-items: center; min-width: 2.75rem; min-height: 2.75rem; padding-inline: .5rem; border: 1px solid var(--rule); text-decoration: none; }
.page-numbers.current { background: var(--red); color: var(--white); border-color: var(--red); }
.story-head { max-width: 59rem; margin: 0 auto 1.7rem; }
.story-head .category { display: inline-block; margin-bottom: .7rem; }
.story-head h1 { font-size: clamp(2.25rem, 6.1vw, 5rem); }
.story-head .summary { font-size: clamp(1rem, 1.75vw, 1.25rem); margin-top: 1rem; max-width: 66ch; }
.story-meta { border-top: 1px solid var(--rule); padding-top: .8rem; margin-top: 1.2rem; font-size: .85rem; }
.story-meta strong { color: var(--ink); }
.story-media { margin: 0 auto 2rem; max-width: 59rem; }
.story-media img { display: block; width: 100%; max-height: 37rem; object-fit: contain; background: var(--wash); }
.story-media figcaption { color: var(--muted); margin-top: .55rem; font-size: .8rem; }
.prose, .story-tags { max-width: var(--reading); margin-inline: auto; overflow-wrap: anywhere; }
.prose { font-size: clamp(1.02rem, 1.3vw, 1.12rem); line-height: 1.78; }
.prose > * + * { margin-top: 1.15em; }
.prose h2, .prose h3 { font-family: var(--serif); line-height: 1.17; }
.prose a { color: var(--red-dark); }
.prose blockquote { border-left: 3px solid var(--red); padding-left: 1.1rem; margin-inline: 0; }
.prose table { display: block; overflow-x: auto; border-collapse: collapse; }
.prose td, .prose th { padding: .4rem .55rem; border: 1px solid var(--rule); }
.prose pre { white-space: pre-wrap; }
.prose img:not([src]), .prose video:not([src]):not(:has(source[src])), .prose audio:not([src]):not(:has(source[src])) { display: none; }
.story .prose { max-width: 740px; font-size: 19px; line-height: 1.85; color: #242424; text-align: left; font-weight: 400; }
.story .prose > * + * { margin-top: 0; }
.story .prose p { margin: 0 0 1.5em; }
.story .prose :where(h2, h3, h4, h5, h6) { margin: 1.6em 0 .45em; color: var(--ink); font-family: var(--serif); font-weight: 700; line-height: 1.2; }
.story .prose h2 { font-size: 1.6em; }
.story .prose h3 { font-size: 1.32em; }
.story .prose :where(h4, h5, h6) { font-size: 1.15em; }
.story .prose :where(ol, ul) { margin: 0 0 1.5em; padding-inline-start: 1.5em; }
.story .prose li + li { margin-top: .35em; }
.story .prose li :where(ol, ul) { margin-block: .4em 0; }
.story .prose blockquote { margin: 1.5em 0; padding: .7em 0 .7em 1.1em; font-family: var(--serif); font-size: 1.12em; }
.story .prose :where(blockquote, li) > p:last-child { margin-bottom: 0; }
.story .prose figure { margin: 1.5em 0; }
.story .prose img[src] { display: block; max-width: 100%; height: auto; margin-inline: auto; }
.story .prose :where(figcaption, .wp-caption-text) { margin: .55rem 0 0; color: var(--muted); font: .84rem/1.5 var(--sans); }
.story .prose :where(hr, table, pre) { margin-block: 1.5em; }
.story-tags { border-top: 1px solid var(--rule); margin-top: 2rem; padding-top: .7rem; font-size: .88rem; }
.share { max-width: var(--reading); margin: 2rem auto 0; display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.share a, .share button { display: inline-flex; align-items: center; min-height: 2.75rem; padding: .3rem .7rem; border: 1px solid var(--rule); background: var(--white); color: var(--red-dark); font-size: .83rem; text-decoration: none; font-weight: 690; }
.share button[hidden] { display: none; }
.share a:hover, .share button:hover { border-color: var(--red-dark); text-decoration: underline; }
.share-feedback { color: var(--muted); font-size: .82rem; }
.advert picture img { width: 100%; height: auto; max-height: none; }
.site-footer { background: var(--ink); color: var(--white); padding-block: 2rem 1.4rem; }
.site-footer :focus-visible { outline-color: var(--white); }
.footer-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.3rem; }
.footer-brand { text-decoration: none; font-size: 1.6rem; line-height: 1; font-weight: 850; letter-spacing: -.055em; }
.footer-brand span { color: #ff9fa6; }
.site-footer .menu a:hover { color: #ff9fa6; }
.footer-note { margin-top: 1rem; color: #d7d3cc; font-size: .84rem; }

@media (min-width: 55.001rem) {
    .card-title a { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
}
@media (max-width: 55rem) {
    .masthead { min-height: 5.9rem; }
    .has-navigation-script .nav-toggle { display: grid; grid-column: 1; grid-row: 1; }
    .has-navigation-script .site-nav:not(.is-open) { display: none; }
    .site-nav .menu { justify-content: flex-start; }
    .news-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 40rem) {
    .hero { grid-template-columns: 1fr; }
    .news-grid { grid-template-columns: 1fr; }
    .story .prose { font-size: 17px; }
    .hero-side { border-left: 0; padding-left: 0; border-top: 1px solid var(--rule); padding-top: 1rem; }
    .card--side:has(.card-photo) { grid-template-columns: minmax(5.7rem, 32%) 1fr; align-items: start; column-gap: .8rem; }
    .card--side .card-photo { grid-row: span 3; aspect-ratio: 1; }
    .card--side .card-title { font-size: 1.35rem; }
    .card--side .summary { display: none; }
    .advert picture img { max-width: 27rem; max-height: 26rem; }
}
@media (max-width: 28rem) {
    .masthead { grid-template-columns: 2.5rem minmax(0, 1fr) 2.5rem; }
    .brand { font-size: clamp(1.95rem, 7.1vw, 2.7rem); }
    .custom-logo { max-width: 100%; }
    .search-disclosure summary, .nav-toggle { width: 2.5rem; height: 2.5rem; }
}
