/* Global resets */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* =========================
   MOBILE HEADER (3 linhas)
   ========================= */

.mobile-only{display:none;}

/* =====================================================
   COOKIES (MOBILE): usar o MESMO MODAL do desktop
   Ajustes de responsividade e rolagem (iOS-friendly)
   Colocado no final do arquivo para sempre prevalecer.
   ===================================================== */

@media (max-width: 900px){
  /* Mantém o modal centralizado com margens e sem encostar nas bordas */
  .modal-content.info-modal-content.cookie-modal-content,
  .cookie-modal-content{
    width: calc(100vw - 32px) !important;
    max-width: 520px !important;
    margin: 16px !important;
    padding: 0 !important;

    /* Evita ficar maior que a tela e garante rolagem interna */
    max-height: 85vh !important;
    max-height: 85dvh !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
  }

  /* Área de texto rola; ações ficam sempre acessíveis */
  .cookie-body{
    flex: 1 1 auto !important;
    overflow: auto !important;
    -webkit-overflow-scrolling: touch;
  }

  .cookie-actions{
    position: sticky;
    bottom: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: #ffffff;
    padding: 12px 1.1rem calc(12px + env(safe-area-inset-bottom));
    margin-top: 0 !important;
  }

  .cookie-actions .cookie-btn{
    width: 100% !important;
  }

  /* Garantia extra: não usar o banner simplificado no mobile */
  #cookieConsent{ display: none !important; }
}

@media (max-width: 900px){
  .mobile-only{display:block;}

  /* Linha 1: mantém identidade, simplifica */
  .header-inner{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
  }

  .header-date{display:none;}

  /* Esconde o menu mobile antigo (linha 1) e o menu horizontal tradicional */
  #mobileMenuBtn{display:none;}
  .nav-bar{display:none;}

  /* Linha 2: busca + hamburger */
  .mobile-header-row2{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
  }

  .mobile-search{
    flex:1;
  }

  .mobile-search input{
    width:100%;
  }

  .mobile-menu-btn-row2{
    flex:0 0 auto;
    width:44px;
    height:44px;
    border-radius:12px;
    border:1px solid rgba(255,255,255,.18);
    background:#0b2a4a;
    display:inline-flex;
    align-items:center;
    justify-content:center;
  }

  /* Linha 3: ticker minimalista */
  .mobile-ticker{
    background:#0c1b33;
    border-top:1px solid rgba(255,255,255,.10);
    border-bottom:1px solid rgba(255,255,255,.10);
    padding:8px 0;
  }

  .mobile-ticker-inner{
    display:flex;
    align-items:center;
  gap:10px;
    font-size:13px;
    color:#fff;
  }

  .mobile-ticker-label{
    font-weight:800;
    color:#f7c600;
    white-space:nowrap;
  }

  .mobile-ticker-track{
    position:relative;
    overflow:hidden;
    flex:1;
  }

/* Menu button that lives on the BREAKING line (mobile only) */
.mobile-menu-btn-row2{
  flex:0 0 auto;
  margin-left: auto;
}

  .mobile-ticker-content{
    display:inline-block;
    white-space:nowrap;
    will-change:transform;
    animation: geTickerMove 18s linear infinite;
  }

  @keyframes geTickerMove{
    0%{transform:translateX(100%);} 
    100%{transform:translateX(-100%);} 
  }

  /* Remove elementos extras do Breaking News antigo no mobile */
  .breaking-bar{display:none;}
  /* o site usa uma seção "breaking" com redes sociais ... */
  .breaking{display:none !important;}

  /* Ajusta o topo para ficar limpo */
  .header{position:sticky; top:0; z-index:1200;}
  .mobile-ticker{position:sticky; top: var(--ge-header-h); z-index:1190;}

  /* Cookie modal: garante botões visíveis sem precisar rolar até o fim */
  .cookie-modal-content{
    /* Mobile: manter o modal de cookies centralizado, sem encostar nas bordas (mesma lógica do desktop) */
    width: calc(100vw - 32px);
    max-width: 520px;
    margin: 16px;

    max-height:85vh;
    overflow:hidden;
    display:flex;
    flex-direction:column;
  }
  .cookie-body{
    flex:1;
    overflow:auto;
  }
  .cookie-actions{
    position:sticky;
    bottom:0;
    display:flex;
    flex-direction:column;
    gap:10px;
    background:#ffffff;
    padding-top:12px;
  }
.cookie-actions button{width:100%;}
}

/* =========================
   POST PAGE
   ========================= */
.post-article{
  background:#ffffff;
  border-radius:16px;
  padding:2rem;
  box-shadow:0 12px 30px rgba(15, 23, 42, 0.08);
}

.post-back{
  display:inline-flex;
  align-items:center;
  gap:0.5rem;
  text-decoration:none;
  color:#0f172a;
  font-weight:600;
  margin-bottom:1rem;
}

.post-back:hover{ color:#1d4ed8; }

.post-badges{
  display:flex;
  flex-wrap:wrap;
  gap:0.5rem;
  margin-bottom:1rem;
}

.post-badge{
  background:#0f172a;
  color:#ffffff;
  font-size:0.7rem;
  letter-spacing:0.06em;
  padding:0.35rem 0.6rem;
  border-radius:999px;
  text-transform:uppercase;
  font-weight:700;
}

.post-badge-muted{
  background:#e2e8f0;
  color:#0f172a;
}

.post-badge-urgent{
  background:#dc2626;
}

.post-title{
  font-size:2rem;
  line-height:1.2;
  color:#0f172a;
  margin-bottom:0.75rem;
}

.post-excerpt{
  font-size:1.05rem;
  color:#475569;
  margin-bottom:1rem;
}

.post-meta{
  display:flex;
  flex-wrap:wrap;
  gap:1rem;
  color:#64748b;
  font-size:0.9rem;
  margin-bottom:1.25rem;
}

.post-hero{
  margin:1.5rem 0;
}

.post-image{
  width:100%;
  height:auto;
  border-radius:14px;
  display:block;
}

.post-content{
  font-size:1.05rem;
  color:#1e293b;
}

.post-content p{
  margin-bottom:1rem;
  line-height:1.7;
}

.post-source{
  margin-top:1.5rem;
  font-size:0.9rem;
  color:#64748b;
}

.post-source a{
  color:#1d4ed8;
  text-decoration:none;
}

.post-source a:hover{
  text-decoration:underline;
}

.post-error{
  margin-top:1.5rem;
  background:#fee2e2;
  color:#991b1b;
  border:1px solid #fecaca;
  padding:1rem;
  border-radius:12px;
  font-weight:600;
}

@media (max-width: 900px){
  .post-article{
    padding:1.25rem;
    border-radius:12px;
  }

  .post-title{
    font-size:1.6rem;
  }
}


body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.5;
  background-color: #f8fafc;
  color: #1e293b;
}

