/*
Theme Name: Pub Master
Theme URI: https://github.com/legacy-tech/legacy-theme
Author: Por: Sergio Felix e Maicon Maciel
Author URI: https://legacytech.com.br
Description: Tema otimizado para Publicacao de conteudo. Mobile-first, performance extrema, setup de instalacao, contem 3 layouts e personalizacao Rest Api.
Version: 1.2.0
Requires at least: 6.0
Tested up to: 6.4
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: temas
Tags: blog, news, custom-colors, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready

Pub Master WordPress Theme - Por: Sergio Felix e Maicon Maciel
Otimizado para LCP < 1s, CLS zero, mobile-first (95% trafego mobile)
*/

/* ==========================================================================
   CSS Custom Properties (Design Tokens)
   Sincronizado com astro-theme/src/assets/styles/global.css
   ========================================================================== */

:root {
  /* Cores primárias */
  --color-primary: #1a237e;
  --color-primary-rgb: 26, 35, 126;
  --color-secondary: #3949ab;
  --color-accent: #c9461e;
  --color-cta: #2e7d32;
  --color-cta-hover: #1b5e20;

  /* Cores de superfície */
  --color-bg: #f8f9fa;
  --color-surface: #ffffff;
  --color-text: #212121;
  --color-muted: #525a67;
  --color-border: #e5e7eb;

  /* Cores CTA e links */
  --color-cta-large: #40ce5e;
  --color-cta-large-hover: #50b24a;
  --color-link: #1863DC;

  /* Fontes */
  --font-heading: 'PT Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-body: 'PT Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Espaçamentos */
  --header-height: 72px;
  --content-max-width: 880px;
  --article-max-width: 768px;
}

/* ==========================================================================
   Reset e Base
   ========================================================================== */

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

html {
  scroll-behavior: smooth;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background-color: var(--color-bg);
  line-height: 1.6;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  margin-top: 0;
}

a {
  color: var(--color-link);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ==========================================================================
   Layout Utilities
   ========================================================================== */

.min-h-screen {
  min-height: 100vh;
}

.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

.flex-1 {
  flex: 1 1 0%;
}

.items-center {
  align-items: center;
}

.justify-center {
  justify-content: center;
}

.justify-between {
  justify-content: space-between;
}

.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-5 { gap: 1.25rem; }
.gap-8 { gap: 2rem; }

.mx-auto {
  margin-left: auto;
  margin-right: auto;
}

.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-5 { padding-left: 1.25rem; padding-right: 1.25rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-6 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }
.py-10 { padding-top: 2.5rem; padding-bottom: 2.5rem; }

.my-6 { margin-top: 1.5rem; margin-bottom: 1.5rem; }
.my-8 { margin-top: 2rem; margin-bottom: 2rem; }
.my-10 { margin-top: 2.5rem; margin-bottom: 2.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-10 { margin-top: 2.5rem; }

.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }

.w-full { width: 100%; }

.max-w-3xl { max-width: 48rem; }
.max-w-6xl { max-width: 72rem; }

/* ==========================================================================
   Colors
   ========================================================================== */

.bg-bg { background-color: var(--color-bg); }
.bg-surface { background-color: var(--color-surface); }
.bg-primary { background-color: var(--color-primary); }
.bg-accent { background-color: var(--color-accent); }
.bg-cta { background-color: var(--color-cta); }

.text-text { color: var(--color-text); }
.text-muted { color: var(--color-muted); }
.text-primary { color: var(--color-primary); }
.text-secondary { color: var(--color-secondary); }
.text-white { color: #ffffff; }

.border-border { border-color: var(--color-border); }

/* ==========================================================================
   Typography
   ========================================================================== */

.font-heading { font-family: var(--font-heading); }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }

.text-xs { font-size: 0.75rem; line-height: 1rem; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-base { font-size: 1rem; line-height: 1.5rem; }
.text-lg { font-size: 1.125rem; line-height: 1.75rem; }
.text-xl { font-size: 1.25rem; line-height: 1.75rem; }
.text-2xl { font-size: 1.5rem; line-height: 2rem; }
.text-3xl { font-size: 1.875rem; line-height: 2.25rem; }

.uppercase { text-transform: uppercase; }
.tracking-wide { letter-spacing: 0.025em; }
.tracking-wider { letter-spacing: 0.05em; }
.tracking-widest { letter-spacing: 0.1em; }

.leading-tight { line-height: 1.25; }
.leading-relaxed { line-height: 1.625; }

.text-center { text-align: center; }
.text-left { text-align: left; }

.no-underline { text-decoration: none; }
.underline { text-decoration: underline; }

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ==========================================================================
   Components
   ========================================================================== */

.rounded { border-radius: 0.25rem; }
.rounded-lg { border-radius: 0.5rem; }
.rounded-xl { border-radius: 0.75rem; }
.rounded-2xl { border-radius: 1rem; }
.rounded-full { border-radius: 9999px; }

.shadow-sm { box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05); }
.shadow-md { box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1); }
.shadow-lg { box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1); }
.shadow-2xl { box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.25); }

.border { border-width: 1px; border-style: solid; }
.border-t { border-top-width: 1px; border-top-style: solid; }

.overflow-hidden { overflow: hidden; }
.overflow-y-auto { overflow-y: auto; }

.object-cover { object-fit: cover; }

