/*
Theme Name: Blocksy Child — MilhasBot
Theme URI: https://milhasbot.com.br
Description: Child Theme do Blocksy para o MilhasBot.com.br. APENAS visual (CSS, fontes, templates). Lógica de negócio vive em wp-content/mu-plugins/milhasbot-core/.
Author: MilhasBot
Author URI: https://milhasbot.com.br
Template: blocksy
Version: 1.2.0
License: Proprietary
Text Domain: milhasbot-child
*/

/* ============================================================
   DESIGN TOKENS — Globais
   Paleta navy/azul espelhada das variáveis Blocksy.
   Componentes específicos de página (destino/home/review) vivem em
   /assets/mb-site.css (enfileirado via functions.php com filemtime).
   ============================================================ */

:root {
  --mb-color-1: #2E6BB0;
  --mb-color-2: #1E4F86;
  --mb-color-3: #2A3647;
  --mb-color-4: #14233A;
  --mb-color-5: #E2E8F0;
  --mb-color-6: #F5F7FB;
  --mb-color-7: #122139;
  --mb-color-8: #EAF1FB;
  --mb-gold-600: #B8893B;
  --mb-paper-50: #FBF8F2;
  --mb-paper-100: #F4EFE5;

  --mb-font-sans: 'Inter', 'Inter Fallback', system-ui, -apple-system, sans-serif;
  --mb-font-serif: 'Fraunces', 'Fraunces Fallback', Georgia, serif;
  --mb-font-mono: 'JetBrains Mono', 'SF Mono', Menlo, Consolas, monospace;
}

/* ============================================================
   Tipografia base
   ============================================================ */

body {
  font-family: var(--mb-font-sans);
  font-size: clamp(1rem, 1vw + 0.25rem, 1.0625rem);
  line-height: 1.65;
  color: var(--mb-color-3);
  background: var(--mb-color-6);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--mb-font-serif);
  font-weight: 600;
  color: var(--mb-color-4);
  letter-spacing: -0.02em;
}

/* Botões base */
.wp-element-button,
.wp-block-button__link {
  border-radius: 4px;
  font-family: var(--mb-font-sans);
  box-shadow: none;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

/* Regra transversal: sem sombras */
.wp-block-cover,
.wp-block-group,
.wp-block-column {
  box-shadow: none;
}

/* ============================================================
   HEADER — overrides do Blocksy
   ============================================================ */

/* Menu items: remover uppercase default + tipografia editorial */
.ct-header .menu .ct-menu-link,
header.ct-header .menu a {
  text-transform: none !important;
  letter-spacing: 0 !important;
  font-weight: 500;
  font-size: 0.9375rem;
  font-family: var(--mb-font-sans);
  color: var(--mb-color-4);
  transition: color 0.15s ease;
}

.ct-header .menu .ct-menu-link:hover,
.ct-header .menu .current-menu-item .ct-menu-link {
  color: var(--mb-color-1);
}

/* Wordmark "MilhasBot" — editorial em Fraunces */
.site-logo-container,
.ct-header [data-id="logo"] a {
  font-family: var(--mb-font-serif);
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--mb-color-4);
  text-decoration: none;
}

.site-logo-container:hover {
  color: var(--mb-color-1);
}

/* Logo redondo — altura generosa porque é icon circular (vs wordmark wide).
   Override defensivo do --logo-max-height do Blocksy (que vem como 20px). */
.ct-header [data-id="logo"] .site-logo-container {
  --logo-max-height: 72px;
  display: inline-flex;
  align-items: center;
}
.ct-header [data-id="logo"] .site-logo-container img,
.ct-header [data-id="logo"] .site-logo-container svg {
  max-height: 72px !important;
  width: auto !important;
  height: 72px !important;
  display: block;
}

@media (max-width: 999px) {
  .ct-header [data-id="logo"] .site-logo-container img,
  .ct-header [data-id="logo"] .site-logo-container svg {
    max-height: 60px !important;
    height: 60px !important;
  }
}

@media (max-width: 689px) {
  .ct-header [data-id="logo"] .site-logo-container img,
  .ct-header [data-id="logo"] .site-logo-container svg {
    max-height: 52px !important;
    height: 52px !important;
  }
}

.ct-header [data-row="middle"] .ct-container {
  padding-block: 8px;
}

/* Apertar espaço entre header e conteúdo da página */
.home #main,
.home main.site-main,
.page-template-template-destino main.site-main {
  padding-top: 0 !important;
  margin-top: 0 !important;
}

.home .ct-container-full,
.page-template-template-destino .ct-container-full {
  padding-top: 16px !important;
}

/* Hero cover/box da home não precisa de margem em cima */
.home .mb-template-home {
  padding-top: 12px !important;
}

/* Logo align center vertical no header */
.ct-header [data-row="middle"] {
  align-items: center;
}

/* Hide top row do template News (socials + menu auto + search) */
.ct-header [data-row="top"] {
  display: none !important;
}

/* Hide CTA "Contribute" demo */
.ct-header-cta {
  display: none !important;
}

/* ============================================================
   HOME — usa .mb-template-home wrapper (Claude Chat spec)
   Estilos específicos do home estão em /assets/mb-site.css
   ============================================================ */

/* Remover padding vertical do Blocksy main em pages com template-* customizados
   (template-destino, template-home, etc) — eles têm próprio padding interno */
.page-template-template-destino .ct-container-full,
.home .ct-container-full {
  padding-top: 0;
  padding-bottom: 0;
}

/* Reduzir margem vertical entre entries do Blocksy quando templates customizados rodam */
.home main.site-main,
.page-template-template-destino main.site-main {
  padding-top: 0;
  padding-bottom: 0;
}

/* ============================================================
   Page Title Bar do Blocksy: hide em TODAS as pages
   (templates customizados renderizam próprio hero)
   ============================================================ */

.page .hero-section[data-type],
.page > .entry-header,
body.page .ct-container-full > article > .hero-section[data-type] {
  display: none !important;
}

/* ============================================================
   FOOTER — Blocksy widgets overrides
   ============================================================ */

.ct-footer [data-row="top"] {
  display: none !important;
}

.ct-footer [data-row="middle"] .ct-widget h3 {
  font-family: var(--mb-font-serif);
  font-size: 1.0625rem !important;
  letter-spacing: -0.01em !important;
  margin-bottom: 1rem !important;
  color: var(--mb-color-4);
}

.ct-footer [data-row="middle"] .ct-widget p,
.ct-footer [data-row="middle"] .ct-widget li {
  font-size: 0.875rem;
  line-height: 1.65;
  color: var(--mb-color-3);
}

.ct-footer [data-row="middle"] {
  padding-block: 3rem;
}

.ct-footer [data-row="bottom"] {
  border-top: 1px solid var(--mb-color-5);
  padding-block: 1rem;
}

/* Garantir que ct-social-box vazio não ocupe espaço */
.ct-social-box:empty,
.ct-social-box:not(:has(a)) {
  display: none;
}