/* =========================
   SAFE ZONE (gutter único)
   ========================= */
:root{
  --ge-gutter: 16px;
  --ge-header-h: 78px; /* sticky offset do ticker no mobile */
}

@media (max-width: 900px){
  :root{ --ge-gutter: 12px; --ge-header-h: 78px; }
}

/* Utility container to center content */

/* Desktop vs Mobile visibility */
.nav-search-wrap { display: flex; }
@media (max-width: 900px) {
  /* Mobile: show drawer topbar */
  .nav-topbar{ display:flex; }

  .nav-search-wrap { display: none; }
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding-left: var(--ge-gutter);
  padding-right: var(--ge-gutter);
}

/* Top bar styling */
.top-bar {
  background-color: #0f172a;
  color: #cbd5e1;
  font-size: 0.75rem;
}

.top-bar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
}

.status-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.status-text {
  font-weight: 600;
  color: #fbbf24;
  text-transform: uppercase;
}

.status-right a {
  margin-left: 1rem;
  color: #cbd5e1;
  text-decoration: none;
  font-weight: 500;
}

.status-right a:hover {
  color: #f8fafc;
  text-decoration: underline;
}

/* Header */
/* Header styles */
.header {
  background-color: #172a45;
  color: #f8fafc;
  border-bottom: 2px solid #fbbf24;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
}

/* Logo block with image and text */
.logo-block {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-image {
  /* Increase logo size slightly */
  width: 3.5rem;
  height: 3.5rem;
  object-fit: contain;
}

/* Ensure the logo link does not inherit underline and keeps colours */
.logo-link {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: inherit;
}

.logo-text-block h1 {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: 0.05em;
}

.logo-text-block h2 {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.3em;
  color: #fbbf24;
}

/* Right side of header: status/time and login/user info */
.header-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.status-time {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  font-size: 0.75rem;
  line-height: 1.2;
}

.status-label {
  font-weight: 700;
  text-transform: uppercase;
  margin-right: 0.25rem;
}

.status-value {
  color: #fbbf24;
  font-weight: 700;
}

.date-text {
  color: #cbd5e1;
  font-size: 0.75rem;
}

.login-btn {
  background-color: #fbbf24;
  color: #172a45;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  font-weight: 700;
  cursor: pointer;
  font-size: 0.875rem;
}

.login-btn:hover {
  background-color: #eab308;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.user-info .user-email {
  font-size: 0.875rem;
  font-weight: 600;
}

.logout-btn {
  background: none;
  border: none;
  color: #ef4444;
  font-size: 0.75rem;
  cursor: pointer;
  font-weight: 600;
}

.logout-btn:hover {
  text-decoration: underline;
}

/* Navigation */
/* Main navigation bar */
.main-nav {
  background-color: #0f172a;
  color: #cbd5e1;
  border-bottom: 2px solid #fbbf24;
}

/* Desktop: manter o menu de temas acompanhando o leitor ao rolar a página */
@media (min-width: 901px) {
  /* Linha 1 (logo + entrar) fixa no topo no DESKTOP */
  .header{
    position: sticky;
    top: 0;
    z-index: 1300;
  }

  .main-nav {
    position: sticky;
    /*
      Fica colado logo abaixo do header (que tambem eh sticky).
      Se o top for 0, o menu "gruda" por tras do header e parece que nao acompanha.
      A variavel eh atualizada via JS para refletir a altura real do header.
    */
    top: var(--ge-header-h-desktop, 78px);
    z-index: 1100;
  }
}

/* Layout of navigation: categories centered with search to the right */
/* Layout of navigation: use grid to center categories and align search to the right */
/* Use flexbox for the navigation layout */
.main-nav .nav-inner {
  display: flex;
  align-items: center;
  /* horizontal padding vem do .container (safe zone) */
  padding: 0.5rem 0;
}

/* Drawer topbar (mobile): search + close button */
.nav-topbar{
  display:none;
  align-items:center;
  gap:10px;
  width:100%;
}

.nav-topbar .drawer-search{
  flex:1;
}

/* Drawer footer links (mobile): mirrors the desktop footer modals */
.nav-footer-links{
  display:flex;
  flex-direction:column;
  gap:12px;
  padding-top:16px;
  margin-top:8px;
  border-top:1px solid rgba(148,163,184,0.25);
}

.nav-footer-links a{
  color:#cbd5e1;
  text-decoration:none;
  /* Diferenciar dos itens principais: sem negrito e sem caixa alta */
  font-weight:400;
  text-transform:none;
  letter-spacing:0;
}

.nav-footer-links a:hover{ color:#fbbf24; }

/* Container for categories to center them horizontally */
/* Desktop: categorias ficam centralizadas na barra; o drawer é o .main-nav no mobile */
.categories-container{
  flex: 1;
  display: flex;
  justify-content: flex-start;
}

/* Desktop: force categories to start exactly at the container edge (align with BREAKING tag border) */
@media (min-width: 901px){
  .main-nav .categories-container{
    padding-left: 0 !important;
    margin-left: 0 !important;
  }
  .main-nav .categories{
    padding-left: 0 !important;
    margin-left: 0 !important;
  }
}


/* Categories list */
.categories {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
  /* Center the categories horizontally within the container */
  /* Center categories via the container rather than auto margins */
  /* Increase font size slightly for better legibility */
  /* Increase size of top navigation items for better visibility */
  font-size: 1.125rem;
  font-weight: 700;
  text-transform: uppercase;
}

.categories .category {
  position: relative;
  cursor: pointer;
  color: #cbd5e1;
  transition: color 0.2s ease;
}

.categories .category:hover {
  color: #fbbf24;
}

.categories .category.active {
  color: #fbbf24;
}

/* Submenu styling */
/*
 * Drop‑down submenus should appear directly beneath their parent
 * category without any gap.  A small margin between the parent and
 * submenu makes it easy to accidentally leave the hover area when
 * moving the cursor from the parent into the submenu, causing the
 * menu to disappear.  To avoid this, we position the submenu at
 * exactly 100% below the parent element with no extra offset.
 */
.submenu {
  display: none;
  position: absolute;
  left: 0;
  top: 100%;
  background-color: #172a45;
  border: 1px solid #1e3a5f;
  border-radius: 0.375rem;
  padding: 0.5rem 0;
  list-style: none;
  min-width: 200px;
  z-index: 1000;
}

.submenu li {
  padding: 0.5rem 1rem;
  font-size: 0.75rem;
  color: #cbd5e1;
  white-space: nowrap;
  cursor: pointer;
}

.submenu li:hover {
  background-color: #223e6a;
  color: #fbbf24;
}

/* Show submenu on hover */
/* Keep submenu open when hovering over it or focusing within the parent */
.category.has-submenu:hover > .submenu,
.category.has-submenu:focus-within > .submenu,
.submenu:hover {
  display: block;
}

/* Navigation search */
.nav-search {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-left: 0;
}

.nav-search input {
  background-color: #1e293b;
  color: #f8fafc;
  border: 1px solid #334155;
  border-radius: 0.375rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  width: 12rem;
}

.nav-search-btn {
  background-color: #fbbf24;
  color: #172a45;
  border: none;
  padding: 0.5rem 0.75rem;
  border-radius: 0.375rem;
  cursor: pointer;
  font-size: 0.875rem;
  line-height: 1;
}

.nav-search-btn:hover {
  background-color: #eab308;
}

/* Breaking ticker */
.breaking {
  background-color: #0f172a;
  color: #f8fafc;
  /* Increase base font-size slightly to improve readability of the breaking bar */
  font-size: 0.875rem;
}

.breaking-inner {
  display: flex;
  align-items: stretch;
  overflow: hidden;
}

.breaking-tag {
  display: flex;
  align-items: center;
  background-color: #fbbf24;
  color: #172a45;
  padding: 0.5rem 1rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  /* Increase font size slightly for the BREAKING NEWS label without exceeding nav size */
  font-size: 1rem;

  /* Animate the background color to flash between yellow and red for urgency */
  animation: breakingFlash 0.6s linear infinite;
}

.breaking-tag .lightning {
  margin-right: 0.25rem;
  font-size: 1rem;
}

/* Breaking ticker now has space for social icons on the right */
.breaking-ticker {
  display: flex;
  align-items: center;
  /* Align content to start so arrows and title sit together */
  justify-content: flex-start;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background-color: #0f172a;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
}

.breaking-time {
  color: #fbbf24;
  font-weight: 700;
  border: 1px solid #fbbf24;
  padding: 0.125rem 0.5rem;
  border-radius: 0.25rem;
}

.breaking-urgent {
  color: #ef4444;
  font-weight: 800;
  text-transform: uppercase;
}

/* The breaking news headline becomes red and clickable */
.breaking-title {
  font-weight: 700;
  /* Make the headline slightly larger for better readability */
  font-size: 1.125rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  color: #ef4444;
  /* Flex behaviour overridden in wrapper section */
  /* flex-grow removed here to avoid pushing the next arrow to the far right */
}

/* Container for social icons in the breaking bar */
.social-icons {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
}

/* Footer socials should align under the footer text, not push to the far right */
.footer-social-icons {
  margin-left: 0;
  margin-top: 1rem;
}

.social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  /* Increase icon size for better visibility */
  /* Slightly smaller icons as requested */
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 0.375rem;
  padding: 0;
  /* Ensure icons inherit white color from the breaking bar */
  color: #f8fafc;
  text-decoration: none;
}

/* Ensure embedded social icon images scale down and invert to white on dark background */
.social-icon img,
.social-icon-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  /* Ensure PNG icons (if any remain) invert to white and stay bright */
  filter: invert(1) brightness(2);
}

