/**
 * Tanamão News - Frontend CSS
 * Design System Moderno e Elegante
 */

/* Import Navbar Styles */
@import url("navbar.css");

/* ==================== RESET & BASE ==================== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Colors */
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --secondary: #1e293b;
  --accent: #f59e0b;
  --success: #10b981;
  --danger: #ef4444;

  /* Background */
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --bg-tertiary: #f1f5f9;

  /* Text */
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;

  /* Border */
  --border-color: #e2e8f0;

  /* Sidebar */
  --sidebar-width: 280px;
  --sidebar-bg: #1e293b;
  --sidebar-text: #cbd5e1;
  --sidebar-hover: #334155;
  --sidebar-active: #3b82f6;

  /* Header */
  --header-height: 64px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);

  /* Transitions */
  --transition-base: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family:
    "Poppins",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-primary);
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ==================== HEADER COM FAIXA AZUL ==================== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  box-shadow: none; /* Sem sombra */
  transition: all 0.3s ease;
}

/* Faixa azul clara no topo do header */
.top-bar {
  background: #00a8f3; /* Azul claro */
  height: 24px;
  width: 100%;
  transition: all 0.3s ease;
}

.navbar {
  height: var(--header-height);
  background: #ffffff; /* Fundo branco para área da logo */
  transition: all 0.3s ease;
  box-shadow: none; /* Sem sombra */
}

/* Estado quando a página é scrollada */
.site-header.scrolled .top-bar {
  height: 0;
  opacity: 0;
  overflow: hidden;
}

.site-header.scrolled .navbar {
  height: 0;
  opacity: 0;
  overflow: hidden;
}

.navbar-container {
  max-width: 1200px; /* Alinhado com o menu */
  margin: 0 auto;
  padding: 0 20px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #1e293b; /* Texto escuro para fundo branco */
}

.logo-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
  color: white;
}

.logo-text {
  font-size: 20px;
  font-weight: 400;
  color: #1e293b;
}

.logo-text strong {
  font-weight: 700;
}

/* Menu Toggle (Hamburger) */
.menu-toggle {
  width: 44px;
  height: 44px;
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: background var(--transition-fast);
}

.menu-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
}

.hamburger {
  width: 24px;
  height: 2px;
  background: white;
  position: relative;
  transition: all var(--transition-base);
}

.hamburger::before,
.hamburger::after {
  content: "";
  position: absolute;
  width: 24px;
  height: 2px;
  background: white;
  transition: all var(--transition-base);
}

.hamburger::before {
  top: -7px;
}

.hamburger::after {
  top: 7px;
}

/* Hamburger Animation */
.menu-toggle.active .hamburger {
  background: transparent;
}

.menu-toggle.active .hamburger::before {
  top: 0;
  transform: rotate(45deg);
}

.menu-toggle.active .hamburger::after {
  top: 0;
  transform: rotate(-45deg);
}

/* ==================== SIDEBAR ==================== */
.sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1001;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-base);
}

.sidebar-overlay.active {
  opacity: 1;
  visibility: visible;
}

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--sidebar-bg);
  z-index: 1002;
  transform: translateX(-100%);
  transition: transform var(--transition-base);
  display: flex;
  flex-direction: column;
}

.sidebar.active {
  transform: translateX(0);
}

.sidebar-header {
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-title {
  color: white;
  font-weight: 600;
  font-size: 18px;
}

.sidebar-close {
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 8px;
  color: white;
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition-fast);
}

.sidebar-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

.sidebar-nav {
  flex: 1;
  padding: 16px 12px;
  overflow-y: auto;
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: var(--sidebar-text);
  border-radius: 10px;
  margin-bottom: 4px;
  transition: all var(--transition-fast);
}

.sidebar-item:hover {
  background: var(--sidebar-hover);
  color: white;
}

.sidebar-item.active {
  background: var(--sidebar-active);
  color: white;
}

.sidebar-item svg {
  flex-shrink: 0;
}

.sidebar-footer {
  padding: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
}

.sidebar-footer p {
  color: var(--sidebar-text);
  font-size: 12px;
}