.aspect-video { aspect-ratio: 16 / 9; }

.transition-all { transition-property: all; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms; }
.transition-colors { transition-property: color, background-color, border-color; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms; }
.transition-shadow { transition-property: box-shadow; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms; }
.transition-transform { transition-property: transform; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms; }

.duration-200 { transition-duration: 200ms; }
.duration-300 { transition-duration: 300ms; }

/* ==========================================================================
   Grid
   ========================================================================== */

.grid {
  display: grid;
}

.grid-cols-1 {
  grid-template-columns: repeat(1, minmax(0, 1fr));
}

@media (min-width: 640px) {
  .sm\:grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .sm\:px-4 {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  .sm\:text-3xl {
    font-size: 1.875rem;
    line-height: 2.25rem;
  }
  .sm\:flex-row {
    flex-direction: row;
  }
  .sm\:items-start {
    align-items: flex-start;
  }
  .sm\:text-left {
    text-align: left;
  }
}

@media (min-width: 768px) {
  .md\:grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .md\:grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .md\:flex {
    display: flex;
  }
  .md\:hidden {
    display: none;
  }
  .md\:h-full {
    height: 100%;
  }
  .md\:min-h-\[300px\] {
    min-height: 300px;
  }
  .md\:p-8 {
    padding: 2rem;
  }
  .md\:text-2xl {
    font-size: 1.5rem;
    line-height: 2rem;
  }
  .md\:text-base {
    font-size: 1rem;
    line-height: 1.5rem;
  }
}

@media (min-width: 1024px) {
  .lg\:grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* ==========================================================================
   Header
   ========================================================================== */

.site-header-wrapper {
  position: static !important;
  width: 100%;
  z-index: 50;
  display: flex;
  justify-content: center;
  padding: 8px 0.75rem 0;
  margin-bottom: 0;
  background: var(--color-primary);
}

@media (min-width: 640px) {
  .site-header-wrapper {
    padding: 8px 1rem 0;
  }
}

/* Front page: site-main needs light background for content sections */
.home .site-main,
.front-page .site-main,
body.home #primary {
  background: #f8f9fa !important;
}

.site-header {
  width: 100%;
  max-width: var(--content-max-width);
  border-radius: 1rem;
  height: 56px;
  display: flex;
  align-items: center;
  padding: 0 1rem;
  background: var(--color-primary);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

@media (min-width: 640px) {
  .site-header {
    padding: 0 1.25rem;
  }
}

.site-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  z-index: 3;
  margin-right: 0.75rem;
  text-decoration: none;
}

.site-logo .logo-text {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.025em;
}

.site-logo .logo-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #f8673e;
  margin-left: 2px;
  margin-bottom: 10px;
}

.site-logo img,
.site-logo svg {
  max-height: 64px;
  width: auto;
}

/* Desktop Navigation */
.main-navigation {
  display: none;
}

@media (min-width: 768px) {
  .main-navigation {
    display: flex;
    align-items: center;
  }
}

.main-navigation ul {
  display: flex;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 0.25rem;
  white-space: nowrap;
}

.main-navigation li {
  margin: 0;
}

.main-navigation a {
  position: relative;
  font-size: 13px;
  font-weight: 700;
  padding: 0.75rem 1rem;
  min-height: 44px;
  display: flex;
  align-items: center;
  border-radius: 0.5rem;
  text-decoration: none;
  color: #fff;
}

.main-navigation a:hover {
  background-color: rgba(255, 255, 255, 0.1);
  text-decoration: none;
}

.main-navigation .current-menu-item a,
.main-navigation .current_page_item a,
.main-navigation .current-menu-ancestor a {
  background-color: rgba(255, 255, 255, 0.2);
  color: #fff;
}

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  z-index: 3;
  margin-left: 0.75rem;
}

/* Menu Toggle (Mobile) - 44x44px touch target */
.menu-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  min-width: 44px;
  min-height: 44px;
  background: transparent;
  border: none;
  outline: none;
  cursor: pointer;
  margin-left: 0.25rem;
  padding: 0;
}

@media (min-width: 768px) {
  .menu-toggle {
    display: none;
  }
}

.menu-toggle .bar {
  position: absolute;
  display: block;
  height: 2px;
  width: 22px;
  background: #fff;
  border-radius: 9999px;
}

.menu-toggle .bar:nth-child(1) { top: 13px; }
.menu-toggle .bar:nth-child(2) { top: 20px; width: 15px; }
.menu-toggle .bar:nth-child(3) { top: 20px; opacity: 0; }
.menu-toggle .bar:nth-child(4) { top: 27px; width: 19px; }

.menu-toggle.active .bar:nth-child(1) {
  top: 20px;
  transform: rotate(45deg);
}

.menu-toggle.active .bar:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active .bar:nth-child(3) {
  opacity: 1;
  transform: rotate(-45deg);
}

.menu-toggle.active .bar:nth-child(4) {
  opacity: 0;
}

/* ==========================================================================
   Mobile Menu
   ========================================================================== */

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 40;
  transition: all 0.3s ease-in-out;
  opacity: 0;
  pointer-events: none;
}

@media (min-width: 768px) {
  .mobile-menu {
    display: none !important;
  }
}

.mobile-menu.active {
  opacity: 1;
  pointer-events: auto;
}

.mobile-menu-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(2px);
  transition: opacity 0.3s;
  opacity: 0;
}