/* Preserve white colour for visited social links */
.social-icon:visited {
  color: #f8fafc;
}

.social-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* Breaking news navigation controls */
.breaking-prev,
.breaking-next {
  background: none;
  border: none;
  color: #fbbf24;
  /* Make arrow controls larger and easier to see */
  font-size: 1.5rem;
  font-weight: 800;
  cursor: pointer;
  padding: 0 0.5rem;
  line-height: 1;
}
.breaking-prev {
  background: none;
  border: none;
  color: #fbbf24;
  font-size: 1.5rem;
  font-weight: 800;
  cursor: pointer;
  padding: 0 0.5rem;
  line-height: 1;
}
.breaking-prev:hover,
.breaking-next:hover {
  color: #eab308;
}

/* Filters bar */
.filters {
  background-color: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  font-size: 0.875rem;
  color: #334155;
}

.filters-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 0;
}

.filters-label {
  font-weight: 700;
  color: #0f172a;
  margin-right: 0.75rem;
}

.filter-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.filter-item label {
  color: #64748b;
  font-weight: 500;
}

.filter-item select,
.filter-item input[type="text"],
.filter-item input[type="date"] {
  border: 1px solid #e2e8f0;
  border-radius: 0.375rem;
  padding: 0.25rem 0.5rem;
  font-size: 0.875rem;
  background-color: #f8fafc;
}

.filter-item input[type="date"] {
  padding: 0.25rem 0.5rem;
}

.chips {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
}

.chip {
  background-color: #f1f5f9;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #0f172a;
}

/* Chip ativa indica que o filtro está aplicado */
.chip.active {
  background-color: #fbbf24;
  color: #172a45;
}

.clear-btn {
  background: none;
  border: none;
  color: #ef4444;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
}

.clear-btn:hover {
  text-decoration: underline;
}

/* Main content layout */
.main-content {
  padding: 2rem 0;
}