/* ==================== MAIN CONTENT ==================== */
.main-content {
  margin-top: calc(
    88px + 80px
  ); /* Header com faixa (88px) + espaço do menu (80px) */
  min-height: calc(100vh - var(--header-height));
  padding: 32px 20px;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

/* ==================== HERO SECTION ==================== */
.hero-section {
  margin-bottom: 40px;
}

/* Layout de 2 colunas: carrossel (5fr) | cards (4fr) */
.hero-layout {
  display: grid;
  grid-template-columns: 5fr 4fr;
  gap: 16px;
  height: 520px;
}

/* ---- ESQUERDA: Swiper ---- */
.hero-left {
  height: 100%;
  border-radius: 16px;
  overflow: hidden;
}

.hero-swiper {
  width: 100%;
  height: 100%;
  border-radius: 16px;
}

.hero-slide {
  position: relative;
  background-size: cover;
  background-position: center;
  background-color: var(--secondary);
  display: flex;
  align-items: flex-end;
}

.hero-slide-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.88) 0%,
    rgba(0, 0, 0, 0.35) 50%,
    transparent 100%
  );
  border-radius: 16px;
}

.hero-slide-content {
  position: relative;
  z-index: 1;
  padding: 32px;
  color: white;
}

.hero-slide-title {
  font-size: 26px;
  font-weight: 700;
  line-height: 1.25;
  margin: 10px 0 8px;
  color: white;
  transition: opacity 0.2s;
}

.hero-slide-title:hover {
  opacity: 0.85;
}

.hero-slide-excerpt {
  font-size: 14px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.82);
  margin-bottom: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hero-slide-meta {
  display: flex;
  gap: 18px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.75);
}

.hero-slide-meta span {
  display: flex;
  align-items: center;
  gap: 5px;
}

/* Paginação do carrossel hero */
.hero-pagination {
  bottom: 16px !important;
}

.hero-pagination .swiper-pagination-bullet {
  background: rgba(255, 255, 255, 0.5);
  opacity: 1;
  width: 8px;
  height: 8px;
  transition: all 0.3s;
}

.hero-pagination .swiper-pagination-bullet-active {
  background: white;
  width: 24px;
  border-radius: 4px;
}

/* Badge de categoria */
.hero-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: white;
  text-decoration: none;
}

.hero-badge--sm {
  font-size: 10px;
  padding: 3px 10px;
}

/* ---- DIREITA: 3 Cards estáticos ---- */
.hero-right {
  display: grid;
  grid-template-rows: 1fr 1fr;
  gap: 12px;
  height: 100%;
}

.hero-cards-top {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* Card base — background-image com overlay */
.hero-card {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  background-color: var(--secondary);
  display: flex;
  align-items: flex-end;
  text-decoration: none;
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease;
}

.hero-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
}

.hero-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.85) 0%,
    rgba(0, 0, 0, 0.2) 60%,
    transparent 100%
  );
}

.hero-card-content {
  position: relative;
  z-index: 1;
  padding: 16px;
  color: white;
  width: 100%;
}

.hero-card-title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  margin: 6px 0 8px;
  color: white;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hero-card-title--wide {
  font-size: 18px;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

.hero-card-meta {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.7);
}

/* Card largo (largura completa, linha de baixo) */
.hero-card--wide {
  width: 100%;
}

/* Estado vazio */
.hero-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-tertiary);
  border-radius: 16px;
  color: var(--text-muted);
  font-size: 14px;
  height: 100%;
}

/* ---- Responsivo ---- */
@media (max-width: 900px) {
  .hero-layout {
    grid-template-columns: 1fr;
    height: auto;
  }

  .hero-left {
    height: 380px;
  }

  .hero-right {
    height: auto;
    grid-template-rows: auto;
  }

  .hero-cards-top {
    grid-template-columns: 1fr 1fr;
  }

  .hero-card {
    min-height: 180px;
  }

  .hero-card--wide {
    min-height: 180px;
  }
}

@media (max-width: 480px) {
  .hero-cards-top {
    grid-template-columns: 1fr;
  }

  .hero-left {
    height: 300px;
  }
}

/* ==================== NEWS GRID ==================== */
.news-section {
  margin-bottom: 40px;
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}

.news-card {
  background: var(--bg-secondary);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
  border: 1px solid var(--border-color);
}

.news-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.news-card-image {
  width: 100%;
  height: 200px;
  overflow: hidden;
}

.news-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-base);
}

.news-card:hover .news-card-image img {
  transform: scale(1.05);
}

.news-card-content {
  padding: 20px;
}

.news-card-category {
  display: inline-block;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  border-radius: 6px;
  margin-bottom: 10px;
}