.mobile-menu.active .mobile-menu-overlay {
  opacity: 1;
}

.mobile-menu-panel {
  position: absolute;
  top: 0;
  left: 0;
  width: 280px;
  height: 100%;
  background: #fff;
  overflow-y: auto;
  transition: transform 0.3s ease-in-out;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  transform: translateX(-100%);
}

.mobile-menu.active .mobile-menu-panel {
  transform: translateX(0);
}

.mobile-menu-header {
  display: flex;
  align-items: center;
  height: 56px;
  padding: 0 1.25rem;
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
}

.mobile-menu-header .logo-text {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 700;
  color: var(--color-primary);
  letter-spacing: -0.025em;
}

.mobile-menu-header .logo-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #f8673e;
  margin-left: 2px;
  margin-bottom: 8px;
}

.mobile-menu-divider {
  height: 1px;
  background-color: #e5e7eb;
  margin: 0 1.25rem;
}

.mobile-menu ul {
  display: flex;
  flex-direction: column;
  list-style: none;
  padding: 0;
  margin: 0.5rem 0.75rem;
}

.mobile-menu li {
  margin: 0;
}

.mobile-menu a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  min-height: 44px;
  border-radius: 0.75rem;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  color: #344054;
  transition: all 0.2s;
}

.mobile-menu a:hover {
  background-color: #f3f4f6;
  text-decoration: none;
}

.mobile-menu .current-menu-item a,
.mobile-menu .current_page_item a {
  color: var(--color-primary);
  background-color: rgba(var(--color-primary-rgb), 0.06);
}

.mobile-menu .current-menu-item a::after,
.mobile-menu .current_page_item a::after {
  content: '';
  margin-left: auto;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #f8673e;
}

.mobile-menu-footer {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1.25rem;
}

.mobile-menu-footer p {
  font-size: 11px;
  color: #98a2b3;
  line-height: 1.625;
  margin: 0;
}

/* ==========================================================================
   Main Content
   ========================================================================== */

.site-main {
  flex: 1;
  padding-top: 0;
}

.content-wrapper {
  max-width: var(--content-max-width);
  margin: 0 auto;
  padding: 0 1rem;
}

/* ==========================================================================
   Featured Article
   ========================================================================== */

.featured-article-section {
  max-width: 72rem;
  margin: 0 auto;
  padding: 2.5rem 1rem;
}

.featured-article-section h2 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 1.5rem;
}

.featured-article {
  display: block;
  background: var(--color-surface);
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  transition: box-shadow 0.15s;
  text-decoration: none;
}

.featured-article:hover {
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  text-decoration: none;
}

.featured-article-grid {
  display: grid;
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .featured-article-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.featured-article-image {
  width: 100%;
  height: 192px;
  min-height: 192px;
  position: relative;
  overflow: hidden;
  background-color: #e5e7eb;
}

@media (min-width: 768px) {
  .featured-article-image {
    height: 100%;
    min-height: 300px;
  }
}

.featured-article-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.featured-article-content {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

@media (min-width: 768px) {
  .featured-article-content {
    padding: 2rem;
  }
}

.featured-article .category-badge {
  display: inline-block;
  background-color: var(--color-accent);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.025em;
  padding: 0.125rem 0.625rem;
  border-radius: 0.25rem;
  margin-bottom: 0.75rem;
  width: fit-content;
}

.featured-article h3 {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--color-primary);
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
  transition: color 0.15s;
}

@media (min-width: 768px) {
  .featured-article h3 {
    font-size: 1.5rem;
  }
}

.featured-article:hover h3 {
  color: var(--color-secondary);
}

.featured-article .excerpt {
  color: var(--color-muted);
  font-size: 0.875rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 1rem;
}

@media (min-width: 768px) {
  .featured-article .excerpt {
    font-size: 1rem;
  }
}

.featured-article .meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.75rem;
  color: var(--color-muted);
  margin-bottom: 1rem;
}

.featured-article .read-more {
  display: inline-flex;
  align-items: center;
  color: var(--color-secondary);
  font-weight: 600;
  font-size: 0.875rem;
  gap: 0.25rem;
  transition: gap 0.15s;
}

.featured-article:hover .read-more {
  gap: 0.5rem;
}

.featured-article .read-more svg {
  width: 1rem;
  height: 1rem;
}

/* ==========================================================================
   Article Card
   ========================================================================== */

.article-card {
  display: block;
  background: var(--color-surface);
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  transition: box-shadow 0.15s;
  text-decoration: none;
}

.article-card:hover {
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  text-decoration: none;
}

