/*
Theme Name:  FastNews
Theme URI:   https://redefast.com.br/temas/fastnews
Author:      Rede Fast
Author URI:  https://redefast.com.br
Description: Tema premium de portal de notícias para WordPress. Layout moderno, PageSpeed otimizado, sem jQuery. Suporte a categorias, regiões, hero configurável e painel de opções completo.
Version:     1.2.0
Requires at least: 6.0
Tested up to: 6.7
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: fastnews
Tags: news, magazine, blog, custom-colors, custom-logo, custom-menu, featured-images, footer-widgets, full-width-template, rtl-language-support, sticky-post, theme-options, threaded-comments, translation-ready
*/

/* =====================================================
   VARIÁVEIS CSS & RESET
   ===================================================== */
:root {
  --fn-primary:       #E8290B;
  --fn-primary-dark:  #C01E08;
  --fn-primary-light: #FF4422;
  --fn-secondary:     #1A1A2E;
  --fn-accent:        #F0A500;
  --fn-bg:            #F4F4F6;
  --fn-card:          #FFFFFF;
  --fn-text:          #1A1A2E;
  --fn-muted:         #6B7280;
  --fn-light:         #9CA3AF;
  --fn-border:        #E5E7EB;
  --fn-radius:        6px;
  --fn-radius-lg:     12px;
  --fn-shadow:        0 2px 8px rgba(0,0,0,0.08);
  --fn-shadow-md:     0 4px 20px rgba(0,0,0,0.12);
  --fn-font:          'Poppins', sans-serif;
  --fn-max-width:     1440px;
}

*,
*::before,
*::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--fn-font);
  background: var(--fn-bg);
  color: var(--fn-text);
  font-size: 15px;
  line-height: 1.6;
}

img, video { display: block; max-width: 100%; height: auto; }
a { text-decoration: none; color: inherit; }
ul, ol { list-style: none; }
button, input, select, textarea {
  font-family: var(--fn-font);
  font-size: inherit;
}
button { cursor: pointer; }

/* =====================================================
   TIPOGRAFIA
   ===================================================== */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.25;
  color: var(--fn-text);
}
h1 { font-size: var(--fn-fs-h1, clamp(22px, 3vw, 32px)); }
h2 { font-size: var(--fn-fs-h2, clamp(18px, 2.5vw, 26px)); }
h3 { font-size: var(--fn-fs-h3, clamp(16px, 2vw, 20px)); }
h4 { font-size: var(--fn-fs-h4, 17px); }

p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

/* =====================================================
   UTILITÁRIOS
   ===================================================== */
.container {
  max-width: var(--fn-max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.fn-sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* =====================================================
   TOPBAR
   ===================================================== */
.fn-topbar {
  background: var(--fn-secondary);
  color: #CBD5E1;
  font-size: 12px;
  padding: 6px 0;
}
.fn-topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.fn-topbar__date { opacity: .7; white-space: nowrap; }
.fn-topbar__regions { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }
.fn-topbar__regions-label { font-size: 11px; opacity: .5; margin-right: 4px; }
.fn-topbar__region-link {
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 500;
  border: 1px solid rgba(255,255,255,.15);
  color: #CBD5E1;
  transition: background .2s, color .2s, border-color .2s;
}
.fn-topbar__region-link:hover,
.fn-topbar__region-link.is-active {
  background: var(--fn-primary);
  color: #fff;
  border-color: var(--fn-primary);
}
.fn-topbar__social { display: flex; gap: 14px; }
.fn-topbar__social a { color: #CBD5E1; font-size: 12px; opacity: .7; transition: opacity .2s; }
.fn-topbar__social a:hover { opacity: 1; }

/* =====================================================
   HEADER
   ===================================================== */
.fn-header {
  background: var(--fn-card);
  border-bottom: 1px solid var(--fn-border);
  position: sticky;
  top: 0;
  z-index: 200;
  box-shadow: var(--fn-shadow);
}
.fn-header__inner {
  display: flex;
  align-items: center;
  height: 64px;
  gap: 24px;
}

/* Logo */
.fn-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -.04em;
  color: var(--fn-text);
  flex-shrink: 0;
}
.fn-logo__icon {
  width: 36px; height: 36px;
  background: var(--fn-primary);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 18px; font-weight: 900;
  flex-shrink: 0;
}
.fn-logo img { height: 40px; width: auto; }
.fn-logo__text-accent { color: var(--fn-primary); }

/* Nav principal */
.fn-nav { display: flex; align-items: center; gap: 2px; flex: 1; }
.fn-nav__list { display: flex; align-items: center; gap: 2px; }
.fn-nav__item { position: relative; }
.fn-nav__link {
  display: flex; align-items: center; gap: 5px;
  padding: 8px 12px;
  border-radius: var(--fn-radius);
  font-size: 13px; font-weight: 500;
  color: var(--fn-muted);
  transition: background .2s, color .2s;
  white-space: nowrap;
}
.fn-nav__link:hover { background: var(--fn-bg); color: var(--fn-text); }
.fn-nav__link.current-menu-item,
.fn-nav__link.current-menu-ancestor { color: var(--fn-primary); font-weight: 600; }
.fn-nav__dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--fn-primary);
}

/* Header actions */
.fn-header__actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.fn-search-toggle {
  background: none;
  border: 1px solid var(--fn-border);
  border-radius: var(--fn-radius);
  padding: 7px 14px;
  font-size: 13px;
  color: var(--fn-muted);
  display: flex; align-items: center; gap: 6px;
  transition: border-color .2s, color .2s;
}
.fn-search-toggle:hover { border-color: var(--fn-primary); color: var(--fn-primary); }
.fn-btn-subscribe {
  background: var(--fn-primary);
  color: #fff;
  border: none;
  border-radius: var(--fn-radius);
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 600;
  transition: background .2s;
  white-space: nowrap;
}
.fn-btn-subscribe:hover { background: var(--fn-primary-dark); }