.feed-layout {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* Container for dynamically rendered feed items */
.feed-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

@media (min-width: 1024px) {
  .feed-layout {
    flex-direction: row;
    align-items: flex-start;
  }
}

.feed-column {
  flex: 1;
}

.feed-title {
  font-size: 1.875rem;
  font-weight: 800;
  margin-bottom: 0.25rem;
  color: #0f172a;
}

.feed-update {
  font-size: 0.75rem;
  color: #64748b;
  font-weight: 600;
  margin-bottom: 1.5rem;
}

.feed-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  overflow: hidden;
  background-color: #ffffff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  margin-bottom: 1.5rem;
}

.feed-card:last-of-type {
  margin-bottom: 0;
}

.card-image {
  background-size: cover;
  background-position: center;
  width: 100%;
  height: 180px;
}

@media (min-width: 768px) {
  .feed-card {
    flex-direction: row;
    min-height: 180px;
  }
  .card-image {
    flex: 0 0 240px;
    width: 240px;
    min-height: 180px;
    height: auto;
  }
}

.card-content {
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 0.4rem;
  flex: 1;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: #64748b;
  text-transform: uppercase;
  font-weight: 600;
}

.card-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0.35rem 0;
  line-height: 1.3;
}

.card-excerpt {
  font-size: 0.875rem;
  color: #334155;
  line-height: 1.4;
  margin: 0;
}

.card-author {
  font-size: 0.75rem;
  font-weight: 600;
  color: #475569;
  margin-top: 0.35rem;
}

.card-badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  background-color: #fbbf24;
  color: #172a45;
  padding: 0.25rem 0.75rem;
  font-size: 0.625rem;
  font-weight: 800;
  border-radius: 0.25rem;
  text-transform: uppercase;
}

/* ----- Destaques do topo ----- */
.top-highlights {
  display: grid;
  gap: 1rem;
  margin-bottom: 2rem;
}

/* Layout responsivo: em telas médias e maiores, usa duas colunas para destacar a primeira notícia */
@media (min-width: 768px) {
  .top-highlights {
    grid-template-columns: 2fr 1fr;
    /* três linhas para as notícias menores; a grande irá ocupar todas */
    grid-template-rows: repeat(3, 1fr);
    gap: 1rem;
  }
  /* Permite que a primeira notícia ocupe todas as três linhas da primeira coluna */
  .top-highlights .highlight-card.large {
    grid-row: span 3;
    /* altura fixa para evitar colapso caso a imagem não carregue */
    height: 420px;
  }
  /* Notícias menores têm altura fixa em telas maiores */
  .top-highlights .highlight-card.small {
    height: 130px;
  }
}

/* Card de destaque genérico */
.highlight-card {
  position: relative;
  border-radius: 0.5rem;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  cursor: pointer;
}

/* Definições de altura padrão para telas menores */
.highlight-card.large {
  height: 280px;
}
.highlight-card.small {
  height: 160px;
}

/* Sobreposição escura com gradiente para destacar textos */
.highlight-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1rem;
  background: linear-gradient(to top, rgba(15, 23, 42, 0.85), rgba(15, 23, 42, 0.2) 60%, rgba(15, 23, 42, 0));
  color: #f8fafc;
}

.highlight-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.highlight-category {
  background-color: #fbbf24;
  color: #172a45;
  padding: 0.15rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.625rem;
  font-weight: 800;
}

.highlight-time {
  color: #f8fafc;
  font-weight: 600;
}

.highlight-title {
  margin-top: 0.5rem;
  font-weight: 800;
  line-height: 1.3;
  color: #f8fafc;
}

/* Tamanhos diferentes de título */
.highlight-card.large .highlight-title {
  font-size: 1.5rem;
}
.highlight-card.small .highlight-title {
  font-size: 0.875rem;
}

/* ----- Paginação ----- */
.pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
}
.page-btn {
  background-color: #f1f5f9;
  color: #0f172a;
  border: 1px solid #e2e8f0;
  border-radius: 0.375rem;
  padding: 0.25rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.2s;
}
.page-btn:hover {
  background-color: #e2e8f0;
}
.page-btn.active {
  background-color: #0f172a;
  border-color: #0f172a;
  color: #f8fafc;
}

/* Sidebar */
.sidebar-column {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  /* Empurra a sidebar para baixo para alinhar seu topo com o início da lista de notícias (após o título e atualização) */
  /* Empurra a sidebar para baixo para alinhar seu topo com o início da lista de notícias (após o título e atualização).
     Ajuste conforme necessário para manter alinhamento consistente. */
  margin-top: 7rem;
}

@media (min-width: 1024px) {
  .sidebar-column {
    width: 320px;
  }
}

.markets-widget {
  background-color: #172a45;
  color: #f8fafc;
  border-radius: 0.5rem;
  overflow: hidden;
}

.markets-header {
  background-color: #0f172a;
  color: #fbbf24;
  font-weight: 800;
  font-size: 0.875rem;
  letter-spacing: 0.05em;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #223e6a;
}

.markets-title-icon {
  margin-right: 0.5rem;
  font-size: 0.95rem;
  vertical-align: -1px;
}

.markets-list {
  list-style: none;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* Caption indicating real‑time updates and last refresh time in the markets widget */
.markets-update {
  font-size: 0.75rem;
  color: #94a3b8;
  padding: 0 1rem 0.5rem;
}

/* Each market item fills the width of the container and is clickable */
.markets-list li {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  column-gap: 14px;
  font-size: 0.875rem;
  padding: 0.35rem 0;
  cursor: pointer;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}


/* Remove bottom border on last item */
.markets-list li:last-child {
  border-bottom: none;
}

/* Hover state for market items for better interactivity */
.markets-list li:hover {
  background-color: rgba(255, 255, 255, 0.05);
}

/* Display for indicator modal body */
.indicator-modal-body {
  padding: 1rem 0;
}

/* Section headings inside the indicator modal */
.modal-section-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #64748b;
  margin-top: 0.75rem;
  margin-bottom: 0.25rem;
}

/* Impact text emphasises the dynamic insight */
.indicator-impact {
  font-size: 0.875rem;
  font-weight: 600;
  color: #172a45;
}

/* Currency symbols appear slightly smaller and less prominent */
.currency-symbol {
  font-size: 1em;
  opacity: 1;
}

/* Micro indicator text ("Alta no dia", etc.) */
.micro-indicator {
  font-size: 0.7rem;
  margin-left: 0.25rem;
  color: #94a3b8;
  white-space: nowrap;
}