.news-card-title {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text-primary);
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-card-excerpt {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 16px;
}

.news-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
}

/* ==================== FOOTER ==================== */
.site-footer {
  background: var(--secondary);
  color: white;
  padding: 60px 0 0;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 40px;
}

.footer-brand {
  padding-right: 40px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.footer-tagline {
  color: var(--text-muted);
  font-size: 14px;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.footer-column h4 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 16px;
}

.footer-column a {
  display: block;
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 10px;
  transition: color var(--transition-fast);
}

.footer-column a:hover {
  color: white;
}

.footer-bottom {
  margin-top: 40px;
  padding: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
}

.footer-bottom p {
  font-size: 13px;
  color: var(--text-muted);
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 768px) {
  .swiper-slide {
    height: 300px;
  }

  .carousel-title {
    font-size: 20px;
  }

  .carousel-content {
    padding: 60px 20px 20px;
  }

  .news-grid {
    grid-template-columns: 1fr;
  }

  .footer-container {
    grid-template-columns: 1fr;
  }

  .footer-links {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .logo-text {
    display: none;
  }

  .footer-links {
    grid-template-columns: 1fr;
  }
}

/* ==================== UTILITIES ==================== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.text-center {
  text-align: center;
}

.mb-0 {
  margin-bottom: 0;
}
.mb-1 {
  margin-bottom: 8px;
}
.mb-2 {
  margin-bottom: 16px;
}
.mb-3 {
  margin-bottom: 24px;
}
.mb-4 {
  margin-bottom: 32px;
}

/* Placeholder image */
.placeholder-image {
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    var(--bg-tertiary) 0%,
    var(--border-color) 100%
  );
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 14px;
}

/* ==================== BREADCRUMB ==================== */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.breadcrumb a {
  color: var(--text-secondary);
  transition: color var(--transition-fast);
}

.breadcrumb a:hover {
  color: var(--primary);
}

.breadcrumb .separator {
  color: var(--text-muted);
}

.breadcrumb .current {
  color: var(--text-primary);
  font-weight: 500;
}

/* ==================== CATEGORY HEADER ==================== */
.category-header {
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border-color);
}

.category-title {
  font-size: 32px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.category-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

.category-description {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 8px;
}

.category-count {
  font-size: 14px;
  color: var(--text-muted);
}

/* ==================== PAGINATION ==================== */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--border-color);
}

.pagination-btn {
  padding: 10px 20px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  transition: all var(--transition-fast);
}

.pagination-btn:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

.pagination-numbers {
  display: flex;
  align-items: center;
  gap: 4px;
}

.pagination-num {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  transition: all var(--transition-fast);
}

.pagination-num:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.pagination-num.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

.pagination-dots {
  padding: 0 8px;
  color: var(--text-muted);
}

/* ==================== NO RESULTS ==================== */
.no-results {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
}

.no-results p {
  color: var(--text-secondary);
  font-size: 18px;
  margin-bottom: 20px;
}

.btn-back {
  display: inline-block;
  padding: 12px 24px;
  background: var(--primary);
  color: white;
  border-radius: 8px;
  font-weight: 500;
  transition: background var(--transition-fast);
}

.btn-back:hover {
  background: var(--primary-dark);
}

@media (max-width: 768px) {
  .category-title {
    font-size: 24px;
  }

  .pagination {
    flex-wrap: wrap;
  }

  .pagination-btn {
    order: 2;
    flex: 1;
    text-align: center;
  }

  .pagination-numbers {
    order: 1;
    width: 100%;
    justify-content: center;
    margin-bottom: 12px;
  }
}

/* ==================== ARTICLE PAGE ==================== */
.article {
  background: var(--bg-secondary);
  border-radius: 16px;
  padding: 40px;
  margin-bottom: 40px;
  border: 1px solid var(--border-color);
}

.article-header {
  margin-bottom: 32px;
}

.article-category {
  display: inline-block;
  padding: 6px 16px;
  color: white;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  border-radius: 6px;
  margin-bottom: 16px;
}

.article-title {
  font-size: 36px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.article-subtitle {
  font-size: 20px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 20px;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  font-size: 14px;
  color: var(--text-secondary);
}

.article-meta span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.article-meta svg {
  color: var(--text-muted);
}

/* Featured Image */
.article-featured-image {
  margin-bottom: 32px;
  border-radius: 12px;
  overflow: hidden;
}

.article-featured-image img {
  width: 100%;
  height: auto;
}

.article-featured-image figcaption {
  padding: 12px 0;
  font-size: 13px;
  color: var(--text-muted);
  font-style: italic;
  text-align: center;
}

/* Share Buttons */
.share-buttons {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 0;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--border-color);
}