.article-card-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  background-color: rgba(229, 231, 235, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.article-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.article-card-image svg {
  width: 2.5rem;
  height: 2.5rem;
  color: rgba(107, 114, 128, 0.3);
}

.article-card-content {
  padding: 1rem;
}

.article-card .category {
  color: var(--color-accent);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.article-card h3 {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--color-primary);
  font-size: 1rem;
  margin: 0.25rem 0 0.5rem;
  transition: color 0.15s;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-card:hover h3 {
  color: var(--color-secondary);
}

.article-card .excerpt {
  color: var(--color-muted);
  font-size: 0.875rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0;
}

.article-card .date {
  color: var(--color-muted);
  font-size: 0.75rem;
  margin-top: 0.75rem;
  display: block;
}

/* Articles Grid */
.articles-section {
  max-width: 72rem;
  margin: 0 auto;
  padding: 2.5rem 1rem;
}

.articles-section h2 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 1.5rem;
}

.articles-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

@media (min-width: 640px) {
  .articles-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .articles-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.view-all-link {
  text-align: center;
  margin-top: 2rem;
}

.view-all-link a {
  display: inline-flex;
  align-items: center;
  color: var(--color-secondary);
  font-weight: 600;
  transition: color 0.15s;
}

.view-all-link a:hover {
  color: var(--color-primary);
  text-decoration: none;
}

.view-all-link svg {
  width: 1rem;
  height: 1rem;
  margin-left: 0.25rem;
}

/* ==========================================================================
   Single Article
   ========================================================================== */

.single-article {
  max-width: var(--article-max-width);
  margin: 0 auto;
  padding: 2rem 1rem;
}

.single-article header {
  margin-bottom: 1.5rem;
}

.single-article .category-badge {
  display: inline-block;
  background-color: var(--color-accent);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.single-article h1 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.25;
  margin-bottom: 0.75rem;
}

@media (min-width: 640px) {
  .single-article h1 {
    font-size: 1.875rem;
  }
}

.single-article .article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.5rem;
  color: var(--color-muted);
  font-size: 0.875rem;
}

.single-article .article-meta strong {
  color: var(--color-text);
}

.single-article .featured-image {
  width: 100%;
  border-radius: 0.5rem;
  margin-bottom: 1.5rem;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

/* Article Content (Prose) */
.article-content {
  contain: layout style;
}

.article-content h2 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.article-content h3 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-primary);
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.article-content p {
  margin-bottom: 1rem;
  line-height: 24px;
  font-size: 1rem;
}

.article-content ul,
.article-content ol {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

.article-content ul {
  list-style-type: disc;
}

.article-content ol {
  list-style-type: decimal;
}

.article-content li {
  margin-bottom: 0.25rem;
}

.article-content a {
  color: var(--color-link);
  text-decoration: underline;
}

.article-content a:hover {
  text-decoration: underline;
}

.article-content strong {
  font-weight: 600;
}

.article-content blockquote {
  border-left: 4px solid var(--color-accent);
  padding-left: 1rem;
  margin: 1.5rem 0;
  color: var(--color-muted);
  font-style: italic;
}

/* Tables */
.article-content .table-wrapper {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 1.5rem 0;
}

.article-content table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  line-height: 1.5;
  margin: 1.5rem 0;
}

.article-content thead {
  background-color: var(--color-primary);
  color: #fff;
}

.article-content thead th {
  padding: 0.75rem 1rem;
  font-weight: 600;
  text-align: left;
  white-space: nowrap;
}

.article-content tbody tr {
  border-bottom: 1px solid var(--color-border);
}

.article-content tbody tr:nth-child(even) {
  background-color: rgba(0, 0, 0, 0.02);
}

.article-content tbody td {
  padding: 0.75rem 1rem;
  vertical-align: top;
}

.article-content tbody tr:hover {
  background-color: rgba(0, 0, 0, 0.04);
}

/* ==========================================================================
   CTA Buttons
   ========================================================================== */

.cta-button {
  display: block;
  width: 100%;
  text-align: center;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  border-radius: 5px;
  padding: 20px 30px;
  font-size: 25px;
  transition: all 0.2s;
  cursor: pointer;
  background-color: var(--color-cta);
}

.cta-button:hover {
  background-color: var(--color-cta-hover) !important;
  box-shadow: 0 0 10px var(--color-cta-glow, rgba(0, 128, 0, 0.5));
  text-decoration: none;
  color: #fff;
}

.cta-button:focus {
  outline: 2px solid var(--color-cta);
  outline-offset: 2px;
}

.cta-button--accent {
  background-color: var(--color-cta-large);
  border: 2px solid var(--color-cta-large);
  box-shadow: 0 0 2px #333;
  font-family: Georgia, serif;
  border-radius: 6px;
  padding: 20px 0;
  font-size: 27px;
}

@media (min-width: 640px) {
  .cta-button--accent {
    font-size: 34px;
  }
}

.cta-button--accent:hover {
  background-color: var(--color-cta-large-hover) !important;
  border-color: var(--color-cta-large-hover) !important;
}

/* ==========================================================================
   CTA Final Card Block
   ========================================================================== */

.wp-block-temas-cta-final-card {
  margin: 2.5rem 0;
}

.cta-final-card {
  background: #fff;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  max-width: 620px;
  margin: 0 auto;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cta-final-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.cta-final-card__header {
  padding: 25px 20px 15px;
  border-bottom: 1px solid #e2e8f0;
}

.cta-final-card__headline {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.3;
}

.cta-final-card__body {
  padding: 20px;
  text-align: center;
}

.cta-final-card__description {
  font-size: 14px;
  color: #64748b;
  line-height: 24px;
  margin: 0 0 20px;
}

.cta-final-card__button {
  display: inline-block;
  padding: 12px 25px;
  font-size: 17px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-decoration: none;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(25, 36, 126, 0.3);
  transition: all 0.3s ease;
}

.cta-final-card__button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(25, 36, 126, 0.4);
  text-decoration: none;
}

@media (max-width: 640px) {
  .cta-final-card__headline {
    font-size: 20px;
  }

  .cta-final-card__button {
    font-size: 15px;
    padding: 10px 20px;
  }
}

/* ==========================================================================
   Styled Table Block
   ========================================================================== */

.wp-block-temas-styled-table {
  margin: 1.5rem 0;
}

.styled-table-scroll {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.styled-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  line-height: 1.5;
  background-color: var(--color-surface);
}

.styled-table caption {
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  color: var(--color-muted);
  text-align: left;
  caption-side: bottom;
  border-top: 1px solid var(--color-border);
}

.styled-table thead {
  background-color: var(--color-table-header-bg, var(--color-primary));
  color: var(--color-table-header-text, #fff);
}

.styled-table thead th {
  padding: 0.75rem 1rem;
  font-weight: 600;
  text-align: left;
  white-space: nowrap;
  border: none;
}

.styled-table tbody tr {
  border-bottom: 1px solid var(--color-table-border, var(--color-border));
  background-color: var(--color-table-row-bg, var(--color-surface));
}

.styled-table tbody td {
  padding: 0.75rem 1rem;
  vertical-align: top;
  border: none;
  color: var(--color-table-cell-text, var(--color-text));
}

.styled-table--zebra tbody tr:nth-child(even) {
  background-color: var(--color-table-row-alt-bg, rgba(0, 0, 0, 0.02));
}

.styled-table--hover tbody tr:hover {
  background-color: var(--color-table-row-hover-bg, rgba(0, 0, 0, 0.04));
}

.styled-table a {
  color: var(--color-link);
  text-decoration: underline;
}

.styled-table a:hover {
  text-decoration: none;
}

/* Responsive Stack Mode for Mobile */
@media (max-width: 767px) {
  .styled-table--responsive {
    border: none;
  }

  .styled-table--responsive thead {
    display: none;
  }

  .styled-table--responsive tbody tr {
    display: block;
    margin-bottom: 1rem;
    border: 1px solid var(--color-table-border, var(--color-border));
    border-radius: 8px;
    overflow: hidden;
    background: var(--color-table-row-bg, var(--color-surface));
  }

  .styled-table--responsive tbody tr:last-child {
    margin-bottom: 0;
  }

  .styled-table--responsive.styled-table--zebra tbody tr:nth-child(even) {
    background: var(--color-table-row-alt-bg, rgba(0, 0, 0, 0.02));
  }

  .styled-table--responsive tbody td {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--color-table-border, var(--color-border));
    text-align: right;
  }

  .styled-table--responsive tbody td:last-child {
    border-bottom: none;
  }

  .styled-table--responsive tbody td::before {
    content: attr(data-label);
    font-weight: 600;
    color: var(--color-table-header-bg, var(--color-primary));
    text-align: left;
    flex-shrink: 0;
    max-width: 45%;
  }

  .styled-table--responsive tbody td:empty::before {
    content: none;
  }
}

/* ==========================================================================
   Author Bio
   ========================================================================== */

.author-bio {
  margin-top: 2.5rem;
  padding: 1.5rem;
  background: var(--color-surface);
  border-radius: 1rem;
  border: 1px solid var(--color-border);
}

.author-bio-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

@media (min-width: 640px) {
  .author-bio-inner {
    flex-direction: row;
    align-items: flex-start;
  }
}

.author-bio-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--color-accent);
  flex-shrink: 0;
}