/* Alert style for market items when thresholds are exceeded */
.market-item-alert {
  position: relative;
}
.market-item-alert::after {
  content: '';
  position: absolute;
  top: -0.125rem;
  left: -0.5rem;
  right: -0.5rem;
  bottom: -0.125rem;
  border-radius: 0.25rem;
  box-shadow: 0 0 8px rgba(252, 211, 77, 0.6);
  pointer-events: none;
}

/* Title in indicator modal */
.indicator-title {
  font-size: 1.125rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  color: #7ED957;
}

/* Seções do modal (títulos em preto e negrito) */
.modal-section-title {
  margin-top: 1rem;
  margin-bottom: 0.35rem;
  font-size: 0.85rem;
  color: #000000;
  font-weight: 700;
}

/* Textos do modal (descrições em preto e sem negrito) */
.indicator-modal-body p {
  color: #000000;
  font-weight: 400;
}

.indicator-description,
.indicator-importance,
.indicator-impact {
  font-size: 0.875rem;
  margin-bottom: 0.75rem;
  color: #000000;
  font-weight: 400;
}

/* Adjust modal width for indicator explanations */
.indicator-modal-content {
  max-width: 480px;
}


.market-label {
  color: #cbd5e1;
}

.market-value {
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.market-value.up {
  color: #34d399;
}

.market-value.down {
  color: #f87171;
}

.market-value.flat {
  color: #cbd5e1;
}

.trending-widget {
  background-color: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  overflow: hidden;
  color: #0f172a;
}

.trending-header {
  background-color: #f1f5f9;
  color: #0f172a;
  font-weight: 800;
  font-size: 0.875rem;
  letter-spacing: 0.05em;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #e2e8f0;
}

.trending-list {
  list-style: none;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.875rem;
}

.trending-list li {
  display: flex;
  align-items: center;
  font-weight: 600;
}

.trending-list li::before {
  content: '#';
  margin-right: 0.5rem;
  font-weight: 900;
  color: #fbbf24;
}

/* ===== Authentication Modal ===== */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2000;
}

/* Hidden utility class to hide modal and user info */
.hidden {
  display: none !important;
}

.modal-content {
  background-color: #ffffff;
  color: #0f172a;
  border-radius: 0.5rem;
  padding: 2rem;
  width: 90%;
  max-width: 400px;
  position: relative;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.modal-close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 2.25rem;
  height: 2.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #cbd5e1;
  border-radius: 0.375rem;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  color: #475569;
}

.modal-close:hover {
  background: #ffffff;
}

/* Authentication tabs: modern segmented control style */
/* Container for authentication tabs - styled as a modern segmented control */
.auth-tabs {
  display: flex;
  margin-bottom: 1rem;
  background-color: #e2e8f0;
  border-radius: 9999px;
  overflow: hidden;
  /* subtle border to match theme */
  box-shadow: inset 0 0 0 1px #172a45;
}

/* Individual tab */
.auth-tabs .tab {
  flex: 1;
  text-align: center;
  padding: 0.5rem 0;
  font-weight: 600;
  cursor: pointer;
  background-color: transparent;
  color: #172a45;
  border: none;
  transition: background-color 0.2s ease, color 0.2s ease;
}

/* Hover effect for inactive tabs */
.auth-tabs .tab:not(.active):hover {
  background-color: #cbd5e1;
}

/* Active tab styling */
.auth-tabs .tab.active {
  background-color: #172a45;
  color: #f8fafc;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.auth-form label {
  font-size: 0.875rem;
  font-weight: 600;
  color: #334155;
}

.auth-form input[type="email"],
.auth-form input[type="password"] {
  border: 1px solid #cbd5e1;
  border-radius: 0.375rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  color: #172a45;
}

.subscribe-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: #334155;
}

.auth-submit {
  background-color: #172a45;
  color: #f8fafc;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  font-weight: 700;
  cursor: pointer;
  margin-top: 0.5rem;
}

.auth-submit:hover {
  background-color: #0f172a;
}

/* Styling for the logo inside the authentication modal */
.modal-logo-block {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  justify-content: center;
  /* Remove margin-bottom here; spacing will be handled by the wrapper strip */
  margin-bottom: 0;
}