/* Menu hamburguer (mobile) */
.fn-menu-toggle {
  display: none;
  background: none; border: 1px solid var(--fn-border);
  border-radius: var(--fn-radius); padding: 7px 10px;
  color: var(--fn-text); font-size: 18px;
}

/* Search overlay */
.fn-search-overlay {
  display: none;
  position: fixed; inset: 0; z-index: 999;
  background: rgba(0,0,0,.6);
  align-items: flex-start; justify-content: center;
  padding-top: 80px;
}
.fn-search-overlay.is-open { display: flex; }
.fn-search-box {
  background: var(--fn-card);
  border-radius: var(--fn-radius-lg);
  padding: 24px;
  width: 100%; max-width: 600px;
  margin: 0 16px;
}
.fn-search-box form { display: flex; gap: 10px; }
.fn-search-box input {
  flex: 1; padding: 12px 16px;
  border: 1px solid var(--fn-border); border-radius: var(--fn-radius);
  font-size: 15px; outline: none;
}
.fn-search-box input:focus { border-color: var(--fn-primary); }
.fn-search-box button[type=submit] {
  background: var(--fn-primary); color: #fff;
  border: none; border-radius: var(--fn-radius);
  padding: 12px 20px; font-size: 14px; font-weight: 600;
}

/* =====================================================
   BREAKING NEWS BAR
   ===================================================== */
.fn-breaking {
  background: var(--fn-primary);
  color: #fff;
  display: flex;
  align-items: center;
  overflow: hidden;
  height: 34px;
}
.fn-breaking__label {
  background: var(--fn-secondary);
  padding: 0 16px;
  font-size: 11px; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase;
  white-space: nowrap; height: 100%;
  display: flex; align-items: center;
  flex-shrink: 0;
}
.fn-breaking__track { flex: 1; overflow: hidden; position: relative; }
.fn-breaking__ticker {
  display: inline-block;
  white-space: nowrap;
  font-size: 12px;
  animation: fn-ticker 40s linear infinite;
  padding-left: 100%;
}
.fn-breaking__ticker a { color: #fff; margin: 0 24px; }
.fn-breaking__ticker a:hover { text-decoration: underline; }
@keyframes fn-ticker {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}

/* =====================================================
   HERO SECTION
   ===================================================== */
.fn-hero { padding: 24px 0 20px; }
.fn-hero__grid {
  display: grid;
  grid-template-columns: 1fr 1fr 300px;
  grid-template-rows: 280px 240px;
  gap: 14px;
}

/* Card base para hero */
.fn-hero-card {
  position: relative; overflow: hidden;
  border-radius: var(--fn-radius-lg);
  background: var(--fn-secondary);
  display: block; color: #fff;
  /* Garante que a imagem tenha onde se expandir */
  min-height: 100%;
}
.fn-hero-card img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}
.fn-hero-card:hover img { transform: scale(1.04); }
.fn-hero-card__overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(10,10,20,.92) 0%, rgba(10,10,20,.15) 65%, transparent 100%);
  z-index: 1;
}
.fn-hero-card__body {
  position: absolute; bottom: 0; left: 0; right: 0;
  z-index: 2;
}
.fn-hero-card--main { grid-column: 1; grid-row: 1 / 3; }
.fn-hero-card--main .fn-hero-card__body { padding: 28px; }
.fn-hero-card--main .fn-hero-card__title { font-size: var(--fn-fs-hero-main, 24px); font-weight: 700; line-height: 1.25; color:#fff; }
.fn-hero-card--secondary { grid-column: 2; grid-row: 1; }
.fn-hero-card--secondary .fn-hero-card__body { padding: 18px; }
.fn-hero-card--secondary .fn-hero-card__title { font-size: var(--fn-fs-hero-sec, 16px); font-weight: 600; line-height: 1.3; }
.fn-hero-card--tertiary { grid-column: 2; grid-row: 2; }
.fn-hero-card--tertiary .fn-hero-card__body { padding: 14px; }
.fn-hero-card--tertiary .fn-hero-card__title { font-size: var(--fn-fs-hero-sec, 14px); font-weight: 600; line-height: 1.3; }
.fn-hero-card__meta { font-size: 11px; color: rgba(255,255,255,.65); display: flex; gap: 10px; margin-top: 6px; flex-wrap: wrap; }

/* Placeholder quando não há imagem no hero */
.fn-hero-card__placeholder {
  position: absolute; inset: 0;
  display: block;
  background: var(--fn-secondary);
}
.fn-hero-card:not(:has(img)) { background: var(--fn-secondary); }

/* Hero sidebar */
.fn-hero__sidebar {
  grid-column: 3; grid-row: 1 / 3;
  background: var(--fn-card);
  border-radius: var(--fn-radius-lg);
  border: 1px solid var(--fn-border);
  display: flex; flex-direction: column;
  overflow: hidden;
}
.fn-hero__sidebar-header {
  padding: 13px 16px;
  border-bottom: 1px solid var(--fn-border);
  font-size: 11px; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase;
  color: var(--fn-muted);
  display: flex; align-items: center; gap: 8px;
  flex-shrink: 0;
}
.fn-hero__sidebar-header::before {
  content: '';
  width: 8px; height: 8px;
  border-radius: 50%; background: var(--fn-primary);
  flex-shrink: 0;
}
.fn-hero__sidebar-list { flex: 1; overflow-y: auto; }
.fn-hero__sidebar-item {
  display: flex; gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--fn-border);
  transition: background .2s;
}
.fn-hero__sidebar-item:last-child { border-bottom: none; }
.fn-hero__sidebar-item:hover { background: var(--fn-bg); }
.fn-hero__sidebar-thumb {
  width: 64px; height: 52px;
  border-radius: var(--fn-radius);
  overflow: hidden; flex-shrink: 0;
  background: var(--fn-bg);
}
.fn-hero__sidebar-thumb img { width: 100%; height: 100%; object-fit: cover; }
.fn-hero__sidebar-title {
  font-size: 11px; font-weight: 600; line-height: 1.35; color: var(--fn-text);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  margin-bottom: 3px;
}
.fn-hero__sidebar-meta { font-size: 10px; color: var(--fn-light); }