.author-bio-content {
  text-align: center;
}

@media (min-width: 640px) {
  .author-bio-content {
    text-align: left;
  }
}

.author-bio-label {
  font-size: 0.75rem;
  color: var(--color-muted);
  text-transform: uppercase;
  letter-spacing: 0.025em;
  margin-bottom: 0.25rem;
}

.author-bio-name {
  font-family: var(--font-heading);
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--color-primary);
  margin: 0 0 0.25rem;
}

.author-bio-title {
  font-size: 0.875rem;
  color: var(--color-muted);
  margin: 0 0 0.5rem;
}

.author-bio-description {
  font-size: 0.875rem;
  color: rgba(33, 33, 33, 0.8);
  line-height: 1.625;
  margin: 0 0 0.5rem;
}

.author-bio-credentials {
  font-size: 0.75rem;
  color: var(--color-accent);
  font-weight: 600;
  margin: 0 0 0.5rem;
}

.author-bio-expertise {
  font-size: 0.8125rem;
  color: var(--color-muted);
  margin: 0.5rem 0 0;
}

.author-bio-expertise strong {
  color: var(--color-text);
}

.author-bio-social {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

@media (min-width: 640px) {
  .author-bio-social {
    justify-content: flex-start;
  }
}

.author-bio-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: rgba(0, 0, 0, 0.05);
  color: var(--color-muted);
  transition: all 0.2s;
}

.author-bio-social a:hover {
  background-color: var(--color-primary);
  color: #fff;
  text-decoration: none;
}

/* ==========================================================================
   Related Articles
   ========================================================================== */

.related-articles {
  max-width: 72rem;
  margin: 0 auto;
  padding: 2.5rem 1rem;
}

.related-articles h2 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 1.5rem;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  background-color: var(--color-primary);
  color: rgba(255, 255, 255, 0.8);
  margin-top: auto;
}