/* Blue strip behind the logo in authentication modal */
.modal-logo-strip {
  /* Use the same dark blue as the header for consistency */
  background-color: #172a45;
  /* Extend the background to the edges of the modal content by using negative margins equal to the modal padding */
  margin: -2rem -2rem 1rem;
  padding: 1rem 2rem;
  border-radius: 0.5rem 0.5rem 0 0;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* ===== Fix: Footer (institutional) modals keep their original dimensions (.info-modal-content)
   but use the SAME header behavior as the Login modal without cutting the logo. ===== */
.info-modal-content .modal-logo-strip {
  /* In .modal-content we use negative margins because the container has padding.
     In .info-modal-content the container has padding: 0 and overflow: hidden, so negative margins would cut the header/logo.
     Keep everything inside the modal box. */
  margin: 0;
  padding: 1rem 2rem;
  border-radius: 0.5rem 0.5rem 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.info-modal-content .modal-logo-block {
  /* Keep the logo perfectly centered without extra offsets */
  justify-content: center;
  margin: 0;
}

.info-modal-content .modal-logo-block .logo-image {
  /* Guarantee the logo never crops inside the header */
  object-fit: contain;
  width: 3rem;
  height: 3rem;
  max-height: 100%;
}

/* Ensure the modal's logo image is slightly smaller than the header logo */
.modal-logo-block .logo-image {
  width: 3rem;
  height: 3rem;
  object-fit: contain;
}

/* Adjust text sizing for logo inside modal */
.modal-logo-block .logo-text-block h1 {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  /* Set the brand name colour to white inside the authentication modal */
  color: #f8fafc;
}

.modal-logo-block .logo-text-block h2 {
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.3em;
  color: #fbbf24;
}


/* Shared styles for content blocks inside the standard modal-content (used by Login and all footer modals) */
.modal-title {
  margin: 0 0 1rem 0;
  font-size: 1.25rem;
  color: #0f172a;
}

.modal-body {
  overflow: auto;
  max-height: calc(85vh - 220px);
}

.modal-body p {
  margin: 0.75rem 0;
  color: #0f172a;
  line-height: 1.6;
}

.modal-subtitle {
  margin-top: 1.25rem;
  margin-bottom: 0.5rem;
  color: #0f172a;
  font-size: 1rem;
}

/* ------------------------------------------------------------------ */
/* Breaking ticker adjustments                                         */
/* Wraps the breaking title and next arrow together to keep the arrow */
/* close to the headline rather than pushing it to the far edge.       */
.breaking-title-wrapper {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  overflow: hidden;
}

/* Do not allow the headline to consume all available space */
.breaking-title {
  flex: 1 1 auto;
}

/* Flash animation for the Breaking News label */
@keyframes breakingFlash {
  0%, 100% {
    background-color: #fbbf24;
  }
  50% {
    background-color: #dc2626;
  }
}

/* Mercados Estratégicos: preço alinhado à direita */
.market-value {
  justify-self: end;
  text-align: right;
}


/* ===== Footer (added) ===== */
.site-footer {
  background-color: #0f172a;
  color: #cbd5e1;
  border-top: 2px solid #fbbf24;
  margin-top: 2.5rem;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 1.75rem;
  padding: 2.5rem 0;
}


.footer-logo-block {
  margin-bottom: 1.25rem;
}

.footer-text {
  font-size: 0.95rem;
  color: #cbd5e1;
  opacity: 0.95;
  margin-bottom: 0.9rem;
  max-width: 58ch;
}

.footer-text-strong{font-weight:normal;}

.footer-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 3rem;
  row-gap: 2rem;
  align-content: start;
  justify-self: start;
}

.footer-col-wide {
  grid-column: 1 / -1;
}


.footer-title {
  font-size: 1rem;
  color: #ffffff;
  font-weight: 700;
  margin-bottom: 0.85rem;
  letter-spacing: 0.2px;
}

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

.footer-links li {
  margin: 0.55rem 0;
}

.footer-link {
  color: #cbd5e1;
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.15s ease, opacity 0.15s ease;
}

.footer-link:hover {
  color: #fbbf24;
}

.footer-email {
  display: inline-block;
  margin-top: 0.1rem;
  word-break: break-word;
}

.footer-bottom {
  border-top: 1px solid rgba(203, 213, 225, 0.16);
  padding: 1rem 0;
}

.footer-bottom-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.footer-copy {
  font-size: 0.9rem;
  color: #94a3b8;
}

/* Responsive footer */
@media (max-width: 900px) {
  .footer-inner {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 2rem 0;
  }

  .footer-text {
    max-width: none;
  }
}


.footer-logo-link {
  display: inline-flex;
  text-decoration: none;
}

.footer-logo-block {
  align-items: center;
}

.footer-logo-image {
  display: block;
  width: 3.5rem;
  height: 3.5rem;
  object-fit: contain;
  margin: 0;
}

.site-footer .footer-logo-text-block h1 {
  color: #f8fafc;
}

@media (max-width: 900px) {
  .footer-logo-image {
    width: 3.5rem;
    height: 3.5rem;
  }
}


/* ===== Institutional Modals & Forms ===== */
.info-modal-content {
  max-width: 860px;
  width: min(860px, 92vw);
  max-height: 85vh;
  overflow: hidden;
  padding: 0;
}

.info-modal-content .modal-title {
  padding: 1.25rem 1.25rem 0.75rem 1.25rem;
  font-size: 1.25rem;
  color: #0f172a;
}

.info-modal-content .modal-body {
  padding: 0 1.25rem 2rem 1.25rem;
  overflow: auto;
  max-height: calc(85vh - 120px);
}

.info-modal-content .modal-body p {
  margin: 0.75rem 0;
  color: #0f172a;
  line-height: 1.6;
}

.info-modal-content .modal-subtitle {
  margin-top: 1.25rem;
  margin-bottom: 0.5rem;
  color: #0f172a;
  font-size: 1rem;
}

.form {
  margin-top: 1rem;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9rem;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.form-field-wide {
  grid-column: 1 / -1;
}

.form label {
  font-size: 0.9rem;
  font-weight: 600;
  color: #0f172a;
}

.form input,
.form textarea {
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 0.7rem 0.8rem;
  font-size: 0.95rem;
  outline: none;
}

.form input:focus,
.form textarea:focus {
  border-color: #fbbf24;
  box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.25);
}

.form-hint {
  color: #475569;
  font-size: 0.8rem;
}

.form-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
}

.btn-primary,
.btn-secondary {
  border-radius: 12px;
  padding: 0.75rem 1rem;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid transparent;
}

.btn-primary {
  background: #fbbf24;
  color: #0f172a;
}

.btn-primary:hover {
  opacity: 0.92;
}

.btn-secondary {
  background: transparent;
  border-color: #cbd5e1;
  color: #0f172a;
}

.btn-secondary:hover {
  background: rgba(15, 23, 42, 0.06);
}

.form-feedback {
  margin-top: 0.9rem;
  font-weight: 700;
}

.form-feedback.success {
  color: #166534;
}

.form-feedback.error {
  color: #b91c1c;
}