/* =====================================================
   BADGE / CATEGORY LABEL
   ===================================================== */
.fn-badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 4px;
  font-size: 10px; font-weight: 700;
  letter-spacing: .07em; text-transform: uppercase;
  background: var(--fn-primary); color: #fff;
  margin-bottom: 8px;
}

/* =====================================================
   PAGE LAYOUT (main + aside)
   ===================================================== */
.fn-page-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 28px;
  padding: 24px 0 48px;
}
.fn-main { min-width: 0; }
.fn-aside { min-width: 0; }

/* =====================================================
   SECTION HEADER
   ===================================================== */
.fn-section { margin-bottom: 36px; }
.fn-section__header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px; gap: 12px;
}
.fn-section__title {
  display: flex; align-items: center; gap: 10px;
  font-size: 17px; font-weight: 700;
}
.fn-section__title-bar {
  width: 4px; height: 20px;
  border-radius: 2px;
  background: var(--fn-primary);
  flex-shrink: 0;
}
.fn-section__see-all {
  font-size: 12px; font-weight: 600;
  color: var(--fn-primary);
  white-space: nowrap;
  transition: letter-spacing .2s;
}
.fn-section__see-all:hover { letter-spacing: .03em; }

/* =====================================================
   NEWS CARDS
   ===================================================== */

/* Grade 3 colunas */
.fn-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
/* Grade 2 colunas */
.fn-grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
/* Layout featured: big + coluna */
.fn-grid-featured { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; }
/* Lista horizontal */
.fn-list { display: flex; flex-direction: column; gap: 12px; }