.site-footer-inner {
  max-width: var(--content-max-width);
  margin: 0 auto;
  padding: 2.5rem 1.25rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.footer-logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.footer-logo .logo-text {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
}

.footer-logo .logo-dot {
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background-color: #f8673e;
  margin-left: 2px;
  margin-bottom: 8px;
}

.footer-logo-img {
  max-height: 100px;
  width: auto;
}

.footer-disclaimer-row {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.footer-disclaimer-row .footer-logo {
  flex-shrink: 0;
}

.footer-disclaimer-row .footer-description {
  margin-top: 0;
}

.footer-description {
  margin-top: 0.75rem;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.625;
}

.footer-heading {
  font-size: 11px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.7);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
}

.footer-nav {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-nav li {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-nav a {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  transition: color 0.15s;
}

.footer-nav a:hover {
  color: #fff;
  text-decoration: none;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1.5rem;
  text-align: center;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.7);
}

.footer-bottom p {
  margin: 0 0 0.5rem;
}

.footer-bottom .copyright {
  color: rgba(255, 255, 255, 0.8);
}

/* ==========================================================================
   Cookie Consent
   ========================================================================== */

.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: none;
}

.cookie-banner.active {
  display: block;
}

.cookie-banner-inner {
  background-color: var(--color-primary);
  color: #fff;
  padding: 0.75rem 1rem;
  box-shadow: 0 -4px 6px -1px rgb(0 0 0 / 0.1);
}

.cookie-banner-content {
  max-width: 72rem;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

@media (min-width: 640px) {
  .cookie-banner-content {
    flex-direction: row;
  }
}

.cookie-banner-text {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.9);
  text-align: center;
  margin: 0;
}

@media (min-width: 640px) {
  .cookie-banner-text {
    text-align: left;
  }
}

.cookie-banner-text a {
  color: #fff;
  text-decoration: underline;
}

.cookie-banner-text a:hover {
  color: rgba(255, 255, 255, 0.8);
}

.cookie-accept-btn {
  flex-shrink: 0;
  background-color: var(--color-cta-large);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.5rem 1.25rem;
  border-radius: 0.5rem;
  border: none;
  cursor: pointer;
  transition: background-color 0.15s;
}

.cookie-accept-btn:hover {
  background-color: var(--color-cta-large-hover);
}

/* ==========================================================================
   Search Form
   ========================================================================== */

.search-form {
  display: flex;
  max-width: 400px;
  margin: 0 auto;
}

.search-form input[type="search"] {
  flex: 1;
  padding: 0.75rem 1rem;
  border: 1px solid var(--color-border);
  border-right: none;
  border-radius: 0.5rem 0 0 0.5rem;
  font-size: 1rem;
  outline: none;
}

.search-form input[type="search"]:focus {
  border-color: var(--color-secondary);
}

.search-form button {
  padding: 0.75rem 1.5rem;
  background-color: var(--color-primary);
  color: #fff;
  border: none;
  border-radius: 0 0.5rem 0.5rem 0;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s;
}

.search-form button:hover {
  background-color: var(--color-secondary);
}

/* ==========================================================================
   Archive/Category Pages
   ========================================================================== */

.archive-header {
  max-width: 72rem;
  margin: 0 auto;
  padding: 2.5rem 1rem 1rem;
}

.archive-header h1 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-primary);
  margin: 0 0 0.5rem;
}

@media (min-width: 640px) {
  .archive-header h1 {
    font-size: 1.875rem;
  }
}

.archive-header .archive-description {
  color: var(--color-muted);
  font-size: 1rem;
  margin: 0;
}

/* ==========================================================================
   Pagination
   ========================================================================== */

.pagination {
  max-width: 72rem;
  margin: 0 auto;
  padding: 2rem 1rem;
  display: flex;
  justify-content: center;
  gap: 0.5rem;
}

.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 0.75rem;
  border-radius: 0.5rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.15s;
}

.pagination a {
  background-color: var(--color-surface);
  color: var(--color-primary);
  border: 1px solid var(--color-border);
}

.pagination a:hover {
  background-color: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
  text-decoration: none;
}

.pagination .current {
  background-color: var(--color-primary);
  color: #fff;
  border: 1px solid var(--color-primary);
}

/* ==========================================================================
   404 Page
   ========================================================================== */

.error-404 {
  max-width: 32rem;
  margin: 0 auto;
  padding: 4rem 1rem;
  text-align: center;
}

.error-404 h1 {
  font-family: var(--font-heading);
  font-size: 4rem;
  font-weight: 700;
  color: var(--color-primary);
  margin: 0 0 1rem;
}

.error-404 p {
  color: var(--color-muted);
  font-size: 1.125rem;
  margin: 0 0 2rem;
}

.error-404 a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background-color: var(--color-primary);
  color: #fff;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.15s;
}

.error-404 a:hover {
  background-color: var(--color-secondary);
  text-decoration: none;
}

/* ==========================================================================
   WordPress Specific
   ========================================================================== */

/* Screen reader text */
.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
  word-wrap: normal !important;
}

.screen-reader-text:focus {
  background-color: #f1f1f1;
  border-radius: 3px;
  box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
  clip: auto !important;
  clip-path: none;
  color: #21759b;
  display: block;
  font-size: 14px;
  font-weight: bold;
  height: auto;
  left: 5px;
  line-height: normal;
  padding: 15px 23px 14px;
  text-decoration: none;
  top: 5px;
  width: auto;
  z-index: 100000;
}

