/*
Theme Name: Minimal GA4 ADX Schema
Theme URI: https://www.movimentocountry.com/
Author: Hed + Gemini
Description: Versão Final: Menu Mobile Invertido, Banners Cinza (5px margin) e Imagens 100% Responsivas.
Version: 1.9.0
Text Domain: minimal-ga4-adx-schema
*/

/* =========================================
   1. RESET E REGRAS GLOBAIS
   ========================================= */
* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
  line-height: 1.6;
  color: #222222;
  background: #ffffff;
  overflow-x: hidden; /* Previne rolagem lateral indesejada */
}

a { color: #23537d; text-decoration: underline; transition: color 0.2s; }
a:hover { color: #2778ab; text-decoration: none; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 16px; }

.screen-reader-text { 
  border: 0; clip: rect(1px, 1px, 1px, 1px); height: 1px; margin: -1px; 
  overflow: hidden; padding: 0; position: absolute; width: 1px; 
}

/* =========================================
   2. HEADER E NAVEGAÇÃO (DESKTOP)
   ========================================= */
.top-bar { background-color: #23537d; color: #ffffff; font-size: 13px; }
.top-bar-inner { display: flex; align-items: center; min-height: 40px; }
.top-menu { list-style: none; margin: 0; padding: 0; display: flex; gap: 15px; }
.top-menu a { color: #fff; text-decoration: none; }

.header-main { 
  background-color: #1A4263; color: #ffffff; padding: 15px 0; 
  position: relative; z-index: 1000; 
}
.header-main-inner { display: flex; align-items: center; justify-content: space-between; }

/* Branding Logo */
.site-branding .custom-logo { height: 50px; width: auto; aspect-ratio: 350 / 50; display: block; }

/* Menu Horizontal Desktop */
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 20px; }
.site-nav li { position: relative; }
.site-nav a { color: #ffffff; font-weight: 500; text-decoration: none; padding: 10px 0; display: block; }

/* Submenus Desktop */
.site-nav ul ul {
  display: none; position: absolute; top: 100%; left: 0; background: #23537d;
  min-width: 200px; padding: 10px 0; flex-direction: column; box-shadow: 0 4px 6px rgba(0,0,0,0.2);
}
.site-nav ul li:hover > ul { display: flex; }
.site-nav ul ul a { padding: 8px 15px; border-bottom: 1px solid rgba(255,255,255,0.1); }

.menu-toggle { display: none; }

/* =========================================
   3. HEADER MOBILE (SANDUÍCHE ESQUERDA, LOGO DIREITA)
   ========================================= */
@media (max-width: 768px) {
  /* Inverte a ordem visual: Nav/Sanduíche aparece primeiro (esquerda) */
  .header-main-inner { flex-direction: row-reverse; } 
  
  .menu-toggle { 
    display: block; background: transparent; border: none; cursor: pointer; padding: 5px; 
  }
  .menu-toggle .bar { display: block; width: 25px; height: 3px; background: #fff; margin: 5px 0; border-radius: 2px; }

  .site-branding .custom-logo { height: 40px; }

  /* Menu Mobile Suspenso */
  .site-nav #primary-menu {
    display: none; position: absolute; top: 100%; left: 0; width: 100%;
    background: #1A4263; flex-direction: column; padding: 20px; 
    box-shadow: 0 5px 10px rgba(0,0,0,0.2);
  }
  .site-nav.toggled #primary-menu { display: flex; }
  .site-nav ul ul { position: static; display: block; width: 100%; background: rgba(0,0,0,0.2); }
}

/* =========================================
   4. ESPAÇOS DE ANÚNCIOS (AJUSTE FINO)
   ========================================= */
/* Moldura cinza, centralização total e margem de 5px */
.header-ad-inner,
.content-ad {
  background-color: #f5f5f5 !important; /* Fundo cinza claro */
  margin: 5px 0 !important;             /* Margem 5px superior e inferior */
  display: flex !important;
  justify-content: center !important;   /* Centraliza horizontal */
  align-items: center !important;       /* Centraliza vertical */
  min-height: 250px;
  text-align: center;
  clear: both;
}

.header-ad-area { width: 100%; }

/* =========================================
   5. IMAGENS RESPONSIVAS E EM DESTAQUE
   ========================================= */
.main-content { padding: 20px 0; }

/* Wrapper da Imagem em Destaque (Fix para não estourar) */
.featured-image-wrapper { 
  width: 100%; 
  margin: 0 auto 25px; 
  display: flex; 
  justify-content: center; 
}

/* Regra mestra para imagens e containers de legenda (WP Caption) */
.entry-content figure,
.entry-content .wp-caption,
.entry-content .wp-block-image,
.featured-image-wrapper {
  max-width: 100% !important;
  width: auto !important; /* Sobrescreve larguras fixas do WordPress */
}

/* Imagens Internas e de Destaque */
.entry-content img,
.single-featured-image {
  max-width: 100% !important;
  height: auto !important;
  display: block;
  margin: 0 auto !important; /* Centraliza no Desktop */
  border-radius: 4px;
}

/* Legendas das imagens */
.wp-caption-text { 
  font-size: 14px; color: #666; margin-top: 8px; text-align: center; padding: 0 10px; 
}

@media (max-width: 768px) {
  .entry-content img, 
  .single-featured-image { 
    width: 100% !important; 
    border-radius: 0; /* Imagem sangrada no mobile */
  }
}

/* =========================================
   6. COMPONENTES DO CONTEÚDO
   ========================================= */
.single-article h1 { font-size: 28px; line-height: 1.2; margin-bottom: 15px; }
.single-meta { font-size: 14px; color: #777; margin-bottom: 20px; }

.see-also-box { 
  background: #f0f7fb; border-left: 5px solid #23537d; 
  padding: 15px 20px; margin: 25px 0; border-radius: 4px; 
}

.mc-author-box {
  display: flex; align-items: center; gap: 15px; background: #f9f9f9;
  padding: 20px; border-radius: 8px; margin: 35px 0; border: 1px solid #eee;
}

.post-tags-wrapper { margin: 25px 0; border-top: 1px solid #eee; padding-top: 15px; }
.post-tags { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.post-tags a { 
  background: #eee; padding: 5px 12px; border-radius: 4px; 
  text-decoration: none; font-size: 13px; color: #333; 
}

/* =========================================
   7. FOOTER
   ========================================= */
.site-footer { 
  background: #f4f4f4; padding: 30px 0; text-align: center; 
  font-size: 14px; border-top: 1px solid #ddd; margin-top: 40px; 
}