/*
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: 2.20.8
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: pubmaster
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%;
}

.hidden {
  display: none;
}

@media (min-width: 640px) {
  .sm\:inline {
    display: inline;
  }
}

.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 8px;
  margin-bottom: 0;
  background: var(--color-primary);
}

@media (min-width: 640px) {
  .site-header-wrapper {
    padding: 8px 1rem 8px;
  }
}

/* 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: 68px;
  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;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}

@media (min-width: 768px) {
  .mobile-menu {
    display: none !important;
  }
}

.mobile-menu.active {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
}

/* Overlay */
.mobile-menu-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  transition: opacity 0.3s ease;
  opacity: 0;
}

.mobile-menu.active .mobile-menu-overlay {
  opacity: 1;
}

/* Panel */
.mobile-menu-panel {
  position: absolute;
  top: 0;
  left: 0;
  width: min(85vw, 320px);
  height: 100%;
  background: #fff;
  display: flex;
  flex-direction: column;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  transform: translateX(-100%);
}

.mobile-menu.active .mobile-menu-panel {
  transform: translateX(0);
}

/* Header */
.mobile-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  padding: 0 1rem 0 1.25rem;
  flex-shrink: 0;
  border-bottom: 1px solid #e5e7eb;
  background: linear-gradient(to bottom, rgba(var(--color-primary-rgb), 0.03), transparent);
}

.mobile-menu-brand {
  display: flex;
  align-items: center;
}

.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;
}

/* Close button */
.mobile-menu-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 0.5rem;
  border: none;
  background: transparent;
  color: var(--color-muted);
  cursor: pointer;
  transition: all 0.15s ease;
}

.mobile-menu-close:hover {
  background: #f3f4f6;
  color: var(--color-text);
}

.mobile-menu-close:active {
  transform: scale(0.92);
}

/* Scrollable body */
.mobile-menu-body {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: #d1d5db transparent;
}

.mobile-menu-body::-webkit-scrollbar {
  width: 3px;
}

.mobile-menu-body::-webkit-scrollbar-track {
  background: transparent;
}

.mobile-menu-body::-webkit-scrollbar-thumb {
  background-color: #d1d5db;
  border-radius: 3px;
}

.mobile-menu-divider {
  height: 1px;
  background: linear-gradient(to right, #e5e7eb, #f3f4f6);
  margin: 0.25rem 1.25rem 0.25rem 0;
}

/* Nav items */
.mobile-menu-body > ul {
  display: flex;
  flex-direction: column;
  list-style: none;
  padding: 0.5rem 0.625rem 0.5rem 0;
  margin: 0;
}

.mobile-menu-body > ul > li {
  margin: 0;
}

.mobile-menu-body > ul > li > a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem 0.75rem 1.25rem;
  min-height: 48px;
  border-radius: 0 0.75rem 0.75rem 0;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  color: #344054;
  transition: all 0.2s ease;
  border-left: 3px solid transparent;
}

.mobile-menu-body > ul > li > a:hover {
  background-color: #f3f4f6;
  text-decoration: none;
  transform: translateX(2px);
}

.mobile-menu-body > ul > li > a:active {
  background-color: #e5e7eb;
}

/* Active nav item */
.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);
  border-left-color: var(--color-primary);
  font-weight: 700;
}

