/*
Theme Name: Audiência da TV Pro
Theme URI: https://audienciadatv.net/
Author: Equipe Audiência da TV
Author URI: https://audienciadatv.net/
Description: Tema WordPress ultra-rápido desenvolvido sob medida para o portal Audiência da TV (audienciadatv.net). Otimizado para Core Web Vitals (LCP, INP e CLS zero), Google Discover (imagens 1200px+ 16:9 e max-image-preview:large), Google Notícias (Schema NewsArticle, CriticReview e BreadcrumbList em JSON-LD), E-E-A-T e monetização com Google AdSense sem deslocamento de layout.
Version: 2.4.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: audienciadatv
Tags: news, blog, entertainment, custom-logo, custom-menu, featured-images, threaded-comments, two-columns, right-sidebar
*/

:root {
  color-scheme: light;
  --bg-body: #f8fafc;
  --bg-surface: #ffffff;
  --bg-muted: #f1f5f9;
  --text-main: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;
  --border-color: #e2e8f0;
  --brand-primary: #be123c;
  --brand-primary-hover: #9f1239;
  --brand-secondary: #0f172a;
  --brand-accent: #2563eb;
  --cat-bastidores: #be123c;
  --cat-tudotv: #1d4ed8;
  --cat-critica: #6d28d9;
  --cat-novelas: #be185d;
  --cat-famosos: #b45309;
  --cat-globo: #0369a1;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.08);
  --container-width: 1240px;
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

/* Strict Horizontal Overflow Lock for Mobile Touch Scrolling (iOS Safari & Android Chrome) */
html {
  font-family: var(--font-sans);
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  max-width: 100%;
  overflow-x: hidden;
  overflow-x: clip;
}

body {
  margin: 0;
  padding: 0;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  overflow-x: clip;
  position: relative;
  background-color: var(--bg-body);
  color: var(--text-main);
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  touch-action: pan-y pinch-zoom;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--brand-primary);
}

img, picture, video, svg, iframe {
  display: block;
  max-width: 100%;
  height: auto;
}

/* Accessibility Skip Link */
.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  background: var(--brand-primary);
  color: #fff;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  z-index: 9999;
  font-weight: 700;
}
.skip-link:focus {
  top: 12px;
  color: #fff;
}

/* Reading Progress Bar (Hidden on Mobile to remove top horizontal line) */
.reading-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: var(--brand-primary);
  width: 0%;
  z-index: 1001;
  transition: width 0.1s linear;
}

.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 16px;
}

/* Top Breaking / Ibope Ticker Bar */
.topbar {
  background: var(--brand-secondary);
  color: #f8fafc;
  font-size: 0.8125rem;
  width: 100%;
  overflow: hidden;
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 36px;
  gap: 12px;
  min-width: 0;
  max-width: 100%;
}

.ticker-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow: hidden;
  white-space: nowrap;
  flex: 1 1 0%;
  min-width: 0;
}

.ticker-badge {
  background: var(--brand-primary);
  color: #ffffff;
  font-weight: 800;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px 8px;
  border-radius: 4px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.ticker-dot {
  width: 6px;
  height: 6px;
  background: #ffffff;
  border-radius: 50%;
  display: inline-block;
}

.ticker-link {
  color: #e2e8f0;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: block;
  min-width: 0;
  flex: 1 1 0%;
}
.ticker-link:hover {
  color: #ffffff;
  text-decoration: underline;
}

.topbar-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
  color: #cbd5e1;
}

/* Main Site Header */
.site-header {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 900;
  box-shadow: var(--shadow-sm);
  width: 100%;
}

.header-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  gap: 16px;
  min-width: 0;
}

.site-branding {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1 1 auto;
}

.site-title {
  margin: 0;
  font-size: 1.6rem;
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.1;
  text-transform: uppercase;
  white-space: nowrap;
}

.site-title a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-main);
}

.site-title .brand-highlight {
  background: var(--brand-primary);
  color: #ffffff;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
}

.site-description {
  margin: 2px 0 0;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Navigation */
.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}