.share-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
}

.share-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: white;
  transition: all var(--transition-fast);
  border: none;
  cursor: pointer;
}

.share-btn:hover {
  transform: scale(1.1);
}

.share-facebook {
  background: #1877f2;
}
.share-twitter {
  background: #000;
}
.share-whatsapp {
  background: #25d366;
}
.share-telegram {
  background: #0088cc;
}
.share-copy {
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
}

/* Article Content */
.article-content {
  font-size: 18px;
  line-height: 1.8;
  color: var(--text-primary);
}

.article-content p {
  margin-bottom: 20px;
}

.article-content h2 {
  font-size: 28px;
  font-weight: 700;
  margin: 32px 0 16px;
}

.article-content h3 {
  font-size: 22px;
  font-weight: 600;
  margin: 28px 0 14px;
}

.article-content img {
  max-width: 100%;
  border-radius: 8px;
  margin: 20px 0;
}

.article-content blockquote {
  border-left: 4px solid var(--primary);
  padding-left: 20px;
  margin: 24px 0;
  font-style: italic;
  color: var(--text-secondary);
}

.article-content ul,
.article-content ol {
  margin: 16px 0;
  padding-left: 24px;
}

.article-content li {
  margin-bottom: 8px;
}

/* Gallery */
.article-gallery {
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid var(--border-color);
}

.gallery-title,
.videos-title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 20px;
  color: var(--text-primary);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

.gallery-item {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 4/3;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-base);
}

.gallery-item:hover img {
  transform: scale(1.05);
}

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--transition-fast);
  color: white;
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

/* Videos */
.article-videos {
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid var(--border-color);
}

.videos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

/* Card individual de vídeo */
.video-item {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  transition: box-shadow var(--transition-fast);
}

.video-item:hover {
  box-shadow: var(--shadow-md);
}

/* Embed 16:9 para iframes (YouTube / Vimeo) */
.video-embed {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 */
  width: 100%;
  background: #000;
  border-radius: 12px 12px 0 0;
  overflow: hidden;
}

.video-embed iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* Vídeo nativo (upload local) — sem o padding-bottom trick */
.video-embed--native {
  position: static;
  padding-bottom: 0;
  border-radius: 12px 12px 0 0;
  overflow: hidden;
  background: #000;
  line-height: 0; /* remove espaço fantasma abaixo do <video> */
}

.video-embed--native video {
  width: 100%;
  height: auto;
  max-height: 480px;
  display: block;
  border-radius: 0;
}

/* Título do vídeo */
.video-title {
  padding: 10px 14px 12px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  line-height: 1.4;
  background: var(--bg-tertiary);
  margin: 0;
}

/* Tags */
.article-tags {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border-color);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.tags-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
}

.tag {
  padding: 6px 14px;
  background: var(--bg-tertiary);
  border-radius: 6px;
  font-size: 13px;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.tag:hover {
  background: var(--primary);
  color: white;
}

/* Related News */
.related-news {
  margin-top: 40px;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-base);
}

.lightbox.active {
  opacity: 1;
  visibility: visible;
}

.lightbox-image {
  max-width: 90%;
  max-height: 85vh;
  border-radius: 8px;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 50%;
  color: white;
  font-size: 30px;
  cursor: pointer;
  transition: background var(--transition-fast);
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 50%;
  color: white;
  font-size: 24px;
  cursor: pointer;
  transition: background var(--transition-fast);
}

.lightbox-prev {
  left: 20px;
}
.lightbox-next {
  right: 20px;
}

.lightbox-prev:hover,
.lightbox-next:hover {
  background: rgba(255, 255, 255, 0.2);
}

.lightbox-caption {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  color: white;
  font-size: 14px;
  text-align: center;
  max-width: 600px;
}

@media (max-width: 768px) {
  .article {
    padding: 24px;
  }

  .article-title {
    font-size: 26px;
  }

  .article-subtitle {
    font-size: 17px;
  }

  .article-meta {
    flex-direction: column;
    gap: 10px;
  }

  .article-content {
    font-size: 16px;
  }

  .videos-grid {
    grid-template-columns: 1fr;
  }

  .share-buttons {
    flex-wrap: wrap;
  }
}