/* Staggered entrance animation */
@keyframes menuItemIn {
  from {
    opacity: 0;
    transform: translateX(-10px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.mobile-menu.active .mobile-menu-body > ul > li {
  animation: menuItemIn 0.25s ease both;
}

.mobile-menu.active .mobile-menu-body > ul > li:nth-child(1) { animation-delay: 60ms; }
.mobile-menu.active .mobile-menu-body > ul > li:nth-child(2) { animation-delay: 100ms; }
.mobile-menu.active .mobile-menu-body > ul > li:nth-child(3) { animation-delay: 140ms; }
.mobile-menu.active .mobile-menu-body > ul > li:nth-child(4) { animation-delay: 180ms; }
.mobile-menu.active .mobile-menu-body > ul > li:nth-child(5) { animation-delay: 220ms; }
.mobile-menu.active .mobile-menu-body > ul > li:nth-child(6) { animation-delay: 260ms; }
.mobile-menu.active .mobile-menu-body > ul > li:nth-child(7) { animation-delay: 300ms; }
.mobile-menu.active .mobile-menu-body > ul > li:nth-child(8) { animation-delay: 340ms; }

/* Hide legacy legal section in mobile menu (removed in v2.8.5) */
.mobile-menu-links,
.mobile-menu-divider + .mobile-menu-links,
.mobile-menu #menu-menu-legal {
  display: none;
}

/* Footer */
.mobile-menu-footer {
  flex-shrink: 0;
  padding: 1rem 1.25rem;
  border-top: 1px solid #e5e7eb;
  background: #f9fafb;
}

.mobile-menu-footer p {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 11px;
  color: #98a2b3;
  line-height: 1.5;
  margin: 0;
}

.mobile-menu-footer-icon {
  flex-shrink: 0;
  opacity: 0.6;
}

/* ==========================================================================
   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;
}

@media (max-width: 374px) {
  .article-card-content {
    padding: 0.75rem;
  }

  .article-card h3 {
    font-size: 0.9375rem;
  }
}

/* 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-subtitle {
  font-family: var(--font-heading);
  font-size: 1.0625rem;
  font-weight: 400;
  color: var(--color-muted);
  line-height: 1.5;
  margin-top: -0.25rem;
  margin-bottom: 0.75rem;
}

@media (min-width: 640px) {
  .single-article .article-subtitle {
    font-size: 1.125rem;
  }
}

.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);
}

/* Article Content (Prose) */
.article-content {
  contain: layout style;
}

.article-content h2 {
  font-family: var(--font-heading);
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  line-height: 1.3;
}

@media (min-width: 640px) {
  .article-content h2 {
    font-size: 1.5rem;
  }
}

.article-content h3 {
  font-family: var(--font-heading);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--color-primary);
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  line-height: 1.35;
}

@media (min-width: 640px) {
  .article-content h3 {
    font-size: 1.25rem;
  }
}

.article-content p {
  margin-bottom: 1rem;
  line-height: 1.7;
  font-size: 1rem;
  color: var(--color-text);
}

.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.35rem;
  line-height: 1.65;
}

.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;
}

/* Article Images (body images from Shenlong) */
.article-content figure {
  width: 100%;
  margin: 1.75rem 0;
  padding: 0;
}

.article-content figure img {
  width: 100%;
  height: auto;
  border-radius: 0.5rem;
  display: block;
}

.article-content figure figcaption {
  font-size: 0.8rem;
  color: var(--color-muted);
  text-align: center;
  margin-top: 0.5rem;
}

/* Responsive embeds in article content */
.article-content iframe,
.article-content embed,
.article-content video {
  max-width: 100%;
}

.article-content iframe[src*="youtube"],
.article-content iframe[src*="youtu.be"],
.article-content iframe[src*="vimeo"] {
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
}

/* Table of Contents */
.article-content .table-of-contents {
  background-color: #f1f5f9;
  border: 1px solid var(--color-border);
  border-radius: 0.5rem;
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
}

.article-content .table-of-contents h2 {
  font-size: 1.125rem;
  margin-top: 0;
  margin-bottom: 0.75rem;
  color: var(--color-primary);
}

.article-content .table-of-contents ol {
  margin-bottom: 0;
  padding-left: 1.25rem;
  counter-reset: toc-counter;
  list-style-type: none;
}

.article-content .table-of-contents ol li {
  counter-increment: toc-counter;
  margin-bottom: 0.4rem;
  padding-left: 0.25rem;
}

.article-content .table-of-contents ol li::before {
  content: counter(toc-counter) ". ";
  font-weight: 600;
  color: var(--color-primary);
}

.article-content .table-of-contents a {
  color: var(--color-text);
  text-decoration: none;
  font-size: 0.925rem;
}

.article-content .table-of-contents a:hover {
  color: var(--color-link);
  text-decoration: underline;
}

/* Summary Table Section */
.article-content .summary-table-section {
  margin: 2rem 0;
}

.article-content .summary-table-section h2 {
  font-size: 1.375rem;
  margin-top: 0;
  margin-bottom: 0.25rem;
}