/* Alignments */
.alignleft {
  float: left;
  margin-right: 1.5rem;
  margin-bottom: 1rem;
}

.alignright {
  float: right;
  margin-left: 1.5rem;
  margin-bottom: 1rem;
}

.aligncenter {
  display: block;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 1rem;
}

/* Captions */
.wp-caption {
  max-width: 100%;
  margin-bottom: 1rem;
}

.wp-caption img {
  display: block;
  max-width: 100%;
  height: auto;
}

.wp-caption-text {
  font-size: 0.875rem;
  color: var(--color-muted);
  margin-top: 0.5rem;
  text-align: center;
}

/* Gallery */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.gallery-item {
  margin: 0;
}

.gallery-item img {
  width: 100%;
  height: auto;
  border-radius: 0.25rem;
}

/* Comments */
.comments-area {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--color-border);
}

.comments-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 1.5rem;
}

.comment-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.comment {
  padding: 1rem 0;
  border-bottom: 1px solid var(--color-border);
}

.comment:last-child {
  border-bottom: none;
}

.comment-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.comment-author img {
  border-radius: 50%;
}

.comment-author .fn {
  font-weight: 600;
  color: var(--color-primary);
}

.comment-metadata {
  font-size: 0.75rem;
  color: var(--color-muted);
}

.comment-content p {
  margin: 0;
}

.comment-reply-link {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-secondary);
}

/* Comment Form */
.comment-respond {
  margin-top: 2rem;
}

.comment-reply-title {
  font-family: var(--font-heading);
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 1rem;
}

.comment-form label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: 0.5rem;
  font-size: 1rem;
  margin-bottom: 1rem;
}

.comment-form input:focus,
.comment-form textarea:focus {
  outline: none;
  border-color: var(--color-secondary);
}

.comment-form .submit {
  background-color: var(--color-primary);
  color: #fff;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 0.5rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s;
}

.comment-form .submit:hover {
  background-color: var(--color-secondary);
}

/* ==========================================================================
   Ad Inserter Integration - CLS Zero
   ========================================================================== */

/*
 * COMO USAR COM AD INSERTER:
 *
 * 1. No Ad Inserter, vá em Settings > General > Wrapping
 * 2. Adicione a classe CSS correspondente ao tamanho do anúncio
 *
 * Exemplo para Rectangle 300x250:
 * - Wrapping: Before: <div class="ai-ad ai-ad-rectangle">
 * - Wrapping: After: </div>
 *
 * Ou use o shortcode com wrapper:
 * <div class="ai-ad ai-ad-rectangle">[adinserter block="1"]</div>
 *
 * Classes disponíveis:
 * - ai-ad-mobile-banner    (320x50 / 320x100)
 * - ai-ad-rectangle        (300x250)
 * - ai-ad-large-rectangle  (336x280)
 * - ai-ad-leaderboard      (728x90, responsivo para mobile)
 * - ai-ad-skyscraper       (160x600)
 * - ai-ad-wide-skyscraper  (300x600)
 * - ai-ad-billboard        (970x250, responsivo)
 * - ai-ad-native           (altura flexível, largura 100%)
 */

/* Base styles for all ad containers */
.ai-ad,
.ad-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 1.5rem auto;
  contain: layout style;
  overflow: hidden;
}

/* Optional "Publicidade" label - add class ai-ad-labeled */
.ai-ad-labeled::before,
.ad-slot__label {
  content: "Publicidade";
  display: block;
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-muted);
  margin-bottom: 0.25rem;
  text-align: center;
}

/* Hide label for unlabeled ads */
.ai-ad:not(.ai-ad-labeled)::before {
  display: none;
}

/* ==========================================================================
   Ad Sizes - Mobile First
   ========================================================================== */

/* Mobile Banner - 320x50 ou 320x100 */
.ai-ad-mobile-banner {
  min-width: 320px;
  min-height: 50px;
}

.ai-ad-mobile-banner-large {
  min-width: 320px;
  min-height: 100px;
}

/* Rectangle - 300x250 (mais comum) */
.ai-ad-rectangle,
.ad-slot--rectangle {
  min-width: 300px;
  min-height: 250px;
}

/* Large Rectangle - 336x280 */
.ai-ad-large-rectangle,
.ad-slot--large-rectangle {
  min-width: 300px;
  min-height: 250px;
}

@media (min-width: 400px) {
  .ai-ad-large-rectangle,
  .ad-slot--large-rectangle {
    min-width: 336px;
    min-height: 280px;
  }
}

/* Leaderboard - 728x90 (responsivo) */
.ai-ad-leaderboard,
.ad-slot--leaderboard {
  min-width: 320px;
  min-height: 50px;
  width: 100%;
  max-width: 728px;
}

@media (min-width: 768px) {
  .ai-ad-leaderboard,
  .ad-slot--leaderboard {
    min-width: 728px;
    min-height: 90px;
  }
}

/* Billboard - 970x250 (responsivo, desktop only) */
.ai-ad-billboard {
  min-width: 300px;
  min-height: 250px;
  width: 100%;
  max-width: 970px;
}

@media (min-width: 768px) {
  .ai-ad-billboard {
    min-width: 728px;
    min-height: 90px;
  }
}

@media (min-width: 1024px) {
  .ai-ad-billboard {
    min-width: 970px;
    min-height: 250px;
  }
}