/* ==================== SECTION TITLE COM BARRA AZUL ==================== */
.section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 20px;
}

.section-title .section-accent {
  display: inline-block;
  width: 5px;
  height: 22px;
  background: var(--primary);
  border-radius: 3px;
  flex-shrink: 0;
}

/* ==================== TRENDING / ÚLTIMAS NOTÍCIAS ==================== */
.trending-section {
  margin-bottom: 48px;
  padding-bottom: 8px;
}

/* Cabeçalho: título + botões de navegação */
.trending-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
}

.trending-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 0 !important;
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
}

.trending-accent {
  display: inline-block;
  width: 5px;
  height: 22px;
  background: var(--primary);
  border-radius: 3px;
  flex-shrink: 0;
}

/* Botões << | >> — maiores */
.trending-nav {
  display: flex;
  align-items: center;
  gap: 0;
  background: var(--primary);
  border-radius: 24px;
  overflow: hidden;
  padding: 3px 6px;
}

.trending-nav-btn {
  background: transparent;
  border: none;
  color: white;
  font-size: 13px;
  font-weight: 700;
  padding: 6px 12px;
  cursor: pointer;
  line-height: 1;
  transition: opacity var(--transition-fast);
  letter-spacing: -1px;
}

.trending-nav-btn:hover {
  opacity: 0.75;
}

.trending-nav-sep {
  color: rgba(255, 255, 255, 0.5);
  font-size: 14px;
  font-weight: 400;
  line-height: 1;
}

/* Slider: overflow escondido */
.trending-slider-wrap {
  overflow: hidden;
}

/* Track: uma linha, slider real via JS transform */
.trending-track {
  display: flex;
  flex-wrap: nowrap;
  gap: 24px;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

/* Card individual */
.trending-card {
  flex: 0 0 auto; /* largura definida via JS */
  display: flex;
  flex-direction: column;
  gap: 0;
  cursor: pointer;
}

/* Imagem do card */
.trending-card-img-link {
  display: block;
  text-decoration: none;
}

.trending-card-img {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: var(--bg-tertiary);
}

.trending-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform var(--transition-base);
}

.trending-card:hover .trending-card-img img {
  transform: scale(1.04);
}

.trending-card-img-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--bg-tertiary), var(--border-color));
}

/* Badge de categoria flutuante — à ESQUERDA, cor sólida como no hero */
.trending-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  right: auto;
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  color: white;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  white-space: nowrap;
  z-index: 2;
}

/* Conteúdo abaixo da imagem */
.trending-card-body {
  padding: 12px 2px 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Título */
.trending-card-title {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color var(--transition-fast);
  margin: 0;
}

.trending-card-title:hover {
  color: var(--primary);
}

/* Responsivo: Trending — sem necessidade de grid, flex sempre funciona */
@media (max-width: 560px) {
  .trending-header {
    flex-wrap: wrap;
    gap: 12px;
  }
}

/* ==================== NEWS CARD (compacto) ==================== */
.news-card .news-card-content {
  padding: 14px 16px 16px;
}

.news-card .news-card-title {
  font-size: 15px;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  margin-bottom: 0;
}

/* ==================== CATEGORY SECTION ==================== */
.cat-section {
  margin-bottom: 48px;
}

/* Cabeçalho: título + link "Ver todas" */
.cat-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-color);
}

.cat-section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.cat-section-accent {
  display: inline-block;
  width: 5px;
  height: 22px;
  border-radius: 3px;
  flex-shrink: 0;
}

.cat-section-more {
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  transition: opacity var(--transition-fast);
  white-space: nowrap;
}

.cat-section-more:hover {
  opacity: 0.75;
}

/* Corpo: 2 colunas — card grande (5fr) | lista de 3 cards (4fr) */
.cat-section-body {
  display: grid;
  grid-template-columns: 5fr 4fr;
  gap: 20px;
  align-items: stretch;
  margin-bottom: 20px;
}

/* antigo .cat-left — mantido para compatibilidade mas não usado no layout atual */
.cat-left {
  display: contents;
}


/* Card grande — coluna esquerda da .cat-section-body */
.cat-featured {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: 14px;
  overflow: hidden;
  text-decoration: none;
  background: var(--bg-tertiary);
  transition:
    transform var(--transition-fast),
    box-shadow var(--transition-fast);
}