@media (max-width: 720px) {
  .footer-inner {
    grid-template-columns: 1fr;
  }
  .footer-columns {
    grid-template-columns: 1fr;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
}


/* === Fix: impedir cursor piscando em textos comuns === */
/* Esconde o caret em textos comuns (inclui Caret Browsing do navegador) */
body{caret-color:transparent;}
body, p, span, h1, h2, h3, h4, h5, h6, li, a, div{user-select:none;-webkit-user-select:none;}
input, textarea, select, [contenteditable="true"], [contenteditable=""], [contenteditable="plaintext-only"]{user-select:text;-webkit-user-select:text;caret-color:auto;}


/* Espaço extra no final das abas: Sobre, Missão, Visão e Parceria */
.spaced-modal .modal-body {
  padding-bottom: 3.5rem;
}

/* Espaço para a mensagem da aba Parceria */
.form-feedback {
  margin-bottom: 2rem;
}



/* ===== Institucional: Termos, Privacidade e Cookies ===== */
.legal-note {
  margin-top: 1.25rem;
  font-size: 0.92rem;
  color: #475569;
}

.cookie-modal-content {
  max-width: 720px;
  width: min(720px, 94vw);
}

.cookie-logo-strip {
  padding: 0;
}

.cookie-header {
  background: #0b2a45;
  color: #ffffff;
  padding: 1.25rem 1.5rem;
}

.cookie-title {
  margin: 0;
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: 0.2px;
}

.cookie-subtitle {
  margin: 0.5rem 0 0;
  font-size: 1rem;
  opacity: 0.92;
}

.cookie-body {
  padding: 1.25rem 1.5rem 1.5rem 1.5rem;
}

.cookie-toggle {
  margin-top: 0.75rem;
  background: transparent;
  border: 0;
  padding: 0;
  color: #0b2a45;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.cookie-toggle:focus {
  outline: 2px solid rgba(126, 217, 87, 0.65);
  outline-offset: 4px;
  border-radius: 8px;
}

.cookie-details {
  margin-top: 1rem;
  border-top: 1px solid rgba(15, 23, 42, 0.12);
  padding-top: 1rem;
}

.cookie-item {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 0.75rem;
  padding: 0.75rem 0;
}

.cookie-item::before {
  content: "ⓘ";
  font-size: 1.1rem;
  color: #0b2a45;
  line-height: 1;
  margin-top: 0.1rem;
}

.cookie-item-title {
  font-weight: 900;
  color: #0f172a;
}

.cookie-item-desc {
  color: #334155;
  margin-top: 0.25rem;
}

.cookie-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.9rem;
  margin-top: 1.25rem;
  flex-wrap: wrap;
}

.cookie-btn {
  border-radius: 12px;
  padding: 0.85rem 1.15rem;
  font-weight: 800;
  cursor: pointer;
  border: 1px solid transparent;
}

.cookie-btn-accept {
  background: #0b2a45;
  color: #ffffff;
}

.cookie-btn-accept:hover {
  filter: brightness(1.07);
}

.cookie-btn-reject {
  background: #e5e7eb;
  color: #0f172a;
  border-color: #e5e7eb;
}

.cookie-btn-reject:hover {
  filter: brightness(0.98);
}

@media (max-width: 540px) {
  .cookie-header { padding: 1.05rem 1.1rem; }
  .cookie-body { padding: 1.05rem 1.1rem 1.25rem; }
  .cookie-actions { justify-content: stretch; }
  .cookie-actions .cookie-btn { width: 100%; }
}


/* Cookie modal: remove close button and fix details layout */
#cookieModal .modal-close { display: none !important; }

.cookie-item::before {
  grid-column: 1;
  grid-row: 1 / span 2;
}

.cookie-item-title,
.cookie-item-desc {
  grid-column: 2;
}

.cookie-item-desc {
  grid-row: 2;
}




/* ---------- Mobile navigation improvements ---------- */
.mobile-menu-btn{
  display:none;
  align-items:center;
  justify-content:center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.5rem;
  border: 1px solid rgba(255,255,255,0.25);
  background: transparent;
  color: #ffffff;
  cursor: pointer;
}

.mobile-menu-icon{
  font-size: 1.25rem;
  line-height: 1;
}

.nav-close-btn{
  display:none;
  align-items:center;
  justify-content:center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.5rem;
  border: 1px solid rgba(255,255,255,0.25);
  background: rgba(15,23,42,0.65);
  color:#ffffff;
  cursor:pointer;
  margin-left:auto;
}

.nav-overlay{
  display:none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 1990;
}

body.nav-open .nav-overlay{
  display:block;
}

@media (max-width: 900px){
  /* Safe zone já é controlado por --ge-gutter */

  /* On mobile, the menu button sits on the BREAKING line */
  .header-right #mobileMenuBtn{ display:none !important; }

  /* Slightly larger logo on mobile (only the icon) */
  .site-branding .logo-image{
    width: 4.4rem;
    height: 4.4rem;
  }

  .header .header-inner{
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .header-right .date-text{
    display:none;
  }

  .mobile-menu-btn{
    display:inline-flex;
    background: #0b2a4a;
    border-color: rgba(255,255,255,0.28);
  }

  /* Turn the top nav into an off-canvas drawer */
  .main-nav{
    position: fixed;
    top: 0;
    right: 0;
    left: auto;
    /* Use dvh when available to avoid iOS address-bar issues */
    height: 100vh;
    height: 100dvh;
    width: min(74vw, 300px);
    transform: translateX(110%);
    transition: transform 220ms ease;
    z-index: 2000;
    /* Prevent background scroll bleed; scroll happens inside .nav-inner */
    overflow: hidden;
    border-bottom: none;
    border-left: 2px solid #fbbf24;
  }

  body.nav-open .main-nav{
    transform: translateX(0);
  }

  .main-nav .nav-inner{
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
    padding: 0.75rem 12px;
    height: 100%;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }

  /* Drawer: safe zone padding and topbar search */
  .main-nav .nav-search:not(.drawer-search){ display:none; }
  .main-nav .drawer-search{ display:flex; }

  /* Ensure the drawer topbar (search) is visible on mobile */
  .nav-topbar{ display:flex; }

  .nav-close-btn{
    display:inline-flex;
  }

  .categories-container{
    justify-content: flex-start;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }

  /* Mobile: alinhar texto do menu à direita */
  .categories-container,
  .categories,
  .categories .category{
    text-align: left;
  }

  .nav-footer-links{
    align-items: flex-start;
    width: 100%;
    text-align: left;
  }
  /* Mobile: alinhar links institucionais à esquerda e um por linha */
  .nav-footer-links a{
    display:block;
    width:100%;
    text-align: left;
  }



  .categories{
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    width: 100%;
    border-top: 1px solid rgba(255,255,255,0.08);
  }

  .categories .category{
    width: 100%;
    padding: 0.85rem 0.75rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
  }

  /* Mobile: alinhamento à direita para itens do menu e submenus */
  .categories .category{
    text-align: left;
  }
  .categories .submenu{
    padding-left: 1rem; padding-right: 0;
    text-align: left;
  }
  .categories .submenu li{
    text-align: left;
  }

  .categories .category::after{
    /* Remove setinhas no mobile (menu simples) */
    content: "";
    display: none;
  }

  .nav-search{
    margin-left: 0;
    width: 100%;
  }

  .nav-search input{
    width: 100%;
  }

  /* Mobile: remove submenus (somente as categorias principais) */
  .submenu{ display:none !important; }

  /* Links institucionais dentro do menu (tipografia diferente, sem negrito) */
  .nav-footer-links a{
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    opacity: 0.95;
  }

  /* Mobile: garantir que o texto dos modais (ex: Sobre Nós) apareça completo com rolagem */
  .modal-content.info-modal-content{
    width: 92vw;
    max-width: 92vw;
    max-height: 92vh;
    padding: 1.25rem;
  }
  /* Mobile: o modal de cookies deve seguir a lógica do desktop (centralizado, com margens) */
  .modal-content.info-modal-content.cookie-modal-content{
    width: calc(100vw - 32px);
    max-width: 520px;
    margin: 16px;
    padding: 0; /* mantém o mesmo padrão do desktop (header + body já têm padding próprio) */
  }

  /* Mobile: desativar o banner simplificado de cookies (vamos usar o mesmo modal do desktop) */
  #cookieConsent{ display: none !important; }

  .modal-content.info-modal-content .modal-body{
    max-height: calc(92vh - 190px);
  }

  /* Mobile: banner de cookies */
  .cookie-consent{
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 3000;
    background: #0f172a;
    color: #ffffff;
    border-top: 2px solid #fbbf24;
    padding: 14px 14px calc(14px + env(safe-area-inset-bottom));
    display: none;
  }
  .cookie-consent.show{ display:block; }
  .cookie-consent .cookie-title{
    font-weight: 800;
    margin: 0 0 6px 0;
  }
  .cookie-consent .cookie-text{
    margin: 0 0 10px 0;
    color: #cbd5e1;
    line-height: 1.4;
    font-size: 0.95rem;
  }
  .cookie-consent .cookie-actions{
    display:flex;
    gap:10px;
  }
  .cookie-consent .cookie-btn{
    flex:1;
    height: 42px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.22);
    background: rgba(255,255,255,0.08);
    color: #ffffff;
    font-weight: 700;
    cursor: pointer;
  }
  .cookie-consent .cookie-btn.accept{
    background: #F7C600;
    color: #0b2a4a;
    border-color: rgba(0,0,0,0.15);
  }

}