.nav-list li a {
  display: inline-block;
  padding: 8px 11px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-main);
  border-radius: var(--radius-sm);
}

.nav-list li a:hover,
.nav-list li.current-menu-item a,
.nav-list li.current-cat a {
  color: var(--brand-primary);
  background: var(--bg-muted);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.icon-btn {
  background: var(--bg-muted);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}

.icon-btn:hover {
  border-color: var(--brand-primary);
  color: var(--brand-primary);
}

.mobile-menu-toggle {
  display: none;
}

/* Expandable Search Bar */
.header-search-panel {
  display: none;
  background: var(--bg-muted);
  border-top: 1px solid var(--border-color);
  padding: 12px 0;
  width: 100%;
}

.header-search-panel.is-open {
  display: block;
}

.search-form {
  display: flex;
  gap: 8px;
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
}

.search-field {
  flex: 1 1 0%;
  min-width: 0;
  padding: 10px 14px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  color: var(--text-main);
  font-size: 16px; /* 16px prevents iOS Safari auto-zoom on input focus */
}

.search-submit {
  background: var(--brand-primary);
  color: #ffffff;
  border: none;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
}

.search-submit:hover {
  background: var(--brand-primary-hover);
}

/* Anti-CLS AdSense Containers (Strictly Contained to Prevent Mobile Overflow) */
.ad-slot {
  margin: 18px auto;
  text-align: center;
  background: var(--bg-muted);
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  width: 100%;
  max-width: 100%;
}

.ad-slot ins,
.ad-slot iframe {
  max-width: 100% !important;
}

.ad-slot-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  padding: 2px 0;
}

.ad-slot-header {
  min-height: 90px;
  max-width: 970px;
}

.ad-slot-in-article {
  min-height: 250px;
  margin: 24px 0;
}

.ad-slot-sidebar {
  min-height: 250px;
  margin-bottom: 24px;
}

/* Category Badges */
.cat-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 9px;
  border-radius: 4px;
  background: var(--brand-primary);
  color: #ffffff;
  line-height: 1.4;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cat-badge:hover {
  color: #ffffff;
  opacity: 0.92;
}
.cat-bastidores-da-tv { background: var(--cat-bastidores); }
.cat-tudo-tv { background: var(--cat-tudotv); }
.cat-resenha-critica { background: var(--cat-critica); }
.cat-resumo-das-novelas { background: var(--cat-novelas); }
.cat-noticias-dos-famosos { background: var(--cat-famosos); }
.cat-globo { background: var(--cat-globo); }

/* Aspect-Ratio Image Wrapper (Prevents CLS & Optimizes Google Discover 16:9) */
.thumb-ratio {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--bg-muted);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: block;
}

.thumb-ratio img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.25s ease;
}

article:hover .thumb-ratio img {
  transform: scale(1.03);
}

/* Front Page Hero Grid (1 Main + 3 Secondary) */
.hero-section {
  padding: 20px 0 10px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 24px;
  width: 100%;
}

.hero-main-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  min-width: 0;
  max-width: 100%;
}

.hero-main-card .thumb-ratio {
  border-radius: 0;
}

.hero-main-body {
  padding: 20px 22px 22px;
  min-width: 0;
}

.hero-main-title {
  font-size: clamp(1.3rem, 2.4vw, 1.9rem);
  font-weight: 900;
  line-height: 1.22;
  margin: 10px 0;
  letter-spacing: -0.02em;
  overflow-wrap: break-word;
}

.hero-main-excerpt {
  color: var(--text-secondary);
  font-size: 0.96rem;
  margin: 0 0 14px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}

.hero-side-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
  max-width: 100%;
}

.hero-side-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px;
  display: grid;
  grid-template-columns: 145px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  box-shadow: var(--shadow-sm);
  min-width: 0;
  max-width: 100%;
}

.hero-side-card > div {
  min-width: 0;
}

.hero-side-title {
  font-size: 0.98rem;
  font-weight: 800;
  line-height: 1.3;
  margin: 6px 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: break-word;
}