.cat-featured:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.cat-featured-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  flex: 1;
  border-radius: 14px;
  transition: transform var(--transition-base);
}

.cat-featured:hover .cat-featured-img {
  transform: scale(1.04);
}

/* Badge absoluto no topo da imagem */
.cat-featured .cat-badge {
  position: absolute;
  top: 12px;
  left: 12px;
}

.cat-featured-body {
  padding: 14px 14px 16px;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
}

.cat-featured-title {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--text-primary);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color var(--transition-fast);
}

.cat-featured:hover .cat-featured-title {
  color: var(--primary);
}

/* Card médio — linha 4 da esquerda, mesmo tamanho de 1 card direita */
.cat-medium {
  grid-row: span 1;
  display: flex;
  gap: 12px;
  align-items: center;
  text-decoration: none;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  transition:
    transform var(--transition-fast),
    box-shadow var(--transition-fast);
}

.cat-medium:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.cat-medium-img {
  width: 100px;
  height: 100%;
  min-height: 80px;
  object-fit: cover;
  display: block;
  flex-shrink: 0;
  transition: transform var(--transition-base);
}

.cat-medium:hover .cat-medium-img {
  transform: scale(1.05);
}

.cat-medium-body {
  padding: 10px 12px 10px 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  min-width: 0;
}

.cat-medium-title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text-primary);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color var(--transition-fast);
}

.cat-medium:hover .cat-medium-title {
  color: var(--primary);
}

/* ---- LINHA BASE: 2 cards mini lado a lado ---- */
.cat-mini-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 4px;
}

.cat-mini {
  display: flex;
  gap: 14px;
  align-items: center;
  text-decoration: none;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  transition:
    transform var(--transition-fast),
    box-shadow var(--transition-fast);
}

.cat-mini:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.cat-mini-thumb {
  width: 110px;
  height: 90px;
  flex-shrink: 0;
  overflow: hidden;
  border-radius: 10px;
}

.cat-mini-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 10px;
  transition: transform var(--transition-base);
}

.cat-mini:hover .cat-mini-thumb img {
  transform: scale(1.06);
}

.cat-mini-body {
  padding: 8px 12px 8px 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1;
  min-width: 0;
}

.cat-mini-title {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text-primary);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color var(--transition-fast);
}

.cat-mini:hover .cat-mini-title {
  color: var(--primary);
}

/* ---- COLUNA DIREITA: 3 cards empilhados ---- */
.cat-right {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.cat-list-item {
  display: flex;
  gap: 14px;
  align-items: center;
  text-decoration: none;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  transition:
    transform var(--transition-fast),
    box-shadow var(--transition-fast);
}

.cat-list-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.cat-list-thumb {
  position: relative;
  width: 160px;
  height: 120px;
  flex-shrink: 0;
  overflow: hidden;
  border-radius: 10px;
}

.cat-list-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 10px;
  transition: transform var(--transition-base);
}

/* Badge de categoria posicionado sobre a imagem do card pequeno */
.cat-list-thumb .cat-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
}

.cat-list-item:hover .cat-list-thumb img {
  transform: scale(1.06);
}

.cat-list-body {
  padding: 10px 14px 10px 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  min-width: 0;
}

.cat-list-title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text-primary);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color var(--transition-fast);
}

.cat-list-item:hover .cat-list-title {
  color: var(--primary);
}

/* ---- Badge (reutilizado) ---- */
.cat-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 5px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: white;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}

/* --sm herda o mesmo tamanho visual do badge grande */
.cat-badge--sm {
  font-size: 10px;
  padding: 3px 10px;
}

/* Placeholder quando não há imagem */
.cat-img-placeholder {
  background: linear-gradient(135deg, var(--bg-tertiary), var(--border-color));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 12px;
  width: 100%;
  height: 100%;
}

/* ---- Responsividade ---- */
@media (max-width: 900px) {
  .cat-section-body {
    grid-template-columns: 1fr;
  }

  .cat-mini-row {
    grid-template-columns: 1fr;
  }

  .cat-featured {
    min-height: 280px;
  }

  .cat-featured-img {
    height: 220px;
  }
}

@media (max-width: 480px) {
  .cat-list-thumb {
    width: 90px;
    height: 80px;
  }

  .cat-medium-img {
    width: 80px;
  }
}