/* Card padrão (vertical) */
.fn-card {
  background: var(--fn-card);
  border-radius: var(--fn-radius-lg);
  border: 1px solid var(--fn-border);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: box-shadow .2s, transform .2s;
}
.fn-card:hover { box-shadow: var(--fn-shadow-md); transform: translateY(-2px); }
.fn-card__img { overflow: hidden; aspect-ratio: 16/9; background: var(--fn-bg); flex-shrink: 0; }
.fn-card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.fn-card:hover .fn-card__img img { transform: scale(1.04); }
.fn-card__body { padding: 14px 16px; flex: 1; display: flex; flex-direction: column; gap: 7px; }
.fn-card__title {
  font-size: var(--fn-fs-card, 14px); font-weight: 600; line-height: 1.4; color: var(--fn-text);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.fn-card__excerpt {
  font-size: var(--fn-fs-excerpt, 12px); color: var(--fn-muted); line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.fn-card__footer {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 11px; color: var(--fn-light); margin-top: auto; padding-top: 6px;
}
.fn-card__author { display: flex; align-items: center; gap: 5px; }
.fn-card__avatar {
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--fn-primary); color: #fff;
  font-size: 9px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

/* Card horizontal */
.fn-card-h {
  background: var(--fn-card);
  border-radius: var(--fn-radius-lg);
  border: 1px solid var(--fn-border);
  overflow: hidden;
  display: flex;
  transition: box-shadow .2s;
}
.fn-card-h:hover { box-shadow: var(--fn-shadow); }
.fn-card-h__img { width: 120px; flex-shrink: 0; overflow: hidden; background: var(--fn-bg); }
.fn-card-h__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.fn-card-h:hover .fn-card-h__img img { transform: scale(1.04); }
.fn-card-h__body { padding: 12px 14px; flex: 1; display: flex; flex-direction: column; gap: 5px; }
.fn-card-h__title {
  font-size: var(--fn-fs-card, 13px); font-weight: 600; line-height: 1.4; color: var(--fn-text);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.fn-card-h__meta { font-size: 11px; color: var(--fn-light); margin-top: auto; }

/* Card big (featured) */
.fn-card-big {
  background: var(--fn-card);
  border-radius: var(--fn-radius-lg);
  border: 1px solid var(--fn-border);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: box-shadow .2s;
}
.fn-card-big:hover { box-shadow: var(--fn-shadow-md); }
.fn-card-big__img { aspect-ratio: 4/3; overflow: hidden; background: var(--fn-bg); }
.fn-card-big__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.fn-card-big:hover .fn-card-big__img img { transform: scale(1.04); }
.fn-card-big__body { padding: 18px; flex: 1; }
.fn-card-big__title { font-size: var(--fn-fs-h4, 18px); font-weight: 700; line-height: 1.3; margin-bottom: 8px; }
.fn-card-big__excerpt { font-size: 13px; color: var(--fn-muted); line-height: 1.5; margin-bottom: 12px; }
.fn-card-big__footer { font-size: 11px; color: var(--fn-light); display: flex; gap: 12px; align-items: center; }
.fn-card-big__author { display: flex; align-items: center; gap: 5px; }

/* Featured col */
.fn-featured-col { display: flex; flex-direction: column; gap: 12px; }

/* =====================================================
   REGIÕES
   ===================================================== */
.fn-regions__tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.fn-region-tab {
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px; font-weight: 600;
  background: var(--fn-card);
  border: 1px solid var(--fn-border);
  color: var(--fn-muted);
  transition: all .2s;
}
.fn-region-tab:hover { border-color: var(--fn-primary); color: var(--fn-primary); }
.fn-region-tab.is-active { background: var(--fn-primary); color: #fff; border-color: var(--fn-primary); }

/* =====================================================
   SIDEBAR / WIDGETS
   ===================================================== */
.fn-widget {
  background: var(--fn-card);
  border-radius: var(--fn-radius-lg);
  border: 1px solid var(--fn-border);
  overflow: hidden;
  margin-bottom: 20px;
}
.fn-widget__header {
  padding: 12px 16px;
  border-bottom: 1px solid var(--fn-border);
  font-size: 11px; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase;
  color: var(--fn-muted);
  display: flex; align-items: center; gap: 8px;
}
.fn-widget__header::before {
  content: '';
  width: 3px; height: 14px;
  background: var(--fn-primary);
  border-radius: 2px; flex-shrink: 0;
}
.fn-widget__body { padding: 0 16px; }

/* Most Read */
.fn-most-read-item {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 10px 0;
  border-bottom: 1px solid var(--fn-border);
}
.fn-most-read-item:last-child { border-bottom: none; }
.fn-most-read-num { font-size: 20px; font-weight: 800; color: var(--fn-border); min-width: 28px; line-height: 1; padding-top: 2px; }
.fn-most-read-title { font-size: 12px; font-weight: 600; line-height: 1.4; color: var(--fn-text); transition: color .2s; }
.fn-most-read-item:hover .fn-most-read-title { color: var(--fn-primary); }
.fn-most-read-meta { font-size: 10px; color: var(--fn-light); margin-top: 3px; }

/* Newsletter widget */
.fn-newsletter-widget {
  background: var(--fn-secondary);
  border-radius: var(--fn-radius-lg);
  padding: 20px;
  margin-bottom: 20px;
  color: #fff;
}
.fn-newsletter-widget__title { font-size: 15px; font-weight: 700; margin-bottom: 6px; }
.fn-newsletter-widget__desc { font-size: 12px; color: rgba(255,255,255,.6); line-height: 1.5; margin-bottom: 14px; }
.fn-newsletter-widget__input {
  width: 100%; padding: 9px 12px;
  border: 1px solid rgba(255,255,255,.15);
  border-radius: var(--fn-radius);
  background: rgba(255,255,255,.08); color: #fff;
  font-size: 13px; outline: none;
  margin-bottom: 8px;
}
.fn-newsletter-widget__input::placeholder { color: rgba(255,255,255,.4); }
.fn-newsletter-widget__btn {
  width: 100%; padding: 9px;
  border: none; border-radius: var(--fn-radius);
  background: var(--fn-primary); color: #fff;
  font-size: 13px; font-weight: 600;
  transition: background .2s;
}
.fn-newsletter-widget__btn:hover { background: var(--fn-primary-light); }

/* Tags cloud */
.fn-tags { display: flex; flex-wrap: wrap; gap: 6px; padding: 12px 16px; }
.fn-tag {
  padding: 4px 10px;
  background: var(--fn-bg); border: 1px solid var(--fn-border);
  border-radius: 20px; font-size: 11px; font-weight: 500; color: var(--fn-muted);
  transition: all .2s;
}
.fn-tag:hover { background: var(--fn-primary); color: #fff; border-color: var(--fn-primary); }

/* Ad Banner */
.fn-ad { background: var(--fn-card); border: 1px dashed var(--fn-border); border-radius: var(--fn-radius); padding: 20px 16px; text-align: center; margin-bottom: 20px; color: var(--fn-light); font-size: 12px; }

/* =====================================================
   SOCIAL FOLLOW WIDGET
   ===================================================== */
.fn-social-follow { display: flex; flex-direction: column; gap: 8px; padding: 12px 16px; }
.fn-social-btn {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: var(--fn-radius);
  color: #fff; font-size: 12px; font-weight: 600;
  transition: opacity .2s;
}
.fn-social-btn:hover { opacity: .9; }
.fn-social-btn--fb { background: #1877F2; }
.fn-social-btn--ig { background: linear-gradient(135deg,#405DE6,#C13584,#FD1D1D); }
.fn-social-btn--yt { background: #FF0000; }
.fn-social-btn--tw { background: #1DA1F2; }
.fn-social-btn__icon { font-size: 14px; }

/* =====================================================
   FOOTER
   ===================================================== */
.fn-footer {
  background: var(--fn-secondary);
  color: rgba(255,255,255,.75);
  margin-top: 40px;
}
.fn-footer__main {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  padding: 48px 24px 32px;
  max-width: var(--fn-max-width);
  margin: 0 auto;
}
.fn-footer__brand-logo { margin-bottom: 12px; }
.fn-footer__brand-logo .fn-logo { color: #fff; }
.fn-footer__desc { font-size: 13px; line-height: 1.7; opacity: .6; margin-top: 8px; }
/* As 3 colunas de links ficam agrupadas num subgrid de 3 colunas */
.fn-footer__cols-grid {
  display: contents; /* Em desktop os itens filhos entram direto no grid pai */
}
.fn-footer__col-title {
  font-size: 11px; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase;
  color: rgba(255,255,255,.4);
  margin-bottom: 14px;
}
.fn-footer__col ul { display: flex; flex-direction: column; gap: 8px; }
.fn-footer__col li a { font-size: 13px; opacity: .7; transition: opacity .2s; }
.fn-footer__col li a:hover { opacity: 1; }
.fn-footer__bottom {
  border-top: 1px solid rgba(255,255,255,.08);
  max-width: var(--fn-max-width); margin: 0 auto;
  padding: 16px 24px;
  display: flex; align-items: center; justify-content: space-between;
  font-size: 12px; opacity: .4;
  flex-wrap: wrap; gap: 8px;
}

/* =====================================================
   SINGLE POST
   ===================================================== */
.fn-single { padding: 32px 0 48px; }
.fn-single__layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 28px;
  max-width: 1200px;   /* largura menor que os 1440px do container */
  margin: 0 auto;
}
.fn-single__article { background: var(--fn-card); border-radius: var(--fn-radius-lg); border: 1px solid var(--fn-border); overflow: hidden; }
.fn-single__thumb { aspect-ratio: 16/7; overflow: hidden; }
.fn-single__thumb img { width: 100%; height: 100%; object-fit: cover; }
.fn-single__content { padding: 32px 40px; }
.fn-single__category { margin-bottom: 12px; }
.fn-single__title { font-size: var(--fn-fs-h1, clamp(22px, 3vw, 34px)); font-weight: 800; line-height: 1.2; margin-bottom: 16px; }
.fn-single__meta { display: flex; gap: 16px; align-items: center; font-size: 12px; color: var(--fn-muted); padding-bottom: 20px; margin-bottom: 24px; border-bottom: 1px solid var(--fn-border); flex-wrap: wrap; }
.fn-single__author-avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--fn-primary); color: #fff; font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.fn-single__body { font-size: var(--fn-fs-body, 16px); line-height: 1.8; color: var(--fn-text); }
.fn-single__body p { margin-bottom: 1.25rem; }
.fn-single__body h2 { font-size: var(--fn-fs-h2, 22px); margin: 2rem 0 1rem; }
.fn-single__body h3 { font-size: var(--fn-fs-h3, 18px); margin: 1.5rem 0 .75rem; }
.fn-single__body h4 { font-size: var(--fn-fs-h4, 16px); margin: 1.5rem 0 .5rem; }

/* Blockquote */
.fn-single__body blockquote {
  border-left: 4px solid var(--fn-primary);
  padding: 14px 20px;
  background: var(--fn-bg);
  margin: 1.5rem 0;
  border-radius: 0 var(--fn-radius) var(--fn-radius) 0;
  font-style: italic;
  color: var(--fn-muted);
}
.fn-single__body blockquote p:last-child { margin-bottom: 0; }

/* Listas */
.fn-single__body ul, .fn-single__body ol { margin: 1rem 0 1rem 1.5rem; }
.fn-single__body ul { list-style: disc; }
.fn-single__body ol { list-style: decimal; }
.fn-single__body li { margin-bottom: .4rem; }
.fn-single__body li > ul,
.fn-single__body li > ol { margin-top: .4rem; }

/* Imagens — sempre 100% de largura */
.fn-single__body img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: var(--fn-radius-lg);
  margin: 1.5rem 0;
}
.fn-single__body figure { margin: 1.5rem 0; }
.fn-single__body figure img { margin: 0; }
.fn-single__body figcaption {
  font-size: 13px;
  color: var(--fn-muted);
  text-align: center;
  padding: 8px 0 0;
  font-style: italic;
}

/* Vídeos e iframes — sempre 100% largura com aspect ratio */
.fn-single__body video {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--fn-radius-lg);
  margin: 1.5rem 0;
}
.fn-single__body iframe {
  display: block;
  width: 100%;
  border: none;
  margin: 1.5rem 0;
  border-radius: var(--fn-radius);
}
/* Wrapper responsivo para embeds do WordPress (YouTube, Vimeo, etc) */
.fn-single__body .wp-block-embed,
.fn-single__body .wp-video,
.fn-single__body .video-container {
  position: relative;
  width: 100%;
  margin: 1.5rem 0;
}
.fn-single__body .wp-block-embed__wrapper,
.fn-single__body .embed-responsive {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 */
  height: 0;
  overflow: hidden;
  border-radius: var(--fn-radius-lg);
}
.fn-single__body .wp-block-embed__wrapper iframe,
.fn-single__body .embed-responsive iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border: none;
  border-radius: var(--fn-radius-lg);
  margin: 0;
}

/* Tabelas */
.fn-single__body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 14px;
  overflow-x: auto;
  display: block; /* permite scroll horizontal em mobile */
}
.fn-single__body table thead { background: var(--fn-secondary); color: #fff; }
.fn-single__body table th {
  padding: 10px 14px;
  text-align: left;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  border: 1px solid rgba(255,255,255,.1);
}
.fn-single__body table td {
  padding: 10px 14px;
  border: 1px solid var(--fn-border);
  vertical-align: top;
  line-height: 1.5;
}
.fn-single__body table tbody tr:nth-child(even) { background: var(--fn-bg); }
.fn-single__body table tbody tr:hover { background: rgba(0,0,0,.02); }

/* Código */
.fn-single__body code {
  font-family: 'Courier New', Courier, monospace;
  font-size: .875em;
  background: var(--fn-bg);
  border: 1px solid var(--fn-border);
  border-radius: 4px;
  padding: 2px 6px;
  color: var(--fn-primary);
}
.fn-single__body pre {
  background: var(--fn-secondary);
  border-radius: var(--fn-radius-lg);
  padding: 20px;
  overflow-x: auto;
  margin: 1.5rem 0;
  line-height: 1.6;
}
.fn-single__body pre code {
  background: none;
  border: none;
  padding: 0;
  color: #e2e8f0;
  font-size: 14px;
}

/* Separador */
.fn-single__body hr {
  border: none;
  border-top: 2px solid var(--fn-border);
  margin: 2rem 0;
}

/* WordPress Gutenberg blocks */
.fn-single__body .wp-block-image { margin: 1.5rem 0; }
.fn-single__body .wp-block-image img { margin: 0; }
.fn-single__body .wp-block-image.aligncenter { text-align: center; }
.fn-single__body .wp-block-image.alignleft { float: left; margin-right: 1.5rem; max-width: 50%; }
.fn-single__body .wp-block-image.alignright { float: right; margin-left: 1.5rem; max-width: 50%; }
.fn-single__body .alignwide { margin-left: -40px; margin-right: -40px; width: calc(100% + 80px); max-width: none; }
.fn-single__body .alignfull { margin-left: calc(50% - 50vw); width: 100vw; max-width: 100vw; }
.fn-single__body .wp-block-quote { margin: 1.5rem 0; }
.fn-single__body .wp-block-pullquote { border-top: 3px solid var(--fn-primary); border-bottom: 3px solid var(--fn-primary); padding: 1.5rem; text-align: center; margin: 2rem 0; }
.fn-single__body .wp-block-pullquote blockquote { border: none; background: none; padding: 0; margin: 0; }
.fn-single__body .wp-block-separator { border: none; border-top: 2px solid var(--fn-border); margin: 2rem 0; }

/* Clearfix para imagens float */
.fn-single__body::after { content: ''; display: table; clear: both; }

/* =====================================================
   PAGINATION
   ===================================================== */
.fn-pagination {
  display: flex;
  flex-direction: row;   /* força horizontal */
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 20px 0;
  list-style: none;      /* caso WP gere <ul> */
}
/* Quando paginate_links gera <ul><li> */
.fn-pagination ul {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
  list-style: none;
  margin: 0; padding: 0;
}
.fn-pagination ul li { display: flex; }

/* Todos os elementos de paginação */
.fn-pagination a,
.fn-pagination span,
.fn-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px; height: 36px;
  padding: 0 6px;
  border-radius: var(--fn-radius);
  font-size: 13px; font-weight: 600;
  border: 1px solid var(--fn-border);
  background: var(--fn-card);
  color: var(--fn-muted);
  text-decoration: none;
  transition: border-color .2s, color .2s, background .2s;
  white-space: nowrap;
}
.fn-pagination a:hover,
.fn-pagination .page-numbers:not(.current):not(.dots):hover {
  border-color: var(--fn-primary);
  color: var(--fn-primary);
}
.fn-pagination .current,
.fn-pagination span.current {
  background: var(--fn-primary);
  color: #fff;
  border-color: var(--fn-primary);
}
.fn-pagination .dots {
  border: none;
  background: none;
  color: var(--fn-muted);
}

/* =====================================================
   RESPONSIVO — BREAKPOINTS COMPLETOS
   Desktop-first: 1440 → 1200 → 1024 → 900 → 768 → 480 → 360
   ===================================================== */

/* ── 1200px: Esconde sidebar do hero, hero 2 colunas ── */
@media (max-width: 1200px) {
  .fn-hero__grid {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 280px 240px;
    gap: 12px;
  }
  .fn-hero__sidebar { display: none; }
  .fn-hero-card--main      { grid-column: 1; grid-row: 1 / 3; }
  .fn-hero-card--secondary { grid-column: 2; grid-row: 1; }
  .fn-hero-card--tertiary  { grid-column: 2; grid-row: 2; }
}

/* ── 1024px: Tablet paisagem ── */
@media (max-width: 1024px) {
  .fn-hero__grid {
    grid-template-rows: 240px 200px;
  }
  .fn-hero-card--main .fn-hero-card__title { font-size: max(var(--fn-fs-hero-main, 24px), 18px); }
  .fn-grid-3 { grid-template-columns: repeat(2, 1fr); }
  .fn-grid-featured { grid-template-columns: 1.5fr 1fr; }
  .fn-page-layout { gap: 20px; }
  .fn-aside { width: 260px; }
}

/* ── 900px: Tablet retrato ── */
@media (max-width: 900px) {
  /* Layout geral */
  .fn-page-layout    { grid-template-columns: 1fr; }
  .fn-single__layout { grid-template-columns: 1fr; }

  /* Aside vira grid de 2 cols */
  .fn-aside {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    align-items: start;
  }
  .fn-newsletter-widget { grid-column: span 2; }
  .fn-widget:first-child { grid-column: span 2; }

  /* Footer 2 colunas */
  .fn-footer__main {
    grid-template-columns: 1fr 1fr;
    gap: 28px 32px;
    padding: 36px 24px 24px;
  }
  .fn-footer__brand { grid-column: span 2; }
  .fn-footer__cols-grid {
    display: contents; /* mantém filhos no grid principal */
  }

  /* Topbar simplificada */
  .fn-topbar__social { display: none; }
}

/* ── 768px: Mobile paisagem / tablet pequeno ── */
@media (max-width: 768px) {
  /* Topbar */
  .fn-topbar__regions { display: none; }
  .fn-topbar__inner   { justify-content: space-between; }
  .fn-topbar__date    { font-size: 11px; }

  /* Container lateral padding para leitura confortável */
  .container { padding: 0 16px; }

  /* Header */
  .fn-header { position: sticky; top: 0; }
  .fn-header__inner { height: 56px; padding: 0 16px; gap: 12px; }
  .fn-logo { font-size: 20px; }
  .fn-logo__icon { width: 30px; height: 30px; font-size: 15px; border-radius: 6px; }

  /* Nav — dropdown mobile */
  .fn-nav { display: none; }
  .fn-nav.is-open {
    display: flex;
    position: absolute;
    top: 56px; left: 0; right: 0;
    background: var(--fn-card);
    border-bottom: 1px solid var(--fn-border);
    padding: 8px 16px 16px;
    flex-direction: column;
    z-index: 199;
    box-shadow: var(--fn-shadow-md);
    max-height: 70vh;
    overflow-y: auto;
  }
  .fn-nav__list     { flex-direction: column; width: 100%; }
  .fn-nav__link     { padding: 10px 12px; font-size: 14px; border-bottom: 1px solid var(--fn-border); }
  .fn-nav__link:last-child { border-bottom: none; }
  .fn-menu-toggle   { display: flex; align-items: center; justify-content: center; }

  /* Esconde botão assinar no mobile para dar espaço */
  .fn-btn-subscribe { display: none; }
  .fn-search-toggle { min-width: unset; padding: 7px 10px; }
  .fn-search-toggle span:not(.fn-sr-only) { display: none; } /* Esconde texto, mantém ícone */

  /* Breaking bar */
  .fn-breaking__label { font-size: 10px; padding: 0 10px; }
  .fn-breaking__ticker { font-size: 11px; }

  /* Hero — coluna única */
  .fn-hero { padding: 14px 0 12px; }
  .fn-hero__grid {
    grid-template-columns: 1fr;
    grid-template-rows: 260px 180px 160px;
    min-height: unset;
    gap: 10px;
  }
  .fn-hero-card--main      { grid-column: 1; grid-row: 1; }
  .fn-hero-card--secondary { grid-column: 1; grid-row: 2; }
  .fn-hero-card--tertiary  { grid-column: 1; grid-row: 3; }
  .fn-hero-card--main .fn-hero-card__body      { padding: 16px; }
  .fn-hero-card--main .fn-hero-card__title     { font-size: max(var(--fn-fs-hero-main, 17px), 16px); }
  .fn-hero-card--secondary .fn-hero-card__body  { padding: 12px; }
  .fn-hero-card--secondary .fn-hero-card__title { font-size: max(var(--fn-fs-hero-sec, 14px), 13px); }
  .fn-hero-card--tertiary .fn-hero-card__body   { padding: 10px; }
  .fn-hero-card--tertiary .fn-hero-card__title  { font-size: max(var(--fn-fs-hero-sec, 13px), 12px); }
  .fn-hero-card__meta { font-size: 10px; gap: 6px; }

  /* Grids */
  .fn-grid-3        { grid-template-columns: 1fr 1fr; gap: 12px; }
  .fn-grid-2        { grid-template-columns: 1fr; gap: 12px; }
  .fn-grid-featured { grid-template-columns: 1fr; gap: 12px; }

  /* Cards */
  .fn-card__title   { font-size: max(var(--fn-fs-card, 13px), 13px); }
  .fn-card__excerpt { display: none; }
  .fn-card__body    { padding: 10px 12px; }
  .fn-card-big__body  { padding: 14px; }
  .fn-card-big__title { font-size: max(var(--fn-fs-h4, 15px), 14px); }
  .fn-card-h__img   { width: 90px; }
  .fn-card-h__title { font-size: max(var(--fn-fs-card, 12px), 12px); }
  .fn-card-h__body  { padding: 8px 10px; }

  /* Seção header */
  .fn-section__title  { font-size: 15px; }
  .fn-section__see-all { font-size: 11px; }
  .fn-section         { margin-bottom: 24px; }

  /* Aside em mobile: 1 coluna */
  .fn-aside             { grid-template-columns: 1fr; }
  .fn-newsletter-widget { grid-column: auto; }
  .fn-widget:first-child { grid-column: auto; }

  /* Regions tabs scroll horizontal */
  .fn-regions__tabs { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 4px; -webkit-overflow-scrolling: touch; }
  .fn-region-tab    { white-space: nowrap; flex-shrink: 0; font-size: 11px; padding: 5px 12px; }

  /* Single post */
  .fn-single         { padding: 16px 0 40px; }
  .fn-single__layout { gap: 0; }
  .fn-single__content { padding: 20px 20px 28px; }
  .fn-single__title   { font-size: max(var(--fn-fs-h1, 22px), 20px); }
  .fn-single__body    { font-size: max(var(--fn-fs-body, 15px), 14px); }
  .fn-single__meta    { gap: 8px; font-size: 11px; }
  /* Archive/page padding */
  .fn-page-layout     { padding: 20px 0 40px; }

  /* Footer mobile — coluna única, compacto */
  .fn-footer__main {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 28px 16px 20px;
  }
  .fn-footer__brand     { grid-column: auto; }
  .fn-footer__desc      { font-size: 12px; }
  .fn-footer__col-title { margin-bottom: 10px; }
  .fn-footer__col ul    { gap: 6px; }
  .fn-footer__col li a  { font-size: 13px; }
  /* Colunas de links ficam em 2 colunas dentro da coluna única do grid */
  .fn-footer__cols-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }
  .fn-footer__bottom {
    flex-direction: column;
    text-align: center;
    gap: 4px;
    padding: 14px 16px;
    font-size: 11px;
  }

  /* Newsletter widget */
  .fn-newsletter-widget { padding: 16px; }
  .fn-newsletter-widget__title { font-size: 14px; }

  /* Search overlay */
  .fn-search-box { margin: 0 12px; padding: 16px; }
  .fn-search-box form { flex-direction: column; }
  .fn-search-box button[type=submit] { width: 100%; padding: 10px; }
}

/* ── 480px: Mobile portrait ── */
@media (max-width: 480px) {
  .container { padding: 0 12px; }

  /* Header ainda mais compacto */
  .fn-header__inner { height: 52px; padding: 0 12px; }
  .fn-logo { font-size: 18px; }

  /* Hero: tamanhos menores */
  .fn-hero { padding: 12px 0 10px; }
  .fn-hero__grid {
    grid-template-rows: 220px 150px 130px;
    gap: 8px;
  }
  .fn-hero-card--main .fn-hero-card__title      { font-size: max(var(--fn-fs-hero-main, 16px), 15px); }
  .fn-hero-card--main .fn-hero-card__body        { padding: 12px; }
  .fn-hero-card--secondary .fn-hero-card__title  { font-size: max(var(--fn-fs-hero-sec, 13px), 12px); }
  .fn-hero-card__meta { display: none; }

  /* Grids */
  .fn-grid-3 { grid-template-columns: 1fr; gap: 10px; }

  .fn-card__body    { padding: 10px; }
  .fn-card__title   { font-size: max(var(--fn-fs-card, 13px), 12px); -webkit-line-clamp: 3; }
  .fn-card__footer  { font-size: 10px; }
  .fn-card__avatar  { width: 18px; height: 18px; font-size: 8px; }

  /* Cards horizontais */
  .fn-card-h__img   { width: 80px; }
  .fn-card-h__body  { padding: 8px; }
  .fn-card-h__title { font-size: max(var(--fn-fs-card, 12px), 11px); -webkit-line-clamp: 3; }

  /* Badge menor */
  .fn-badge { font-size: 9px; padding: 2px 7px; }

  /* Section */
  .fn-section       { margin-bottom: 20px; }
  .fn-section__header { margin-bottom: 12px; }
  .fn-section__title { font-size: 14px; }
  .fn-section__title-bar { width: 3px; height: 16px; }

  /* Regiões */
  .fn-region-tab { font-size: 10px; padding: 4px 10px; }

  /* Breaking bar */
  .fn-breaking { height: 30px; }
  .fn-breaking__label { padding: 0 8px; font-size: 9px; }

  /* Single */
  .fn-single         { padding: 12px 0 32px; }
  .fn-single__content { padding: 16px 16px 24px; }
  .fn-single__title  { font-size: max(var(--fn-fs-h1, 19px), 18px); }
  .fn-page-layout    { padding: 16px 0 32px; }

  /* Pagination */
  .fn-pagination a,
  .fn-pagination span,
  .fn-pagination .page-numbers {
    min-width: 32px; height: 32px; font-size: 12px; padding: 0 5px;
  }

  /* Footer */
  .fn-footer__bottom { font-size: 11px; padding: 12px 16px; }
  .fn-footer__cols-grid { grid-template-columns: 1fr; gap: 16px; }
  .fn-tags  { gap: 5px; }
  .fn-tag   { font-size: 10px; padding: 3px 8px; }
}

/* ── 360px: Mobile muito pequeno ── */
@media (max-width: 360px) {
  .container { padding: 0 10px; }
  .fn-logo { font-size: 16px; gap: 6px; }
  .fn-logo__icon { width: 26px; height: 26px; font-size: 13px; }
  .fn-hero__grid {
    grid-template-rows: 190px 130px 110px;
  }
  .fn-hero-card--main .fn-hero-card__title { font-size: max(var(--fn-fs-hero-main, 14px), 14px); }
  .fn-card__title { font-size: max(var(--fn-fs-card, 12px), 12px); }
  .fn-card-h__img { width: 70px; }
  .fn-single__title { font-size: max(var(--fn-fs-h1, 17px), 17px); }
}

/* =====================================================
   ADMIN BAR OFFSET
   ===================================================== */
.admin-bar .fn-header { top: 32px; }
@media (max-width: 782px) {
  .admin-bar .fn-header { top: 46px; }
  .fn-nav.is-open { top: 102px; } /* 56px header + 46px admin bar */
}

/* =====================================================
   TOUCH / HOVER
   ===================================================== */
@media (hover: none) {
  /* Em touch devices, remover hover effects que podem ficar "presos" */
  .fn-card:hover          { box-shadow: none; transform: none; }
  .fn-card-h:hover        { box-shadow: none; }
  .fn-card-big:hover      { box-shadow: none; }
  .fn-hero-card:hover img { transform: none; }
  .fn-card:hover .fn-card__img img { transform: none; }
}

/* =====================================================
   SCROLL SMOOTH / OVERSCROLL
   ===================================================== */
@media (max-width: 768px) {
  .fn-regions__tabs { scroll-snap-type: x mandatory; }
  .fn-region-tab    { scroll-snap-align: start; }
  .fn-hero__sidebar-list { -webkit-overflow-scrolling: touch; }
}

/* =====================================================
   PRINT
   ===================================================== */
@media print {
  .fn-topbar, .fn-header, .fn-breaking, .fn-aside, .fn-footer,
  .fn-newsletter-widget, .fn-ad, .fn-social-follow,
  .fn-regions__tabs, .fn-pagination { display: none !important; }
  .fn-page-layout   { grid-template-columns: 1fr; }
  .fn-single__layout { grid-template-columns: 1fr; }
  .fn-card { break-inside: avoid; }
  body { font-size: 12pt; color: #000; }
  a    { color: #000; }
  .fn-hero-card { color: #000 !important; }
}