/* Main Layout Grid (Content + Sidebar) */
.site-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 32px;
  padding: 20px 0 44px;
  align-items: start;
  width: 100%;
}

.content-area,
.widget-area {
  min-width: 0;
  max-width: 100%;
}

/* Section Headers (Clean Left Accent Pill - No Full-Width Horizontal Line on Mobile) */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 26px 0 16px;
  padding-left: 12px;
  border-left: 4px solid var(--brand-primary);
}

.section-title {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  line-height: 1.25;
}

.section-more {
  font-size: 0.88rem;
  font-weight: 800;
  color: #9f1239;
  white-space: nowrap;
  flex-shrink: 0;
  padding: 6px 8px;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
}

/* Editorial Cards Grid */
.posts-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-bottom: 28px;
}

.posts-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.post-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  min-width: 0;
  max-width: 100%;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.post-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.post-card .thumb-ratio {
  border-radius: 0;
}

.post-card-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.post-card-title {
  font-size: 1.04rem;
  font-weight: 800;
  line-height: 1.35;
  margin: 8px 0;
  overflow-wrap: break-word;
}

.post-card-excerpt {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin: 0 0 12px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card-body .post-meta {
  margin-top: auto;
}

/* Review Score Badge on Thumbnail */
.review-score-pill {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(15, 23, 42, 0.9);
  color: #fbbf24;
  font-weight: 900;
  font-size: 0.8rem;
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid rgba(251, 191, 36, 0.4);
  z-index: 2;
}

/* Single Article Page (Discover & E-E-A-T Optimized) */
.single-article-wrap {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 28px 30px;
  box-shadow: var(--shadow-sm);
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.breadcrumbs {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: 12px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.breadcrumbs a {
  color: var(--text-secondary);
  font-weight: 600;
}

.single-title {
  font-size: clamp(1.5rem, 3vw, 2.3rem);
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: -0.025em;
  margin: 10px 0 12px;
  overflow-wrap: break-word;
}

.single-lead {
  font-size: 1.1rem;
  line-height: 1.55;
  color: var(--text-secondary);
  margin: 0 0 16px;
  font-weight: 500;
}

.single-byline-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  padding: 12px 0;
  margin-bottom: 18px;
}

.author-meta-inline {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.author-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--brand-primary);
  flex-shrink: 0;
}

.author-byline-text {
  font-size: 0.84rem;
  line-height: 1.4;
  min-width: 0;
}

.author-name {
  font-weight: 800;
  color: var(--text-main);
}

.publish-dates {
  color: var(--text-muted);
  font-size: 0.78rem;
}

/* Social Share & Google News Follow Bar */
.share-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  max-width: 100%;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 700;
  color: #ffffff;
  border: none;
  cursor: pointer;
}
.share-btn:hover {
  color: #ffffff;
  opacity: 0.9;
}
.share-whatsapp { background: #16a34a; }
.share-x { background: #0f172a; }
.share-telegram { background: #0284c7; }
.share-gnews {
  background: var(--bg-muted);
  color: var(--text-main);
  border: 1px solid var(--border-color);
}
.share-gnews:hover {
  color: var(--brand-primary);
  border-color: var(--brand-primary);
}

.single-featured-figure {
  margin: 0 0 22px;
  width: 100%;
  max-width: 100%;
}

.single-featured-figure figcaption {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 8px;
}

/* Ibope / Critic Highlight Box inside Post */
.ibope-highlight-card,
.critic-verdict-card {
  background: var(--bg-muted);
  border-left: 4px solid var(--brand-primary);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  margin: 20px 0;
  max-width: 100%;
}

.critic-verdict-card {
  border-left-color: var(--cat-critica);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
}

.critic-score-big {
  background: var(--cat-critica);
  color: #ffffff;
  font-size: 1.4rem;
  font-weight: 900;
  padding: 8px 14px;
  border-radius: var(--radius-md);
  text-align: center;
  min-width: 78px;
}

/* Entry Content Typography & Mobile Overflow Protection */
.entry-content {
  font-size: 1.1rem;
  line-height: 1.78;
  color: var(--text-main);
  min-width: 0;
  max-width: 100%;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

.entry-content p {
  margin: 0 0 1.3em;
}

.entry-content h2,
.entry-content h3 {
  font-weight: 900;
  line-height: 1.28;
  margin: 1.5em 0 0.6em;
  letter-spacing: -0.015em;
  overflow-wrap: break-word;
}

.entry-content h2 {
  font-size: 1.45rem;
  padding-left: 12px;
  border-left: 4px solid var(--brand-primary);
}

.entry-content blockquote {
  margin: 1.4em 0;
  padding: 14px 18px;
  background: var(--bg-muted);
  border-left: 4px solid var(--brand-primary);
  font-style: italic;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  max-width: 100%;
}

/* Force all WordPress figures, images, embeds, tables & ads inside post content to fit screen */
.entry-content figure,
.entry-content .wp-caption,
.entry-content .wp-block-image,
.entry-content .wp-block-embed,
.entry-content .alignwide,
.entry-content .alignfull {
  max-width: 100% !important;
  width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

.entry-content img,
.entry-content iframe,
.entry-content video,
.entry-content embed,
.entry-content object {
  max-width: 100% !important;
  height: auto;
}

.entry-content pre,
.entry-content code {
  max-width: 100%;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

.entry-content table {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-collapse: collapse;
  margin: 22px 0;
  font-size: 0.92rem;
}

.entry-content th,
.entry-content td {
  padding: 10px 12px;
  border: 1px solid var(--border-color);
  text-align: left;
}

.entry-content th {
  background: var(--brand-secondary);
  color: #ffffff;
  font-weight: 800;
}

/* Inline Read Also Box */
.inline-read-also {
  background: var(--bg-muted);
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--brand-primary);
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  margin: 22px 0;
  font-size: 0.96rem;
  max-width: 100%;
}

.inline-read-also strong {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--brand-primary);
  margin-bottom: 4px;
}

.inline-read-also a {
  font-weight: 800;
  color: var(--text-main);
}
.inline-read-also a:hover {
  color: var(--brand-primary);
}

/* Author Box (E-E-A-T Signal for Google News/Discover) */
.author-box-eeat {
  display: flex;
  gap: 16px;
  background: var(--bg-muted);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 18px;
  margin-top: 28px;
  align-items: center;
  max-width: 100%;
}

.author-box-eeat img {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  flex-shrink: 0;
}

.author-box-title {
  margin: 0 0 4px;
  font-size: 1rem;
  font-weight: 800;
}

.author-box-bio {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-secondary);
}

/* Sidebar Widgets */
.widget-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 22px;
  box-shadow: var(--shadow-sm);
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.widget-title {
  margin: 0 0 16px;
  font-size: 1.02rem;
  font-weight: 900;
  text-transform: uppercase;
  padding-left: 10px;
  border-left: 4px solid var(--brand-primary);
}

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

.trending-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 10px 0;
  min-width: 0;
}

.trending-rank {
  font-size: 1.25rem;
  font-weight: 900;
  color: var(--brand-primary);
  line-height: 1;
  min-width: 24px;
  flex-shrink: 0;
}

.trending-item-title {
  margin: 4px 0 0;
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.35;
  overflow-wrap: break-word;
}

/* Pagination */
.pagination,
.nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 28px 0 12px;
  flex-wrap: wrap;
}

.page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 42px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  font-weight: 700;
  font-size: 0.9rem;
}