/* =========================
   MOBILE HEADER (3 linhas)
   ========================= */

.mobile-only{display:none;}

@media (max-width: 900px){
  .mobile-only{display:block;}

  /* Hide desktop-only elements in top area */
  .header-date{display:none;}
  #mobileMenuBtn{display:none;} /* we use the row2 button */

  /* Linha 2 (Busca + menu) */
  .mobile-header-row2{
    display:flex;
    align-items:center;
    gap:10px;
    padding:6px 12px 8px; /* respiro lateral no mobile */
  }

  /* Botão ENTRAR com respiro na direita */
  .mobile-header-row1 .login-btn{ margin-right: 16px; }

  .mobile-search{
    flex:1;
    margin-left:0;
  }

  /* Busca no mobile igual ao desktop: campo + botão amarelo colado */
  .nav-search.drawer-search{
    gap:0;
    width: 100%;
  }
  .nav-search.drawer-search input{ min-width: 0; }
  .nav-search.drawer-search input{
    border-radius:10px 0 0 10px;
    height:44px;
  }
  .nav-search.drawer-search button{
    width:54px;
    border-radius:0 10px 10px 0;
    background:#F7C600;
    color:#0b2a4a;
  }
  .nav-search.drawer-search button svg{ stroke-width: 2.2; }
  .nav-search.drawer-search button:hover{ filter: brightness(0.98); }

  /* Drawer: show only the top search, hide the desktop one */
  .main-nav .nav-search:not(.drawer-search){ display:none !important; }
  .main-nav .drawer-search{ display:flex !important; }

  .mobile-menu-btn-row2{
    width:44px;
    height:44px;
    border-radius:10px;
    border:1px solid rgba(11,42,74,.28);
    background:#0b2a4a;
    color:#fff;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    font-size:20px;
    line-height:1;
  }

  /* Linha 3: ticker minimalista */
  .breaking-bar{display:none;}

  .mobile-ticker{
    position:sticky;
    top: var(--ge-header-h);
    z-index: 1190;
    background:#0b2a4a;
    border-top:1px solid rgba(255,255,255,.10);
    border-bottom:1px solid rgba(255,255,255,.10);
    backdrop-filter:none;
  }

  .mobile-ticker-inner{
    display:flex;
    align-items:center;
    gap:10px;
    padding:6px 12px;
  }

  .mobile-ticker-label{
    font-weight:800;
    color:#F7C600;
    white-space:nowrap;
  }

  /* Blinking red badge behind the BREAKING word */
  .mobile-ticker-badge{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    padding:4px 10px;
    margin-right:4px;
    border-radius:4px;
    background:#c70a0a;
    color:#ffffff;
    animation: geBlinkRed 1.1s infinite;
  }

  @keyframes geBlinkRed{
    0%, 50%{ opacity: 1; }
    50.01%, 100%{ opacity: 0.45; }
  }

  .mobile-ticker-track{
    flex:1;
    overflow:hidden;
  }

  .mobile-ticker-content{
    display:inline-block;
    padding-left:100%;
    white-space:nowrap;
    animation: geTickerScroll 18s linear infinite;
    color:rgba(255,255,255,.92);
  }

  @keyframes geTickerScroll{
    0%{ transform: translateX(0); }
    100%{ transform: translateX(-100%); }
  }

  /* Remove social icons from the top on mobile; keep in footer */
  .nav-social{display:none;}

  /* Prevent confusing overlaps: hide desktop horizontal nav categories bar on mobile */
  .nav-bar{display:none;}

  /* Cookie modal: ensure both buttons visible on small screens */
  .cookie-modal .modal-content{
    max-height:85vh;
    overflow:auto;
  }

  .cookie-actions{
    display:flex;
    flex-direction:column;
    gap:10px;
  }
}


@media (max-width: 900px) {
  .subcategories, .submenu-toggle, .submenu-arrow, .subcategory { display: none !important; }
  .categories a { font-weight: 700; }
  .nav-footer-links a { font-weight: 400; }
}

/* footer safe zone on mobile */
@media (max-width: 900px) {
  footer .container { padding-left: var(--ge-gutter); padding-right: var(--ge-gutter); }
}
