/*
Theme Name: Defesa News
Theme URI: https://www.mocosoft.com.br
Author: Mocosoft Sistemas
Author URI: https://www.mocosoft.com.br
Description: Tema editorial responsivo do Defesa News, com destaque por editorias, páginas de notícia, suporte ao Gutenberg e integração configurável com Google AdSense.
Version: 1.1.0
Requires at least: 6.4
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: defesa-news
Tags: news, blog, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready, accessibility-ready
*/

:root {
  --dn-background: #fafbf9;
  --dn-foreground: #18251f;
  --dn-primary: #076442;
  --dn-primary-dark: #083f2d;
  --dn-border: #dce2db;
  --dn-muted: #edf1eb;
  --dn-muted-text: #5d6862;
  --dn-accent: #f4b942;
  --dn-serif: Georgia, "Times New Roman", serif;
  --dn-sans: Arial, Helvetica, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--dn-background); color: var(--dn-foreground); font-family: var(--dn-sans); }
body.admin-bar .dn-main-nav { top: 32px; }
a { color: inherit; text-decoration: none; }
a:hover { color: #08724b; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 3px solid #db9e25; outline-offset: 4px; }
img { display: block; height: auto; max-width: 100%; }
.dn-wrap { margin-inline: auto; width: min(1256px, calc(100% - 64px)); }
.dn-main { min-height: 55vh; }
.screen-reader-text { clip: rect(1px,1px,1px,1px); clip-path: inset(50%); height: 1px; overflow: hidden; position: absolute; width: 1px; word-wrap: normal !important; }
.screen-reader-text:focus { clip: auto !important; clip-path: none; display: block; height: auto; left: 8px; padding: 15px 23px 14px; top: 8px; width: auto; z-index: 100000; background: #fff; color: #075b3d; font-weight: 700; }

.dn-utility { background: var(--dn-primary-dark); color: #dce9e2; font-size: 12px; letter-spacing: .035em; }
.dn-utility-inner { display: flex; justify-content: space-between; padding-block: 10px; }
.dn-masthead { align-items: center; display: flex; justify-content: space-between; padding-block: 29px; }
.dn-brand { align-items: center; display: inline-flex; gap: 13px; }
.dn-brand-mark { height: 49px; width: 49px; }
.dn-brand-name { color: #075b3d; font-size: 36px; font-weight: 900; letter-spacing: -1.8px; line-height: 1; }
.dn-brand-name span { font-weight: 400; }
.dn-brand-sub { color: #52625a; font-size: 10px; letter-spacing: 3.2px; margin-top: 7px; }
.custom-logo { height: auto; max-height: 70px; width: auto; }
.dn-masthead-note { color: #69746b; font-size: 14px; line-height: 1.7; text-align: right; }
.dn-masthead-note strong { color: #263d30; font-weight: 500; }

.dn-main-nav { background: #fff; border-block: 1px solid var(--dn-border); position: relative; z-index: 50; }
.dn-nav-inner { align-items: center; display: flex; gap: 38px; }
.dn-menu-toggle { display: none; }
.dn-menu { align-items: center; display: flex; gap: 38px; list-style: none; margin: 0; padding: 0; }
.dn-menu a { border-bottom: 3px solid transparent; display: block; font-size: 14px; font-weight: 700; padding: 18px 0 15px; white-space: nowrap; }
.dn-menu .current-menu-item > a, .dn-menu .current-menu-ancestor > a, .dn-menu a[aria-current="page"] { border-bottom-color: var(--dn-primary); color: var(--dn-primary); }
.dn-nav-end { align-items: center; color: #69746b; display: flex; font-size: 12px; gap: 7px; margin-left: auto; white-space: nowrap; }
.dn-dot { background: #147447; border-radius: 50%; display: inline-block; height: 6px; width: 6px; }

.dn-edition { align-items: end; display: flex; justify-content: space-between; margin: 35px 0 21px; }
.dn-eyebrow { color: #0a6947; font-size: 12px; font-weight: 800; letter-spacing: 1.6px; text-transform: uppercase; }
.dn-edition h1 { font-size: 27px; letter-spacing: -.9px; margin: 7px 0 0; }
.dn-edition small { color: #718074; font-size: 12px; }
.dn-lead-grid { display: grid; gap: 25px; grid-template-columns: 1.65fr 1fr; }
.dn-lead-story { background: #12392d; border-radius: 3px; color: #fff; min-height: 474px; overflow: hidden; position: relative; }
.dn-lead-story > img { height: 100%; object-fit: cover; position: absolute; transition: transform .4s; width: 100%; }
.dn-lead-story:hover > img { transform: scale(1.025); }
.dn-lead-story::after { background: linear-gradient(180deg, transparent 5%, #062218c9 63%, #062218f2); content: ""; inset: 0; position: absolute; }
.dn-lead-copy { bottom: 0; padding: 32px; position: absolute; z-index: 1; }
.dn-lead-copy .dn-eyebrow { color: #ffcb62; }
.dn-lead-copy h2 { font-family: var(--dn-serif); font-size: 38px; letter-spacing: -.8px; line-height: 1.1; margin: 13px 0; }
.dn-lead-copy p { color: #e0e8e2; font-size: 15px; line-height: 1.6; margin: 0 0 18px; max-width: 540px; }
.dn-meta { color: #6e7b72; display: flex; flex-wrap: wrap; font-size: 12px; gap: 12px; }
.dn-lead-copy .dn-meta { color: #d4e1d8; }
.dn-side-stories { display: grid; gap: 24px; grid-template-rows: 1fr 1fr; }
.dn-side-card { border-bottom: 1px solid var(--dn-border); display: grid; gap: 22px; grid-template-columns: 1fr 43%; padding-bottom: 20px; }
.dn-side-card.no-image { grid-template-columns: 1fr; }
.dn-side-card img { border-radius: 3px; height: 100%; max-height: 214px; object-fit: cover; width: 100%; }
.dn-side-card h2 { font-family: var(--dn-serif); font-size: 25px; letter-spacing: -.5px; line-height: 1.15; margin: 13px 0; }
.dn-side-card p { color: #69766d; font-size: 14px; line-height: 1.55; margin: 0 0 15px; }

.dn-section { margin-block: 42px; }
.dn-section-heading { align-items: center; border-top: 2px solid #1b4230; display: flex; justify-content: space-between; margin-bottom: 23px; padding-top: 17px; }
.dn-section-heading h2 { font-size: 23px; letter-spacing: -.7px; margin: 0; }
.dn-section-heading a { color: #176b49; font-size: 13px; font-weight: 700; }
.dn-story-grid { display: grid; gap: 30px; grid-template-columns: repeat(3, 1fr); }
.dn-story-card { border-right: 1px solid var(--dn-border); padding-right: 27px; }
.dn-story-card:last-child { border-right: 0; padding-right: 0; }
.dn-story-card h2, .dn-story-card h3 { font-family: var(--dn-serif); font-size: 24px; line-height: 1.23; margin: 12px 0; }
.dn-story-card p { color: #647168; font-size: 15px; line-height: 1.65; }
.dn-story-card figure { margin: 0 0 18px; }
.dn-story-card figure img { aspect-ratio: 16 / 10; object-fit: cover; width: 100%; }
.dn-read-link { color: #0d6845; display: inline-block; font-size: 13px; font-weight: 700; margin-top: 15px; }
.dn-world { background: #0c372a; border-radius: 3px; color: #fff; padding: 32px; }
.dn-world .dn-section-heading { border: 0; padding-top: 0; }
.dn-world .dn-section-heading a, .dn-world .dn-eyebrow, .dn-world .dn-read-link { color: #efc571; }
.dn-world .dn-story-card { border-color: #456153; }
.dn-world .dn-story-card p, .dn-world .dn-meta { color: #c2d1c9; }
.dn-world a:hover { color: #f4cc79; }
.dn-world-title { align-items: center; display: flex; gap: 10px; }

.dn-breadcrumb { color: #617367; font-size: 13px; margin: 30px 0; }
.dn-archive-intro { color: #637369; font-size: 18px; line-height: 1.7; max-width: 750px; }
.dn-archive-grid { display: grid; gap: 34px; grid-template-columns: repeat(3, 1fr); margin: 35px 0 75px; }
.dn-archive-grid .dn-story-card { border-bottom: 1px solid var(--dn-border); border-right: 0; padding: 0 0 25px; }
.dn-pagination { margin: 0 0 60px; }
.dn-pagination .nav-links { display: flex; flex-wrap: wrap; gap: 8px; }
.dn-pagination .page-numbers { background: #fff; border: 1px solid var(--dn-border); border-radius: 3px; padding: 9px 13px; }
.dn-pagination .current { background: var(--dn-primary); color: #fff; }

.dn-article { margin: 0 auto 65px; max-width: 810px; }
.dn-article h1 { font-family: var(--dn-serif); font-size: 46px; letter-spacing: -1.1px; line-height: 1.13; margin: 16px 0; }
.dn-dek { color: #637369; font-size: 20px; line-height: 1.55; }
.dn-article-meta { border-block: 1px solid var(--dn-border); color: #657269; font-size: 13px; line-height: 1.7; margin: 25px 0; padding: 18px 0; }
.dn-article figure { margin: 30px 0; }
.dn-article figure img { border-radius: 3px; max-height: 520px; object-fit: cover; width: 100%; }
.wp-caption-text, figcaption { color: #758078; font-size: 12px; line-height: 1.6; margin-top: 8px; }
.dn-article-body { font-family: var(--dn-serif); font-size: 20px; line-height: 1.8; }
.dn-article-body h2, .dn-article-body h3 { font-family: var(--dn-sans); line-height: 1.25; margin-top: 30px; }
.dn-article-body a { color: #08724b; text-decoration: underline; }
.dn-article-body blockquote { border-left: 4px solid var(--dn-accent); margin-inline: 0; padding-left: 24px; }
.dn-article-body > * { max-width: 100%; }
.dn-article-body .alignwide { margin-left: 50%; max-width: 1100px; transform: translateX(-50%); width: calc(100vw - 64px); }
.dn-article-body .alignfull { margin-left: 50%; max-width: none; transform: translateX(-50%); width: 100vw; }
.dn-context-box { background: #edf3ed; border-left: 4px solid #dbaa3d; margin: 28px 0; padding: 20px 25px; }
.dn-context-box h2 { font-size: 19px; margin: 0 0 8px; }
.dn-context-box p { font-size: 18px; margin: 0; }
.dn-tags { border-top: 1px solid var(--dn-border); font-size: 13px; margin-top: 30px; padding-top: 18px; }
.dn-tags a { background: var(--dn-muted); border-radius: 3px; display: inline-block; margin: 4px; padding: 7px 10px; }
.dn-comments { margin: 0 auto 65px; max-width: 810px; }
.dn-comments input, .dn-comments textarea, .dn-search-form input { border: 1px solid #bdc8c0; border-radius: 3px; font: inherit; padding: 12px; width: 100%; }
.dn-button, .dn-search-form button { background: var(--dn-primary); border: 0; border-radius: 3px; color: #fff; cursor: pointer; font-weight: 700; padding: 12px 18px; }
.dn-search-form { display: flex; gap: 8px; margin: 25px 0 45px; max-width: 620px; }
.dn-empty { background: var(--dn-muted); border-radius: 3px; margin: 35px 0 75px; padding: 35px; }

.dn-ad { margin: 24px auto; min-height: 1px; overflow: hidden; text-align: center; }
.dn-ad-label { color: #89938d; display: block; font-size: 9px; letter-spacing: .08em; margin-bottom: 5px; text-transform: uppercase; }

.dn-site-footer { background: #eef2ed; border-top: 1px solid var(--dn-border); margin-top: 65px; padding: 35px 0; }
.dn-footer-inner { display: flex; gap: 35px; justify-content: space-between; }
.dn-footer-copy { color: #637168; font-size: 13px; line-height: 1.7; max-width: 450px; }
.dn-footer-nav { align-items: start; display: flex; flex-wrap: wrap; font-size: 13px; gap: 26px; list-style: none; margin: 0; padding: 0; }
.dn-footer-bottom { border-top: 1px solid #d3dbd2; color: #6a766e; display: flex; font-size: 12px; justify-content: space-between; margin-top: 24px; padding-top: 18px; }
.dn-mocosoft { font-weight: 700; }

@media (max-width: 1000px) {
  body.admin-bar .dn-main-nav { top: 46px; }
  .dn-lead-copy h2 { font-size: 31px; }
  .dn-side-card { gap: 14px; grid-template-columns: 1fr 36%; }
  .dn-side-card h2 { font-size: 22px; }
  .dn-masthead-note, .dn-nav-end { display: none; }
  .dn-lead-story { min-height: 450px; }
  .dn-story-card h2, .dn-story-card h3 { font-size: 22px; }
}

@media (max-width: 782px) {
  .dn-wrap { width: calc(100% - 36px); }
  .dn-utility-inner span:last-child { display: none; }
  .dn-masthead { padding-block: 22px; }
  .dn-brand-name { font-size: 31px; }
  .dn-brand-mark { height: 42px; width: 42px; }
  .dn-menu-toggle { align-items: center; background: #fff; border: 0; color: var(--dn-primary); display: flex; font-weight: 700; gap: 8px; padding: 14px 0; }
  .dn-nav-inner { align-items: stretch; display: block; }
  .dn-menu { align-items: stretch; display: none; flex-direction: column; gap: 0; padding-bottom: 12px; }
  .dn-main-nav.is-open .dn-menu { display: flex; }
  .dn-menu a { border-bottom: 0; border-left: 3px solid transparent; padding: 11px 14px; }
  .dn-menu .current-menu-item > a, .dn-menu a[aria-current="page"] { border-left-color: var(--dn-primary); }
  .dn-edition { margin-top: 25px; }
  .dn-edition small { display: none; }
  .dn-lead-grid { grid-template-columns: 1fr; }
  .dn-lead-story { min-height: 440px; }
  .dn-lead-copy { padding: 23px; }
  .dn-lead-copy h2 { font-size: 33px; }
  .dn-side-card { grid-template-columns: 1fr 35%; }
  .dn-side-card.no-image { grid-template-columns: 1fr; }
  .dn-side-card img { height: 170px; }
  .dn-story-grid, .dn-archive-grid { grid-template-columns: 1fr; gap: 25px; }
  .dn-story-card { border-bottom: 1px solid var(--dn-border); border-right: 0; padding: 0 0 23px; }
  .dn-world { padding: 23px; }
  .dn-world .dn-story-card { border-color: #456153; }
  .dn-section-heading h2 { font-size: 22px; }
  .dn-footer-inner, .dn-footer-bottom { flex-direction: column; }
  .dn-footer-nav { gap: 18px; }
  .dn-footer-bottom { gap: 10px; }
  .dn-article h1 { font-size: 35px; }
  .dn-dek { font-size: 18px; }
  .dn-article-body { font-size: 19px; }
  .dn-archive-intro { font-size: 17px; }
  .dn-search-form { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
