/*
Theme Name: Alagoas Explica
Theme URI: https://alagoasexplica.com.br
Author: Alagoas Explica
Author URI: https://alagoasexplica.com.br
Description: Tema jornalístico responsivo criado para o portal Alagoas Explica, com home editorial, últimas notícias, mais lidas, seção Explica, envio de pauta e compartilhamento por WhatsApp.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.6
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: alagoas-explica
Tags: news, blog, magazine, custom-logo, featured-images, right-sidebar, responsive-layout
*/

:root {
  --ae-navy: #062B5F;
  --ae-teal: #00BFCB;
  --ae-teal-dark: #0497A8;
  --ae-orange: #FF8A00;
  --ae-bg: #F5F8FB;
  --ae-text: #102033;
  --ae-muted: #64748b;
  --ae-border: #e5edf5;
  --ae-card: #ffffff;
  --ae-soft-teal: #E8FBFD;
  --ae-soft-orange: #FFF7EE;
  --ae-max: 1180px;
  --ae-radius: 22px;
  --ae-shadow: 0 14px 35px rgba(6, 43, 95, .08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ae-bg);
  color: var(--ae-text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--ae-teal-dark); }
img { max-width: 100%; height: auto; display: block; }
button, input, textarea, select { font: inherit; }

.ae-container {
  width: min(var(--ae-max), calc(100% - 32px));
  margin-inline: auto;
}

.screen-reader-text {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Top bar */
.ae-topbar {
  background: var(--ae-navy);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}
.ae-topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 8px 0;
}
.ae-topbar__left, .ae-topbar__right {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}
.ae-dot { color: var(--ae-orange); font-weight: 900; }