/* Skyscraper - 160x600 */
.ai-ad-skyscraper {
  min-width: 160px;
  min-height: 600px;
}

/* Wide Skyscraper / Half Page - 300x600 */
.ai-ad-wide-skyscraper,
.ai-ad-half-page {
  min-width: 300px;
  min-height: 600px;
}

/* Native/In-feed - altura flexível */
.ai-ad-native,
.ai-ad-infeed {
  width: 100%;
  min-height: 100px;
}

/* ==========================================================================
   In-Article Ads (dentro do conteúdo)
   ========================================================================== */

/* Anúncio centralizado no artigo */
.article-content .ai-ad,
.article-content .ad-slot {
  margin: 2rem auto;
}

/* Anúncio alinhado à esquerda com texto ao redor */
.ai-ad-float-left {
  float: left;
  margin: 0 1.5rem 1rem 0;
}

/* Anúncio alinhado à direita com texto ao redor */
.ai-ad-float-right {
  float: right;
  margin: 0 0 1rem 1.5rem;
}

/* Em mobile, não flutuar */
@media (max-width: 767px) {
  .ai-ad-float-left,
  .ai-ad-float-right {
    float: none;
    margin: 1.5rem auto;
  }
}

/* ==========================================================================
   Tipos de Anúncio: Topo, Contents, Anchor, Interstitial
   ========================================================================== */

/*
 * CONFIGURAÇÃO NO AD INSERTER:
 *
 * TOPO (Header):
 * Before: <div class="ai-ad ai-ad-topo">
 * After:  </div>
 *
 * CONTENTS (In-Article):
 * Before: <div class="ai-ad ai-ad-contents">
 * After:  </div>
 *
 * ANCHOR (Sticky Bottom):
 * Before: <div class="ai-ad ai-ad-anchor">
 * After:  </div>
 *
 * INTERSTITIAL (Full Screen):
 * Gerenciado pelo Ad Inserter/AdSense - não precisa de wrapper
 */

/* TOPO - Anúncio no header/topo da página */
.ai-ad-topo {
  width: 100%;
  max-width: 728px;
  min-height: 50px;
  margin: 0 auto 1rem;
  padding: 0.5rem 0;
}

@media (min-width: 768px) {
  .ai-ad-topo {
    min-height: 90px;
  }
}

/* Variante: Topo responsivo que adapta ao tamanho */
.ai-ad-topo-responsive {
  width: 100%;
  min-height: 50px;
  margin: 0 auto 1rem;
}

@media (min-width: 768px) {
  .ai-ad-topo-responsive {
    min-height: 90px;
    max-width: 728px;
  }
}

@media (min-width: 1024px) {
  .ai-ad-topo-responsive {
    min-height: 250px;
    max-width: 970px;
  }
}

/* CONTENTS - Anúncio dentro do conteúdo do artigo */
.ai-ad-contents {
  width: 100%;
  max-width: 336px;
  min-height: 250px;
  margin: 2rem auto;
  clear: both;
}

@media (min-width: 768px) {
  .ai-ad-contents {
    min-height: 280px;
  }
}

/* Variante: Contents que ocupa largura total */
.ai-ad-contents-full {
  width: 100%;
  min-height: 250px;
  margin: 2rem auto;
  clear: both;
}

/* ANCHOR - Anúncio fixo no rodapé (sticky bottom) */
.ai-ad-anchor {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  min-height: 50px;
  margin: 0;
  background: var(--color-surface);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

/* Anchor com altura maior para Large Mobile Banner */
.ai-ad-anchor-large {
  min-height: 100px;
}

/* Botão de fechar do Anchor (se necessário) */
.ai-ad-anchor .ai-close {
  position: absolute;
  top: -24px;
  right: 8px;
  width: 24px;
  height: 24px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 14px;
  color: var(--color-muted);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Reservar espaço no body quando anchor está ativo */
body.has-anchor-ad {
  padding-bottom: 60px;
}

body.has-anchor-ad-large {
  padding-bottom: 110px;
}

/* INTERSTITIAL - Tela cheia (gerenciado pelo Ad Manager) */
/* O interstitial é controlado pelo Google/Ad Inserter,
   mas podemos estilizar o container se necessário */
.ai-ad-interstitial {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ==========================================================================
   Espaçamento para evitar sobreposição com Anchor
   ========================================================================== */

/* Footer com padding extra quando anchor está ativo */
body.has-anchor-ad .site-footer {
  padding-bottom: 70px;
}

/* Cookie banner acima do anchor */
body.has-anchor-ad .cookie-banner {
  bottom: 60px;
}

body.has-anchor-ad-large .cookie-banner {
  bottom: 110px;
}

/* ==========================================================================
   Hide Ads on Print
   ========================================================================== */

@media print {
  .ai-ad,
  .ad-slot,
  [class*="ai-ad-"],
  .code-block {
    display: none !important;
  }
}

/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {
  .site-header-wrapper,
  .mobile-menu,
  .cookie-banner,
  .site-footer,
  .cta-button,
  .related-articles,
  .comments-area {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
    font-size: 12pt;
    line-height: 1.5;
  }

  .site-main {
    padding-top: 0;
  }

  a {
    color: #000;
    text-decoration: underline;
  }

  a[href]::after {
    content: " (" attr(href) ")";
    font-size: 0.8em;
  }
}