.page-numbers.current,
.page-numbers:hover {
  background: var(--brand-primary);
  color: #ffffff;
  border-color: var(--brand-primary);
}

/* Footer */
.site-footer {
  background: #0b0f19;
  color: #cbd5e1;
  padding: 40px 0 28px;
  margin-top: 36px;
  width: 100%;
  overflow: hidden;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 32px;
  padding-bottom: 28px;
}

.footer-heading {
  color: #ffffff;
  font-size: 1rem;
  font-weight: 800;
  text-transform: uppercase;
  margin: 0 0 12px;
}

.footer-about-text {
  font-size: 0.9rem;
  line-height: 1.65;
  color: #94a3b8;
  margin: 10px 0 0;
}

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

.footer-links li {
  margin-bottom: 8px;
}

.footer-links a {
  color: #cbd5e1;
  font-size: 0.9rem;
}

.footer-links a:hover {
  color: #ffffff;
  text-decoration: underline;
}

.footer-bottom {
  padding-top: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.82rem;
  color: #94a3b8;
}

/* ==========================================================================
   MOBILE & TABLET OPTIMIZATION (Zero Horizontal Scroll & No Horizontal Lines)
   ========================================================================== */
@media (max-width: 1024px) {
  .hero-grid,
  .site-main-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .posts-grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  /* Remove top reading progress line & header bottom line on mobile */
  .reading-progress-bar {
    display: none !important;
  }
  .site-header {
    border-bottom: none;
  }

  .container {
    padding: 0 12px;
  }

  .topbar-meta {
    display: none;
  }

  .header-main {
    min-height: 58px;
    gap: 10px;
  }

  .site-title {
    font-size: 1.25rem;
  }

  .site-title .brand-highlight {
    padding: 2px 6px;
  }

  .site-description {
    display: none;
  }

  .mobile-menu-toggle {
    display: inline-flex;
  }

  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    width: 100%;
    background: var(--bg-surface);
    padding: 10px 12px 14px;
    box-shadow: var(--shadow-md);
    z-index: 950;
  }

  .main-nav.is-open {
    display: block;
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
  }

  .nav-list li a {
    display: block;
    padding: 12px 14px;
    font-size: 0.95rem;
  }

  /* Hero section mobile polish */
  .hero-section {
    padding: 12px 0 6px;
  }

  .hero-grid {
    gap: 14px;
  }

  .hero-main-body {
    padding: 14px 16px 16px;
  }

  .hero-main-title {
    font-size: 1.28rem;
    margin: 8px 0;
  }

  .hero-main-excerpt {
    font-size: 0.9rem;
    -webkit-line-clamp: 2;
  }

  .hero-side-card {
    grid-template-columns: 108px minmax(0, 1fr);
    gap: 12px;
    padding: 10px;
  }

  .hero-side-title {
    font-size: 0.92rem;
    margin: 4px 0;
  }

  /* Single column cards on mobile */
  .posts-grid-3,
  .posts-grid-2,
  .footer-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }

  .site-main-grid {
    gap: 24px;
    padding: 14px 0 32px;
  }

  .section-header {
    margin: 20px 0 12px;
  }

  .section-title {
    font-size: 1.08rem;
  }

  /* Single Post Mobile Polish */
  .single-article-wrap {
    padding: 16px 14px;
    border-radius: var(--radius-md);
  }

  .single-title {
    font-size: 1.42rem;
    line-height: 1.24;
  }

  .single-lead {
    font-size: 1rem;
  }

  .single-byline-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 8px 0;
    margin-bottom: 14px;
  }

  .share-bar {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .share-btn {
    width: 100%;
    padding: 9px 10px;
    font-size: 0.8rem;
    text-align: center;
  }

  .entry-content {
    font-size: 1.04rem;
    line-height: 1.72;
  }

  .entry-content h2 {
    font-size: 1.28rem;
  }

  .author-box-eeat {
    flex-direction: column;
    align-items: flex-start;
    padding: 16px;
    gap: 12px;
  }
}


/* WordPress Popular Posts (wpp-list) & Widget Links Touch Target + Accessibility Fixes */
.widget-card ul:not(.trending-list) {
  list-style: none;
  padding: 0;
  margin: 0;
}
.widget-card ul:not(.trending-list) li {
  margin-bottom: 10px;
}
.widget-card ul:not(.trending-list) li a {
  display: inline-block;
  padding: 6px 2px;
  min-height: 34px;
  line-height: 1.45;
  font-weight: 600;
}
.footer-links li a {
  display: inline-block;
  padding: 6px 0;
  min-height: 34px;
}