/* Header */
.ae-site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,.96);
  border-bottom: 1px solid rgba(226,232,240,.9);
  backdrop-filter: blur(12px);
}
.ae-header-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 16px 0;
}
.ae-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
}
.ae-custom-logo img { max-height: 58px; width: auto; }
.ae-fallback-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}
.ae-logo-mark {
  position: relative;
  width: 54px;
  height: 54px;
  flex: 0 0 54px;
  border-radius: 18px;
  background: linear-gradient(135deg, #45d7e5 0%, #00b7c8 45%, #062B5F 100%);
  box-shadow: 0 12px 22px rgba(6,43,95,.2);
}
.ae-logo-mark:before {
  content: "";
  position: absolute;
  left: 9px;
  top: 9px;
  width: 29px;
  height: 28px;
  border-radius: 7px;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(6,43,95,.08);
}
.ae-logo-mark:after {
  content: "";
  position: absolute;
  right: -3px;
  top: -3px;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  border-top: 4px solid var(--ae-orange);
  border-right: 4px solid var(--ae-orange);
}
.ae-logo-map {
  position: absolute;
  right: 5px;
  bottom: 6px;
  width: 31px;
  height: 18px;
  border-radius: 999px 55% 40% 65%;
  transform: rotate(-12deg);
  background: var(--ae-teal);
}
.ae-logo-lines {
  position: absolute;
  left: 14px;
  top: 15px;
  width: 21px;
  height: 20px;
  z-index: 2;
}
.ae-logo-lines span { display:block; height: 3px; margin-bottom: 4px; border-radius: 10px; background: var(--ae-navy); }
.ae-logo-lines span:first-child { width: 9px; height: 9px; border-radius: 2px; }
.ae-logo-lines span:last-child { background: var(--ae-teal); width: 16px; }
.ae-logo-text { line-height: .92; letter-spacing: -0.04em; font-weight: 950; }
.ae-logo-text strong { display: block; color: var(--ae-navy); font-size: 22px; }
.ae-logo-text span { display: block; color: var(--ae-teal-dark); font-size: 22px; }
.ae-logo-underline { width: 64px; height: 4px; margin: 4px 0 0 38px; background: var(--ae-orange); border-radius: 999px; }

.ae-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  flex: 1;
}
.ae-nav ul, .ae-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.ae-nav ul {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  flex-wrap: wrap;
}
.ae-nav a {
  color: #334155;
  font-size: 14px;
  font-weight: 850;
}
.ae-nav a:hover { color: var(--ae-teal-dark); }
.ae-header-actions { display:flex; align-items:center; gap:10px; }
.ae-search-btn, .ae-menu-toggle {
  border: 0;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  cursor: pointer;
  color: var(--ae-navy);
  background: #f1f5f9;
  display: inline-grid;
  place-items: center;
}
.ae-alert-btn {
  border: 0;
  border-radius: 999px;
  padding: 11px 16px;
  background: var(--ae-soft-teal);
  color: var(--ae-teal-dark);
  font-size: 14px;
  font-weight: 950;
  cursor: pointer;
}
.ae-menu-toggle { display: none; color:#fff; background: var(--ae-navy); }
.ae-menu-toggle span { width: 18px; height: 2px; background: currentColor; display: block; margin: 3px 0; border-radius: 10px; }

.ae-quick-nav {
  border-top: 1px solid #eef2f7;
  background: #fff;
}
.ae-quick-nav__inner {
  display: flex;
  align-items: center;
  gap: 14px;
  overflow-x: auto;
  padding: 9px 0;
  color: var(--ae-navy);
  font-size: 14px;
  font-weight: 850;
  scrollbar-width: none;
}
.ae-quick-nav__inner::-webkit-scrollbar { display: none; }
.ae-live-pill {
  flex: 0 0 auto;
  background: var(--ae-orange);
  color: #fff;
  padding: 5px 12px;
  border-radius: 999px;
}

/* Layout */
.ae-main { padding: 24px 0 0; }
.ae-breaking {
  background: var(--ae-soft-orange);
  border: 1px solid #FFE1BF;
  border-radius: var(--ae-radius);
  padding: 14px 18px;
  margin-bottom: 24px;
  box-shadow: 0 8px 22px rgba(255,138,0,.06);
}
.ae-breaking__inner { display:flex; align-items:center; justify-content:space-between; gap: 16px; flex-wrap: wrap; }
.ae-badge {
  display: inline-flex;
  align-items: center;
  background: var(--ae-orange);
  color: #fff;
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 11px;
  font-weight: 950;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.ae-breaking p { margin: 0; color: var(--ae-navy); font-weight: 850; }
.ae-link { color: var(--ae-teal-dark); font-weight: 950; }

.ae-grid-top {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
}
.ae-side-stack { display: grid; gap: 24px; }
.ae-section-grid {
  display: grid;
  grid-template-columns: minmax(0,1fr) 340px;
  gap: 24px;
  margin-top: 34px;
}

/* Cards */
.ae-card {
  background: var(--ae-card);
  border: 1px solid rgba(226,232,240,.9);
  border-radius: var(--ae-radius);
  overflow: hidden;
  box-shadow: 0 8px 22px rgba(6,43,95,.05);
}
.ae-card:hover { box-shadow: var(--ae-shadow); }
.ae-article-card__thumb {
  position: relative;
  min-height: 215px;
  background: linear-gradient(135deg, var(--ae-navy), var(--ae-teal));
  overflow: hidden;
}
.ae-article-card--hero .ae-article-card__thumb { min-height: 380px; }
.ae-article-card__thumb img { width: 100%; height: 100%; min-height: inherit; object-fit: cover; }
.ae-article-card__thumb:after {
  content: "";
  position:absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(2,11,28,.78), rgba(2,11,28,0));
  pointer-events: none;
}
.ae-article-card__cat { position: absolute; left: 18px; top: 18px; z-index: 2; }
.ae-tag {
  display:inline-flex;
  background: var(--ae-soft-teal);
  color: var(--ae-teal-dark);
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 11px;
  font-weight: 950;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.ae-article-card__overlay {
  position:absolute;
  inset-inline: 0;
  bottom: 0;
  z-index: 2;
  color: #fff;
  padding: 22px;
}
.ae-meta { color: #64748b; font-size: 12px; font-weight: 700; }
.ae-article-card__overlay .ae-meta { color: rgba(255,255,255,.88); }
.ae-article-card h2,
.ae-article-card h3 { margin: 7px 0 0; line-height: 1.08; color: inherit; }
.ae-article-card--hero h2 { font-size: clamp(28px, 4vw, 44px); letter-spacing: -0.04em; }
.ae-article-card:not(.ae-article-card--hero) h3 { font-size: 22px; letter-spacing: -0.03em; }
.ae-article-card__body { padding: 18px 20px 20px; }
.ae-article-card__body p { margin: 0; color: var(--ae-muted); font-size: 14px; }
.ae-card-footer { margin-top: 18px; padding-top: 14px; border-top: 1px solid #eef2f7; display:flex; align-items:center; justify-content:space-between; gap: 12px; }
.ae-read-more { color: var(--ae-navy); font-size: 14px; font-weight: 950; }
.ae-card-icons { display:flex; gap:10px; color:#94a3b8; }

.ae-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.ae-section-title h2 {
  margin: 0;
  color: var(--ae-navy);
  font-size: 24px;
  font-weight: 950;
  letter-spacing: -0.04em;
}
.ae-section-title__left { display:flex; align-items:center; gap:8px; }
.ae-section-icon { color: var(--ae-orange); font-weight: 950; }

.ae-most-read { padding: 20px; }
.ae-most-read ol { margin: 0; padding: 0; list-style: none; }
.ae-most-read li { display:flex; gap: 12px; padding: 0 0 14px; margin-bottom: 14px; border-bottom: 1px solid #eef2f7; }
.ae-most-read li:last-child { border-bottom:0; margin-bottom:0; padding-bottom:0; }
.ae-most-read__number { color: var(--ae-teal-dark); font-size: 28px; font-weight: 950; line-height: 1; }
.ae-most-read a { color: var(--ae-text); font-size: 14px; line-height:1.35; font-weight: 900; }
.ae-most-read time { display:block; margin-top:4px; color:#94a3b8; font-size:12px; }

.ae-latest-list { overflow: hidden; }
.ae-latest-item { display:flex; gap:16px; padding: 17px; border-bottom: 1px solid #eef2f7; }
.ae-latest-item:last-child { border-bottom:0; }
.ae-latest-thumb { flex: 0 0 112px; height: 86px; border-radius: 15px; background: linear-gradient(135deg,#e2e8f0,#f8fafc); overflow:hidden; }
.ae-latest-thumb img { width: 100%; height: 100%; object-fit: cover; }
.ae-latest-item h3 { margin: 7px 0 3px; font-size: 18px; line-height: 1.2; color: var(--ae-navy); letter-spacing:-0.025em; }
.ae-latest-item p { margin: 0; color: var(--ae-muted); font-size: 14px; }

.ae-sidebar { display:grid; gap: 22px; align-content:start; }
.ae-widget { padding: 22px; }
.ae-widget--dark { background: var(--ae-navy); color:#fff; }
.ae-widget--dark p { color: rgba(255,255,255,.78); }
.ae-widget h2, .ae-widget h3 { margin: 0 0 10px; font-size: 20px; line-height:1.2; font-weight: 950; color: inherit; }
.ae-widget p { margin: 0; font-size: 14px; }
.ae-btn {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  border:0;
  cursor:pointer;
  border-radius: 14px;
  padding: 12px 18px;
  background: var(--ae-orange);
  color:#fff;
  font-size:14px;
  font-weight:950;
}
.ae-btn--full { width: 100%; margin-top: 16px; }
.ae-btn--light { background: #fff; color: var(--ae-navy); }
.ae-btn--outline { background: transparent; border: 1px solid rgba(255,255,255,.45); color:#fff; }
.ae-city-list { display:flex; gap: 9px; flex-wrap:wrap; }
.ae-city-list a {
  display:inline-flex;
  padding: 8px 12px;
  border-radius:999px;
  background:#f1f5f9;
  color:var(--ae-navy);
  font-size:14px;
  font-weight:850;
}
.ae-city-list a:hover { background: var(--ae-soft-teal); }

.ae-explains { margin-top: 34px; }
.ae-explain-grid { display:grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.ae-explain-card { padding: 22px; }
.ae-explain-card h3 { margin: 16px 0 10px; color: var(--ae-navy); font-size: 20px; line-height:1.2; letter-spacing:-0.03em; }
.ae-explain-card p { color: var(--ae-muted); font-size:14px; margin:0; }
.ae-tag--orange { background:#FFF2E3; color:#B75A00; }

.ae-submit-box {
  margin-top: 34px;
  border-radius: 28px;
  background: linear-gradient(120deg, var(--ae-navy), var(--ae-teal-dark));
  color:#fff;
  padding: 30px;
  overflow:hidden;
  box-shadow: var(--ae-shadow);
}
.ae-submit-box__inner { display:grid; grid-template-columns: minmax(0, 1.4fr) minmax(260px, .8fr); align-items:center; gap: 24px; }
.ae-submit-box h2 { margin: 0; font-size: 28px; letter-spacing:-0.04em; line-height:1.1; }
.ae-submit-box p { margin: 10px 0 0; color: rgba(255,255,255,.85); font-size: 15px; }
.ae-submit-actions { display:flex; gap: 12px; justify-content:flex-end; flex-wrap:wrap; }

/* Single / pages */
.ae-content-layout { display:grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 28px; }
.ae-single {
  background:#fff;
  border:1px solid rgba(226,232,240,.9);
  border-radius: 24px;
  padding: clamp(22px,4vw,42px);
  box-shadow: 0 8px 22px rgba(6,43,95,.05);
}
.ae-single h1 { margin:0 0 12px; color:var(--ae-navy); font-size: clamp(32px, 5vw, 52px); line-height:1.02; letter-spacing:-0.055em; }
.ae-single .ae-lead { font-size: 19px; color: #475569; margin: 0 0 16px; }
.ae-single-meta { display:flex; gap: 10px; flex-wrap:wrap; color:#64748b; font-size:14px; border-bottom:1px solid #eef2f7; padding-bottom:18px; margin-bottom:24px; }
.ae-featured { border-radius: 20px; overflow:hidden; margin: 24px 0; }
.ae-entry-content { font-size: 18px; }
.ae-entry-content h2, .ae-entry-content h3 { color:var(--ae-navy); letter-spacing:-0.035em; }
.ae-entry-content a { color:var(--ae-teal-dark); font-weight: 800; text-decoration: underline; }
.ae-share-box { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; margin-top:30px; padding-top:20px; border-top:1px solid #eef2f7; }
.ae-whatsapp { background:#25D366; color:#fff; }
.ae-related { margin-top:26px; }

.ae-page-title { margin: 0 0 22px; color: var(--ae-navy); font-size: clamp(30px, 4vw, 46px); letter-spacing:-0.05em; }

/* Forms */
.ae-pauta-form { display:grid; gap:14px; }
.ae-pauta-form label { display:grid; gap:6px; font-weight:850; color:var(--ae-navy); }
.ae-pauta-form input, .ae-pauta-form textarea, .ae-pauta-form select {
  width:100%;
  border:1px solid #dbe5ef;
  border-radius: 14px;
  padding: 12px 14px;
  background:#fff;
  color:var(--ae-text);
}
.ae-pauta-form textarea { min-height: 120px; resize: vertical; }
.ae-form-message { padding:12px 14px; border-radius:14px; background:var(--ae-soft-teal); color:var(--ae-navy); font-weight:850; }

/* Footer */
.ae-footer {
  margin-top: 38px;
  background:#fff;
  border-top:1px solid #e2e8f0;
}
.ae-footer__inner { display:grid; grid-template-columns: 1.2fr 2fr; gap: 42px; padding: 36px 0; }
.ae-footer p { color: var(--ae-muted); font-size:14px; max-width:420px; }
.ae-footer-cols { display:grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.ae-footer h4 { margin:0 0 12px; color: var(--ae-navy); font-size:16px; }
.ae-footer li { margin: 6px 0; color: var(--ae-muted); font-size:14px; }
.ae-footer-bottom { border-top:1px solid #eef2f7; padding: 14px 0; color:#64748b; font-size:13px; }

/* Search */
.ae-search-modal {
  display:none;
  position:fixed;
  inset:0;
  z-index:100;
  background:rgba(2,11,28,.65);
  padding: 24px;
}
.ae-search-modal.is-open { display:grid; place-items:start center; }
.ae-search-modal__box { width:min(640px,100%); margin-top: 12vh; background:#fff; border-radius:22px; padding:22px; box-shadow: 0 30px 80px rgba(0,0,0,.25); }
.ae-search-form { display:flex; gap:10px; }
.ae-search-form input { flex:1; border:1px solid #dbe5ef; border-radius:14px; padding:13px 15px; }

/* Responsive */
@media (max-width: 980px) {
  .ae-menu-toggle { display:inline-grid; }
  .ae-nav { display:none; position:absolute; left:0; right:0; top: 100%; background:#fff; border-bottom:1px solid #e2e8f0; box-shadow: var(--ae-shadow); }
  .ae-nav.is-open { display:block; }
  .ae-nav ul { display:grid; gap:0; padding: 8px 16px 18px; justify-items:start; }
  .ae-nav li { width:100%; border-bottom:1px solid #eef2f7; }
  .ae-nav a { display:block; padding:12px 0; }
  .ae-alert-btn { display:none; }
  .ae-grid-top, .ae-section-grid, .ae-content-layout, .ae-footer__inner, .ae-submit-box__inner { grid-template-columns: 1fr; }
  .ae-explain-grid { grid-template-columns: 1fr; }
  .ae-sidebar { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .ae-container { width: min(100% - 24px, var(--ae-max)); }
  .ae-topbar__inner { align-items:flex-start; }
  .ae-topbar__right { display:none; }
  .ae-header-main { gap:12px; }
  .ae-logo-mark { width:46px; height:46px; flex-basis:46px; }
  .ae-logo-text strong, .ae-logo-text span { font-size:19px; }
  .ae-logo-underline { width:54px; margin-left:31px; }
  .ae-search-btn { display:none; }
  .ae-article-card--hero .ae-article-card__thumb { min-height: 310px; }
  .ae-article-card--hero h2 { font-size: 28px; }
  .ae-latest-item { align-items:flex-start; }
  .ae-latest-thumb { flex-basis: 88px; height: 72px; }
  .ae-submit-box { padding:22px; border-radius:22px; }
  .ae-submit-actions { justify-content: stretch; }
  .ae-submit-actions .ae-btn { width:100%; }
  .ae-footer-cols { grid-template-columns: 1fr; }
}
