/*
Theme Name: Blog24h
Theme URI: https://blog24h.online/
Author: Coutto SPACE
Author URI: https://coutto.space/
Description: Plataforma editorial premium, rápida e modular para portais, revistas, blogs e redes locais. Desenvolvida pela Coutto SPACE.
Version: 0.1.0
Requires at least: 6.4
Tested up to: 6.8
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: blog24h
Tags: news, blog, magazine, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready, wide-blocks, editor-style
*/

:root {
  --b24h-blue: #0b3566;
  --b24h-blue-2: #1c5fb8;
  --b24h-red: #d62839;
  --b24h-gold: #d4af37;
  --b24h-bg: #f7f8fa;
  --b24h-surface: #ffffff;
  --b24h-text: #172033;
  --b24h-muted: #687386;
  --b24h-border: #e7ebf1;
  --b24h-radius: 20px;
  --b24h-container: 1240px;
  --b24h-shadow: 0 12px 34px rgba(11, 53, 102, .08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--b24h-bg);
  color: var(--b24h-text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
a:hover { color: var(--b24h-blue-2); }
img { display: block; max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; }

.b24h-container { width: min(calc(100% - 32px), var(--b24h-container)); margin-inline: auto; }
.b24h-skip-link { position: absolute; left: -9999px; top: auto; }
.b24h-skip-link:focus { left: 16px; top: 16px; z-index: 99999; background: #fff; padding: 12px 16px; border-radius: 12px; }

.b24h-topbar { background: #07172c; color: #d8e3f1; font-size: 13px; }
.b24h-topbar-inner { min-height: 38px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.b24h-topbar a:hover { color: #fff; }
.b24h-date { opacity: .85; }

.b24h-header { position: sticky; top: 0; z-index: 1000; background: rgba(255,255,255,.94); backdrop-filter: blur(16px); border-bottom: 1px solid rgba(231,235,241,.9); }
.b24h-header-main { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 28px; min-height: 84px; }
.b24h-brand { display: inline-flex; align-items: center; gap: 12px; min-width: 185px; }
.b24h-brand-text { display: flex; flex-direction: column; line-height: 1; }
.b24h-brand-name { font-size: 28px; font-weight: 800; letter-spacing: -1.2px; }
.b24h-brand-name span { color: var(--b24h-blue-2); }
.b24h-brand-by { margin-top: 7px; color: var(--b24h-muted); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; }
.custom-logo { max-height: 56px; width: auto; }

.b24h-nav ul { display: flex; align-items: center; justify-content: center; gap: 6px; list-style: none; margin: 0; padding: 0; }
.b24h-nav li { position: relative; }
.b24h-nav a { display: block; padding: 12px 13px; border-radius: 12px; font-size: 14px; font-weight: 650; }
.b24h-nav a:hover, .b24h-nav .current-menu-item > a { background: #edf4fd; color: var(--b24h-blue); }
.b24h-nav .sub-menu { display: none; position: absolute; top: 100%; left: 0; min-width: 220px; padding: 10px; background: #fff; border: 1px solid var(--b24h-border); border-radius: 16px; box-shadow: var(--b24h-shadow); }
.b24h-nav li:hover > .sub-menu, .b24h-nav li:focus-within > .sub-menu { display: block; }
.b24h-nav .sub-menu a { white-space: nowrap; }

.b24h-actions { display: flex; align-items: center; gap: 8px; }
.b24h-icon-btn { width: 42px; height: 42px; border: 1px solid var(--b24h-border); background: #fff; color: var(--b24h-text); border-radius: 50%; display: inline-grid; place-items: center; cursor: pointer; }
.b24h-icon-btn:hover { border-color: var(--b24h-blue-2); color: var(--b24h-blue-2); }
.b24h-menu-toggle { display: none; }

.b24h-breaking { background: #fff; border-bottom: 1px solid var(--b24h-border); }
.b24h-breaking-inner { display: grid; grid-template-columns: auto 1fr; align-items: center; min-height: 44px; overflow: hidden; }
.b24h-breaking-label { align-self: stretch; display: flex; align-items: center; padding: 0 18px; margin-left: -18px; background: var(--b24h-red); color: #fff; text-transform: uppercase; font-size: 11px; font-weight: 800; letter-spacing: .08em; }
.b24h-breaking-items { display: flex; gap: 28px; padding-left: 18px; white-space: nowrap; overflow: hidden; font-size: 13px; }
.b24h-breaking-items a::before { content: "•"; color: var(--b24h-red); margin-right: 8px; }

.b24h-main { padding: 34px 0 56px; min-height: 60vh; }
.b24h-section { margin-bottom: 42px; }
.b24h-section-head { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
.b24h-section-title { margin: 0; font-size: clamp(25px, 3vw, 38px); line-height: 1.1; letter-spacing: -.04em; }
.b24h-section-kicker { display: block; margin-bottom: 7px; color: var(--b24h-red); text-transform: uppercase; font-size: 11px; font-weight: 800; letter-spacing: .12em; }
.b24h-view-all { color: var(--b24h-blue-2); font-size: 13px; font-weight: 750; }

.b24h-hero-grid { display: grid; grid-template-columns: 1.7fr 1fr; gap: 18px; }
.b24h-hero-side { display: grid; grid-template-rows: repeat(2, 1fr); gap: 18px; }
.b24h-story { position: relative; overflow: hidden; min-height: 250px; border-radius: var(--b24h-radius); background: #dce5ef; box-shadow: var(--b24h-shadow); }
.b24h-story-large { min-height: 520px; }
.b24h-story img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s ease; }
.b24h-story:hover img { transform: scale(1.035); }
.b24h-story::after { content: ""; position: absolute; inset: 30% 0 0; background: linear-gradient(transparent, rgba(4,13,28,.92)); }
.b24h-story-content { position: absolute; inset: auto 0 0; z-index: 2; padding: clamp(20px, 4vw, 36px); color: #fff; }
.b24h-story .b24h-category { display: inline-flex; margin-bottom: 10px; padding: 6px 10px; background: var(--b24h-red); border-radius: 999px; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.b24h-story-title { margin: 0; font-size: clamp(21px, 3vw, 42px); line-height: 1.08; letter-spacing: -.035em; }
.b24h-story:not(.b24h-story-large) .b24h-story-title { font-size: clamp(18px, 2vw, 24px); }
.b24h-meta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 11px; color: #aebbd0; font-size: 12px; }

.b24h-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.b24h-card { overflow: hidden; background: var(--b24h-surface); border: 1px solid var(--b24h-border); border-radius: var(--b24h-radius); transition: transform .25s ease, box-shadow .25s ease; }
.b24h-card:hover { transform: translateY(-4px); box-shadow: var(--b24h-shadow); }
.b24h-card-thumb { aspect-ratio: 16/10; overflow: hidden; background: #e5ebf3; }
.b24h-card-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.b24h-card:hover .b24h-card-thumb img { transform: scale(1.035); }
.b24h-card-body { padding: 20px; }
.b24h-card-category { color: var(--b24h-red); font-size: 10px; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.b24h-card-title { margin: 8px 0; font-size: 20px; line-height: 1.25; letter-spacing: -.02em; }
.b24h-card-excerpt { margin: 0; color: var(--b24h-muted); font-size: 14px; }
.b24h-card .b24h-meta { color: var(--b24h-muted); }

.b24h-content-grid { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 32px; align-items: start; }
.b24h-list { display: grid; gap: 18px; }
.b24h-list-card { display: grid; grid-template-columns: 240px 1fr; overflow: hidden; background: #fff; border: 1px solid var(--b24h-border); border-radius: var(--b24h-radius); }
.b24h-list-card .b24h-card-thumb { aspect-ratio: auto; min-height: 180px; }

.b24h-sidebar { display: grid; gap: 22px; }
.widget { padding: 22px; background: #fff; border: 1px solid var(--b24h-border); border-radius: var(--b24h-radius); }
.widget-title { margin: 0 0 15px; padding-bottom: 12px; border-bottom: 2px solid var(--b24h-blue); font-size: 18px; }
.widget ul { list-style: none; margin: 0; padding: 0; }
.widget li + li { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--b24h-border); }

.b24h-ad { display: grid; place-items: center; min-height: 110px; padding: 18px; border: 1px dashed #b9c3d1; border-radius: 16px; background: #f0f3f7; color: #8792a3; text-align: center; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; }

.b24h-article { background: #fff; border: 1px solid var(--b24h-border); border-radius: var(--b24h-radius); overflow: hidden; }
.b24h-article-header { padding: clamp(24px, 5vw, 54px); }
.b24h-article-title { margin: 8px 0 16px; font-size: clamp(36px, 6vw, 64px); line-height: 1.02; letter-spacing: -.05em; }
.b24h-article-excerpt { color: var(--b24h-muted); font-size: 19px; }
.b24h-article-media img { width: 100%; max-height: 680px; object-fit: cover; }
.b24h-article-content { max-width: 780px; margin-inline: auto; padding: 44px 24px 60px; font-family: Georgia, serif; font-size: 19px; }
.b24h-article-content h2, .b24h-article-content h3 { font-family: Inter, sans-serif; line-height: 1.18; }
.b24h-article-content a { color: var(--b24h-blue-2); text-decoration: underline; }

.b24h-pagination { margin-top: 28px; }
.b24h-pagination .nav-links { display: flex; flex-wrap: wrap; gap: 8px; }
.b24h-pagination .page-numbers { min-width: 42px; height: 42px; display: grid; place-items: center; padding: 0 12px; border: 1px solid var(--b24h-border); border-radius: 12px; background: #fff; }
.b24h-pagination .current { background: var(--b24h-blue); color: #fff; border-color: var(--b24h-blue); }

.b24h-footer { margin-top: 30px; background: #07172c; color: #c8d3e2; }
.b24h-footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 42px; padding: 58px 0; }
.b24h-footer h3 { color: #fff; margin-top: 0; }
.b24h-footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding: 18px 0; font-size: 12px; }

.b24h-search-panel { display: none; position: fixed; inset: 0; z-index: 1100; background: rgba(2,8,20,.78); backdrop-filter: blur(8px); padding: 10vh 20px; }
.b24h-search-panel.is-open { display: block; }
.b24h-search-box { max-width: 760px; margin: auto; padding: 28px; background: #fff; border-radius: 24px; }
.b24h-search-box form { display: flex; gap: 10px; }
.b24h-search-box input[type="search"] { flex: 1; min-width: 0; padding: 16px; border: 1px solid var(--b24h-border); border-radius: 14px; }
.b24h-btn { border: 0; border-radius: 14px; background: var(--b24h-blue); color: #fff; padding: 14px 20px; font-weight: 750; cursor: pointer; }

body.b24h-dark { --b24h-bg: #061120; --b24h-surface: #0d1d31; --b24h-text: #edf4fc; --b24h-muted: #9aacbf; --b24h-border: #1d3047; }
body.b24h-dark .b24h-header, body.b24h-dark .b24h-breaking, body.b24h-dark .b24h-card, body.b24h-dark .b24h-list-card, body.b24h-dark .widget, body.b24h-dark .b24h-article { background: var(--b24h-surface); }
body.b24h-dark .b24h-icon-btn { background: #10243b; }

@media (max-width: 1024px) {
  .b24h-nav { display: none; position: absolute; top: 100%; left: 16px; right: 16px; padding: 14px; background: #fff; border: 1px solid var(--b24h-border); border-radius: 18px; box-shadow: var(--b24h-shadow); }
  .b24h-nav.is-open { display: block; }
  .b24h-nav ul { display: block; }
  .b24h-nav .sub-menu { display: block; position: static; box-shadow: none; border: 0; padding-left: 15px; }
  .b24h-menu-toggle { display: inline-grid; }
  .b24h-content-grid { grid-template-columns: 1fr; }
  .b24h-sidebar { grid-template-columns: repeat(2, 1fr); }
  .b24h-footer-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 760px) {
  .b24h-topbar-inner { min-height: 32px; }
  .b24h-topbar .menu { display: none; }
  .b24h-header-main { min-height: 68px; gap: 10px; }
  .b24h-brand-name { font-size: 23px; }
  .b24h-brand-by { font-size: 8px; }
  .b24h-hero-grid { grid-template-columns: 1fr; }
  .b24h-story-large { min-height: 420px; }
  .b24h-hero-side { grid-template-columns: 1fr 1fr; grid-template-rows: auto; }
  .b24h-hero-side .b24h-story { min-height: 240px; }
  .b24h-grid { grid-template-columns: 1fr; }
  .b24h-list-card { grid-template-columns: 120px 1fr; }
  .b24h-list-card .b24h-card-thumb { min-height: 150px; }
  .b24h-list-card .b24h-card-body { padding: 14px; }
  .b24h-list-card .b24h-card-excerpt { display: none; }
  .b24h-sidebar { grid-template-columns: 1fr; }
  .b24h-footer-grid { grid-template-columns: 1fr; }
  .b24h-breaking-label { padding-inline: 12px; }
  .b24h-breaking-items { font-size: 12px; }
}

@media (max-width: 480px) {
  .b24h-container { width: min(calc(100% - 22px), var(--b24h-container)); }
  .b24h-actions .b24h-dark-toggle { display: none; }
  .b24h-hero-side { grid-template-columns: 1fr; }
  .b24h-story-large { min-height: 360px; }
  .b24h-story-content { padding: 20px; }
}
