/*
Theme Name: GiroF1 Portal
Theme URI: https://girof1.com
Description: Tema-filho editorial para o portal GiroF1, baseado no Twenty Twenty-Four.
Author: GiroF1
Version: 1.3.1
Requires at least: 6.4
Requires PHP: 7.4
Template: twentytwentyfour
Text Domain: girof1
*/

:root {
  --giro-red: #ef1b24;
  --giro-red-dark: #b50912;
  --giro-ink: #0a0a0c;
  --giro-panel: #151519;
  --giro-line: #2b2b31;
  --giro-muted: #a7a7af;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { background: #f5f5f6; }
a { text-underline-offset: .2em; }

.girof1-topline { height: 4px; background: linear-gradient(90deg, var(--giro-red) 0 64%, #fff 64% 68%, #24242a 68%); }
.girof1-header { position: relative; z-index: 20; box-shadow: 0 10px 30px rgba(0,0,0,.18); }
.girof1-header-main { min-height: 92px; }
.girof1-brand { width: 280px; min-width: 220px; height: 70px; position: relative; }
.girof1-brand::before { content: ""; position: absolute; inset: 4px 0; background: url('assets/images/girof1-logo.png') left center / contain no-repeat; }
.girof1-brand .wp-block-site-title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.girof1-nav a { font-weight: 750; text-decoration: none; }
.girof1-nav a:hover { color: var(--giro-red) !important; }
.girof1-nav .wp-block-navigation__responsive-container-open,
.girof1-nav .wp-block-navigation__responsive-container-close { color: #fff; }

.girof1-breaking { border-bottom: 1px solid #dedee2; box-shadow: 0 4px 14px rgba(0,0,0,.05); }
.girof1-breaking-label { white-space: nowrap; font-weight: 850; letter-spacing: .04em; }

.girof1-hero { overflow: hidden; }
.girof1-hero-card { position: relative; min-height: 530px; overflow: hidden; background: var(--giro-panel); }
.girof1-hero-card .wp-block-post-featured-image { position: absolute; inset: 0; margin: 0; }
.girof1-hero-card .wp-block-post-featured-image a,
.girof1-hero-card .wp-block-post-featured-image img { width: 100%; height: 100%; object-fit: cover; }
.girof1-hero-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 20%, rgba(0,0,0,.28) 48%, rgba(0,0,0,.96) 100%); pointer-events: none; }
.girof1-hero-content { position: absolute; z-index: 2; left: 0; right: 0; bottom: 0; padding: clamp(24px,4vw,52px); color: #fff; }
.girof1-kicker, .girof1-hero .wp-block-post-terms { font-weight: 850; text-transform: uppercase; letter-spacing: .08em; font-size: .78rem; }
.girof1-hero .wp-block-post-terms a { color: #fff; background: var(--giro-red); padding: 7px 10px; text-decoration: none; }
.girof1-hero .wp-block-post-title { max-width: 950px; text-wrap: balance; }
.girof1-hero .wp-block-post-title a { color: #fff; text-decoration: none; }
.girof1-section-title { border-left: 6px solid var(--giro-red); padding-left: 14px; text-transform: uppercase; letter-spacing: -.02em; }

.girof1-home { background: linear-gradient(180deg, #ececef 0, #f5f5f6 360px); }
.girof1-lead-layout { grid-template-columns: minmax(0, 1.75fr) minmax(310px, .8fr) !important; gap: 22px; }
.girof1-hero-card { border-radius: 4px; box-shadow: 0 16px 40px rgba(0,0,0,.18); }
.girof1-hero-content .wp-block-post-excerpt { max-width: 760px; color: #e4e4e8; }
.girof1-hero-content .wp-block-post-excerpt__more-link { display: inline-block; margin-top: 8px; color: #fff; font-weight: 800; text-decoration-color: var(--giro-red); }
.girof1-lead-side { height: 100%; padding: 22px; background: var(--giro-panel); border-top: 4px solid var(--giro-red); border-radius: 4px; color: #fff; }
.girof1-side-heading { margin: 0 0 8px; padding-bottom: 13px; border-bottom: 1px solid #36363d; color: #fff; font-size: 1rem; letter-spacing: .08em; text-transform: uppercase; }
.girof1-feature-list .wp-block-post-template { display: grid; }
.girof1-feature-item { grid-template-columns: 128px minmax(0,1fr) !important; gap: 14px; padding: 15px 0; border-bottom: 1px solid #34343a; }
.girof1-feature-item:last-child { border-bottom: 0; }
.girof1-feature-item .wp-block-post-featured-image { height: 96px; margin: 0; overflow: hidden; border-radius: 3px; }
.girof1-feature-item .wp-block-post-featured-image img { width: 100%; height: 100%; object-fit: cover; }
.girof1-feature-copy { align-self: center; }
.girof1-feature-copy .wp-block-post-terms { margin: 0 0 5px; font-size: .65rem; font-weight: 850; letter-spacing: .06em; text-transform: uppercase; }
.girof1-feature-copy .wp-block-post-terms a { color: #ff5a62; text-decoration: none; }
.girof1-feature-copy .wp-block-post-title { margin: 0 0 7px; font-size: 1rem !important; line-height: 1.2; }
.girof1-feature-copy .wp-block-post-title a { color: #fff; text-decoration: none; }
.girof1-feature-copy .wp-block-post-title a:hover { color: #ff747a; }
.girof1-feature-copy .wp-block-post-date { margin: 0; color: #a7a7af; font-size: .72rem; }
.girof1-section-heading-row { margin-bottom: 22px; border-bottom: 1px solid #d8d8dd; }
.girof1-section-heading-row .girof1-section-title { margin-bottom: 14px; }
.girof1-section-note { margin: 0 0 14px; color: #6a6a72; font-size: .88rem; }

.girof1-grid .wp-block-post { background: #fff; border: 1px solid #e3e3e7; border-radius: 4px; transition: transform .2s ease, box-shadow .2s ease; overflow: hidden; }
.girof1-grid .wp-block-post:hover { transform: translateY(-4px); box-shadow: 0 16px 34px rgba(0,0,0,.1); }
.girof1-grid .wp-block-post-featured-image { margin: 0; aspect-ratio: 16/9; overflow: hidden; }
.girof1-grid .wp-block-post-featured-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.girof1-grid .wp-block-post:hover img { transform: scale(1.04); }
.girof1-grid .wp-block-post-title,
.girof1-grid .wp-block-post-date,
.girof1-grid .wp-block-post-excerpt,
.girof1-grid .wp-block-post-terms { margin-left: 22px; margin-right: 22px; }
.girof1-grid .wp-block-post-terms { margin-top: 20px; text-transform: uppercase; font-weight: 800; font-size: .72rem; }
.girof1-grid .wp-block-post-terms a { color: var(--giro-red-dark); text-decoration: none; }
.girof1-grid .wp-block-post-title a { text-decoration: none; }
.girof1-grid .wp-block-post-title { line-height: 1.18; }
.girof1-grid .wp-block-post-date { color: #777780; font-size: .76rem; }
.girof1-grid .wp-block-post-excerpt { padding-bottom: 22px; }
.girof1-grid .wp-block-post-excerpt__more-link { color: var(--giro-red-dark); font-size: .83rem; font-weight: 800; }
.girof1-grid .wp-block-query-pagination { margin-top: 44px; }
.girof1-grid .wp-block-query-pagination a, .girof1-grid .wp-block-query-pagination .current { padding: 9px 12px; border: 1px solid #d4d4d9; background: #fff; text-decoration: none; }
.girof1-grid .wp-block-query-pagination .current { color: #fff; background: var(--giro-red); border-color: var(--giro-red); }

.girof1-article-shell { background: #fff; }
.girof1-article-head { max-width: 980px; }
.girof1-article-head .wp-block-post-title { text-wrap: balance; }
.girof1-article-meta { color: #606068; }
.girof1-article-meta time + time::before { content: "·"; margin: 0 9px; color: #9a9aa2; }
.girof1-breadcrumbs { max-width: 980px; margin: 0 auto 28px; color: #65656d; font-size: .82rem; }
.girof1-breadcrumbs a { color: #46464d; text-decoration: none; }
.girof1-breadcrumbs a:hover { color: var(--giro-red-dark); }
.girof1-author-box { max-width: 760px; margin: 48px auto 0; padding: 26px; display: grid; grid-template-columns: 76px 1fr; gap: 20px; align-items: center; background: #f5f5f6; border-left: 5px solid var(--giro-red); }
.girof1-author-box img { width: 76px; height: 76px; border-radius: 50%; object-fit: cover; }
.girof1-author-box h2 { margin: 0 0 7px; font-size: 1.15rem; }
.girof1-author-box p { margin: 0; color: #55555d; font-size: .94rem; line-height: 1.55; }
.girof1-author-box a { font-weight: 750; }
.girof1-article-image img { max-height: 680px; object-fit: cover; }
.girof1-article-body { max-width: 760px; font-size: clamp(1.08rem, 1.7vw, 1.23rem); line-height: 1.78; }
.girof1-article-body > p:first-of-type { font-size: 1.2em; color: #33343a; }
.girof1-article-body h2 { margin-top: 2.2em; }
.girof1-article-body blockquote { border-left: 5px solid var(--giro-red); padding-left: 24px; font-size: 1.16em; }

.girof1-footer { margin-block-start: 0; }
.girof1-footer a { color: #fff; }

@media (max-width: 780px) {
  .girof1-header-main { min-height: 76px; }
  .girof1-brand { width: 195px; min-width: 170px; height: 54px; }
  .girof1-hero-card { min-height: 430px; }
  .girof1-hero .wp-block-post-title { font-size: 2rem !important; }
  .girof1-breaking .wp-block-group { flex-wrap: nowrap; overflow: hidden; }
  .girof1-breaking p { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .girof1-author-box { grid-template-columns: 56px 1fr; padding: 20px; }
  .girof1-author-box img { width: 56px; height: 56px; }
  .girof1-home { background: #f5f5f6; }
  .girof1-lead-layout { grid-template-columns: 1fr !important; padding-top: 16px !important; gap: 16px; }
  .girof1-hero-card { min-height: 460px; }
  .girof1-lead-side { padding: 18px; }
  .girof1-feature-item { grid-template-columns: 112px minmax(0,1fr) !important; }
  .girof1-feature-item .wp-block-post-featured-image { height: 84px; }
  .girof1-section-heading-row { align-items: flex-start; }
  .girof1-section-note { display: none; }
  .girof1-latest { padding-top: 42px !important; }
  .girof1-grid .wp-block-post-template { grid-template-columns: 1fr !important; }
  .girof1-grid .wp-block-post { display: grid; grid-template-columns: 118px minmax(0,1fr); align-items: start; }
  .girof1-grid .wp-block-post-featured-image { grid-row: 1 / span 5; height: 100%; min-height: 132px; aspect-ratio: auto; }
  .girof1-grid .wp-block-post-terms, .girof1-grid .wp-block-post-title, .girof1-grid .wp-block-post-date, .girof1-grid .wp-block-post-excerpt { margin-left: 14px; margin-right: 14px; }
  .girof1-grid .wp-block-post-terms { margin-top: 13px; }
  .girof1-grid .wp-block-post-title { margin-top: 6px; margin-bottom: 7px; font-size: 1rem !important; }
  .girof1-grid .wp-block-post-excerpt { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .girof1-grid .wp-block-post,
  .girof1-grid .wp-block-post-featured-image img { transition: none; }
}

/* Consentimento de cookies */
.girof1-consent[hidden], .girof1-consent [hidden], .girof1-consent-reopen[hidden] { display: none !important; }
.girof1-consent { position: fixed; inset: 0; z-index: 99999; display: grid; align-items: end; }
.girof1-consent__backdrop { position: absolute; inset: 0; background: rgba(10,10,12,.58); backdrop-filter: blur(3px); }
.girof1-consent__panel { position: relative; width: min(1120px, calc(100% - 32px)); margin: 0 auto 24px; padding: clamp(22px,3vw,34px); color: #f7f7f8; background: #151519; border: 1px solid #36363d; border-top: 4px solid var(--giro-red); border-radius: 10px; box-shadow: 0 24px 70px rgba(0,0,0,.42); }
.girof1-consent__summary { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 32px; align-items: center; }
.girof1-consent__eyebrow { margin: 0 0 7px; color: #ff6970; font-size: .76rem; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.girof1-consent h2 { margin: 0 0 10px; color: #fff; font-size: clamp(1.25rem,2vw,1.7rem); }
.girof1-consent p { margin: 0; color: #d0d0d5; font-size: .94rem; line-height: 1.55; }
.girof1-consent a { color: #fff; font-weight: 700; }
.girof1-consent__actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; max-width: 410px; }
.girof1-consent__button, .girof1-consent__back, .girof1-consent-reopen { appearance: none; border: 1px solid #5a5a64; border-radius: 6px; background: transparent; color: #fff; cursor: pointer; font: inherit; font-weight: 750; }
.girof1-consent__button { min-height: 44px; padding: 10px 16px; }
.girof1-consent__button:hover, .girof1-consent__button:focus-visible { border-color: #fff; }
.girof1-consent__button--primary { border-color: var(--giro-red); background: var(--giro-red); }
.girof1-consent__button--primary:hover, .girof1-consent__button--primary:focus-visible { background: var(--giro-red-dark); }
.girof1-consent__button--link { border-color: transparent; text-decoration: underline; }
.girof1-consent__back { margin: 0 0 16px; padding: 5px 0; border: 0; color: #dddde2; }
.girof1-consent__settings { max-width: 760px; margin: 0 auto; }
.girof1-consent__option { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 20px; align-items: center; margin-top: 12px; padding: 16px; background: #202025; border: 1px solid #34343b; border-radius: 7px; }
.girof1-consent__option strong { display: block; margin-bottom: 4px; }
.girof1-consent__always { color: #a9e8b3; font-size: .82rem; font-weight: 750; }
.girof1-consent__option input { position: absolute; opacity: 0; pointer-events: none; }
.girof1-consent__switch { width: 46px; height: 26px; padding: 3px; background: #65656e; border-radius: 20px; transition: background .2s; }
.girof1-consent__switch::before { content: ''; display: block; width: 20px; height: 20px; background: #fff; border-radius: 50%; transition: transform .2s; }
.girof1-consent__option input:checked + .girof1-consent__switch { background: var(--giro-red); }
.girof1-consent__option input:checked + .girof1-consent__switch::before { transform: translateX(20px); }
.girof1-consent__option input:focus-visible + .girof1-consent__switch { outline: 3px solid #fff; outline-offset: 3px; }
.girof1-consent__save { margin-top: 18px; }
.girof1-consent-reopen { position: fixed; right: 14px; bottom: 14px; z-index: 9990; padding: 8px 12px; color: #fff; background: #202025; box-shadow: 0 5px 18px rgba(0,0,0,.25); font-size: .78rem; }

@media (max-width: 760px) {
  .girof1-consent__panel { width: calc(100% - 20px); margin-bottom: 10px; max-height: calc(100vh - 20px); overflow: auto; }
  .girof1-consent__summary { grid-template-columns: 1fr; gap: 20px; }
  .girof1-consent__actions { display: grid; max-width: none; }
  .girof1-consent__button { width: 100%; }
  .girof1-consent-reopen { right: 8px; bottom: 8px; }
}