.article-content .summary-table-section .summary-subtitle {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 400;
  color: var(--color-muted);
  margin-bottom: 1rem;
  line-height: 1.4;
}

@media (min-width: 640px) {
  .article-content .summary-table-section h2 {
    font-size: 1.5rem;
  }

  .article-content .summary-table-section .summary-subtitle {
    font-size: 1.0625rem;
  }
}

/* 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: 1rem 0;
  border-radius: 0.5rem;
  overflow: hidden;
  border: 1px solid var(--color-border);
}

.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);
}

@media (max-width: 767px) {
  .article-content thead th {
    white-space: normal;
    font-size: 0.8125rem;
  }

  .article-content tbody td {
    padding: 0.625rem 0.75rem;
    font-size: 0.8125rem;
  }
}

/* ==========================================================================
   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-pubmaster-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;
  }
}

@media (max-width: 374px) {
  .single-article {
    padding: 1.5rem 0.75rem;
  }

  .single-article h1 {
    font-size: 1.3125rem;
  }

  .article-content h2 {
    font-size: 1.25rem;
  }

  .cta-button {
    font-size: 20px;
    padding: 16px 20px;
  }

  .cta-button--accent {
    font-size: 22px;
  }

  .article-content .table-of-contents {
    padding: 1rem;
  }

  .cta-final-card__headline {
    font-size: 18px;
  }

  .cta-final-card__button {
    font-size: 14px;
    padding: 10px 16px;
  }
}

/* ==========================================================================
   Styled Table Block
   ========================================================================== */

.wp-block-pubmaster-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;
}

@media (max-width: 767px) {
  .author-bio-social a {
    width: 44px;
    height: 44px;
  }

  .author-bio-social a svg {
    width: 20px;
    height: 20px;
  }
}

/* ==========================================================================
   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: 1.5rem;
  margin-bottom: 2rem;
}

/* Footer 4 colunas - mobile first */
.footer-grid-4 {
  display: grid;
  gap: 1.5rem;
  margin-bottom: 2rem;
  /* Mobile: Logo, Texto empilhados, Menus lado a lado */
  grid-template-columns: 1fr 1fr;
  grid-template-areas:
    'logo logo'
    'text text'
    'nav legal';
}

.footer-col-logo {
  grid-area: logo;
  display: flex;
  justify-content: center;
}

.footer-col-text {
  grid-area: text;
  text-align: center;
}

.footer-col-text .footer-description {
  max-width: 100%;
  margin: 0 auto;
}

.footer-col-nav {
  grid-area: nav;
  text-align: left;
}

.footer-col-legal {
  grid-area: legal;
  text-align: left;
}

/* Desktop: 4 colunas em uma única linha */
@media (min-width: 768px) {
  .footer-grid-4 {
    grid-template-columns: auto 1.5fr 1fr 1fr;
    grid-template-areas: 'logo text nav legal';
    gap: 2.5rem;
    align-items: start;
  }

  .footer-col-logo {
    justify-content: flex-start;
  }

  .footer-col-text {
    text-align: left;
  }

  .footer-col-text .footer-description {
    max-width: 100%;
    margin: 0;
  }
}

.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;
  flex-direction: column;
  gap: 1rem;
}

.footer-disclaimer-row .footer-logo {
  flex-shrink: 0;
  margin-bottom: 0.5rem;
}

.footer-disclaimer-row .footer-description {
  margin-top: 0;
  max-width: 320px;
}

.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;
  }
}

/* ==========================================================================
   AD BLOCKING - Hide ads on no-ads pages (fallback CSS)
   Applied to: Home, Sobre, Contato, Privacidade, Termos, Categories
   ========================================================================== */

body.no-ads .ad-slot,
body.no-ads .ai-code-block,
body.no-ads [id^='div-gpt-ad'],
body.no-ads [class*='adsbygoogle'],
body.no-ads .ai-ad-anchor,
body.no-ads .adinserter,
body.no-ads [data-ad-slot] {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  min-height: 0 !important;
  overflow: hidden !important;
}

body.no-ads iframe[src*='googlesyndication'],
body.no-ads iframe[src*='doubleclick'] {
  display: none !important;
}
