/*
Theme Name:   ldc-child
Theme URI:    https://labdoconfeiteiro.com.br
Description:  Tema filho do Astra para o Lab do Confeiteiro. Aplica o design system completo (Azul Petróleo + Ouro Velho) sem conflito com Elementor. Instale e ative — depois use o Elementor normalmente.
Author:       Lab do Confeiteiro
Version:      1.0.0
Template:     astra
Text Domain:  ldc-child
*/

/* ── As variáveis CSS ficam disponíveis para o Elementor usar ── */
:root {
  --ldc-petrol:        #0D3B4A;
  --ldc-teal:          #1A5C6E;
  --ldc-sea:           #2E8099;
  --ldc-mist:          #8BB8C2;
  --ldc-gold:          #B8860B;
  --ldc-mustard:       #D4A017;
  --ldc-linen:         #F6F2E8;
  --ldc-stone:         #E0DAC8;
  --ldc-cream:         #EEE9DC;
  --ldc-border:        #C8C2AE;
  --ldc-border-subtle: #DDD8CC;
  --ldc-error:         #9B2335;

  --ldc-font-display:  'Playfair Display', Georgia, serif;
  --ldc-font-body:     'Lora', Georgia, serif;
  --ldc-font-ui:       'DM Sans', system-ui, sans-serif;
  --ldc-font-mono:     'JetBrains Mono', 'Courier New', monospace;

  --ldc-shadow-sm: 0 2px 8px rgba(13,59,74,.08), 0 1px 2px rgba(13,59,74,.05);
  --ldc-shadow-md: 0 4px 16px rgba(13,59,74,.10), 0 2px 4px rgba(13,59,74,.06);
  --ldc-shadow-lg: 0 8px 24px rgba(13,59,74,.12), 0 2px 4px rgba(13,59,74,.06);
}

/* ── BASE — aplicado ao corpo inteiro, Elementor herda ──────── */
html body {
  background-color: var(--ldc-linen) !important;
  font-family: var(--ldc-font-body) !important;
  color: var(--ldc-petrol) !important;
  -webkit-font-smoothing: antialiased;
}

/* ── TIPOGRAFIA GLOBAL ──────────────────────────────────────── */
html body h1,
html body h2,
html body h3,
html body h4,
html body h5,
html body h6,
html body .entry-title,
html body .entry-title a,
html body .elementor-heading-title,
html body .elementor-widget-heading .elementor-heading-title {
  font-family: var(--ldc-font-display) !important;
  color: var(--ldc-petrol) !important;
  letter-spacing: -0.02em !important;
}

html body p,
html body .elementor-widget-text-editor p,
html body .entry-content p {
  font-family: var(--ldc-font-body) !important;
  color: var(--ldc-petrol) !important;
  line-height: 1.8 !important;
}

/* Links */
html body a { color: var(--ldc-gold) !important; }
html body a:hover { color: #9A6F09 !important; opacity: 0.9 !important; }

/* ── HEADER ASTRA ───────────────────────────────────────────── */
html body #masthead,
html body .site-header,
html body .main-header-bar,
html body .ast-primary-header-bar,
html body .ast-above-header-bar,
html body .ast-masthead-custom-menu-items {
  background-color: var(--ldc-linen) !important;
  border-bottom: 1px solid var(--ldc-border) !important;
  box-shadow: none !important;
}

html body .site-title a,
html body .ast-site-name-wrap .site-title a {
  font-family: var(--ldc-font-display) !important;
  color: var(--ldc-petrol) !important;
  font-weight: 700 !important;
}

html body .main-navigation a,
html body .main-navigation ul li a,
html body .main-header-menu .menu-item > a,
html body .ast-header-break-point .main-navigation ul li a {
  font-family: var(--ldc-font-ui) !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  color: var(--ldc-teal) !important;
}
html body .main-navigation a:hover,
html body .main-navigation ul li a:hover,
html body .main-header-menu .current-menu-item > a {
  color: var(--ldc-gold) !important;
}

/* ── FOOTER ASTRA ───────────────────────────────────────────── */
html body #colophon,
html body .site-footer,
html body .ast-small-footer,
html body .footer-widget-area,
html body .ast-footer-overlay {
  background-color: var(--ldc-petrol) !important;
  color: var(--ldc-cream) !important;
  border-top: none !important;
}
html body .site-footer a,
html body .ast-small-footer a,
html body .footer-widget-area a {
  color: var(--ldc-gold) !important;
}
html body .site-footer a:hover,
html body .ast-small-footer a:hover {
  color: var(--ldc-cream) !important;
  opacity: 1 !important;
}
html body .ast-footer-copyright,
html body .ast-small-footer,
html body .ast-footer-copyright p {
  font-family: var(--ldc-font-ui) !important;
  font-size: 12px !important;
  color: rgba(238,233,220,0.45) !important;
}

/* ── BOTÕES ─────────────────────────────────────────────────── */
html body .ast-button,
html body .elementor-button,
html body .wp-block-button__link,
html body input[type="submit"],
html body button[type="submit"],
html body .button,
html body .elementor-widget-button .elementor-button {
  background-color: var(--ldc-gold) !important;
  color: #ffffff !important;
  font-family: var(--ldc-font-ui) !important;
  font-weight: 600 !important;
  font-size: 13px !important;
  border-radius: 6px !important;
  border: none !important;
  letter-spacing: 0 !important;
  transition: background-color 150ms ease-out !important;
}
html body .ast-button:hover,
html body .elementor-button:hover,
html body .wp-block-button__link:hover,
html body input[type="submit"]:hover {
  background-color: #9A6F09 !important;
  color: #ffffff !important;
  opacity: 1 !important;
}

/* ── ELEMENTOR WIDGETS ──────────────────────────────────────── */

/* Heading widget */
html body .elementor-widget-heading .elementor-heading-title {
  font-family: var(--ldc-font-display) !important;
  color: var(--ldc-petrol) !important;
}

/* Text editor widget */
html body .elementor-widget-text-editor {
  font-family: var(--ldc-font-body) !important;
  color: var(--ldc-petrol) !important;
  line-height: 1.8 !important;
}

/* Image widget */
html body .elementor-widget-image img {
  border-radius: 8px !important;
}

/* Divider */
html body .elementor-divider-separator {
  border-color: var(--ldc-border) !important;
}

/* Icon box */
html body .elementor-icon-box-title,
html body .elementor-icon-box-title a {
  font-family: var(--ldc-font-display) !important;
  color: var(--ldc-petrol) !important;
}
html body .elementor-icon-box-description {
  font-family: var(--ldc-font-body) !important;
  color: var(--ldc-teal) !important;
}

/* Posts widget */
html body .elementor-post__title a {
  font-family: var(--ldc-font-display) !important;
  color: var(--ldc-petrol) !important;
  text-decoration: none !important;
}
html body .elementor-post__title a:hover {
  color: var(--ldc-gold) !important;
  opacity: 1 !important;
}
html body .elementor-post__meta-data,
html body .elementor-post__excerpt p {
  font-family: var(--ldc-font-ui) !important;
  color: var(--ldc-mist) !important;
}

/* Cards de posts */
html body .elementor-post__card {
  background: var(--ldc-stone) !important;
  border-radius: 8px !important;
  box-shadow: var(--ldc-shadow-sm) !important;
  border: none !important;
  overflow: hidden !important;
  transition: transform 150ms ease, box-shadow 150ms ease !important;
}
html body .elementor-post__card:hover {
  transform: translateY(-2px) !important;
  box-shadow: var(--ldc-shadow-md) !important;
}

/* Thumbnail nos cards */
html body .elementor-post__thumbnail__link img {
  border-radius: 0 !important;
}

/* Category tag nos posts */
html body .elementor-post__badge {
  font-family: var(--ldc-font-ui) !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
  background: var(--ldc-gold) !important;
  color: #ffffff !important;
  border-radius: 4px !important;
}

/* Form widget */
html body .elementor-field-group input,
html body .elementor-field-group textarea,
html body .elementor-field-group select {
  font-family: var(--ldc-font-body) !important;
  border: 1.5px solid var(--ldc-border) !important;
  border-radius: 6px !important;
  background: var(--ldc-linen) !important;
  color: var(--ldc-petrol) !important;
  padding: 10px 14px !important;
  transition: border-color 150ms, box-shadow 150ms !important;
}
html body .elementor-field-group input:focus,
html body .elementor-field-group textarea:focus {
  border-color: var(--ldc-gold) !important;
  box-shadow: 0 0 0 3px rgba(184,134,11,0.15) !important;
  outline: none !important;
}

/* ── BLOG POSTS (Astra + Elementor) ────────────────────────── */
html body .ast-article-post,
html body .ast-article-inner,
html body .blog .type-post,
html body .archive .type-post,
html body .home .type-post {
  background: white !important;
  border-radius: 8px !important;
  box-shadow: var(--ldc-shadow-sm) !important;
  border: none !important;
  overflow: hidden !important;
  transition: transform 150ms ease, box-shadow 150ms ease !important;
}
html body .ast-article-post:hover,
html body .blog .type-post:hover,
html body .archive .type-post:hover {
  transform: translateY(-2px) !important;
  box-shadow: var(--ldc-shadow-md) !important;
}
html body .blog .entry-title a,
html body .archive .entry-title a,
html body .ast-blog-single-element .entry-title a {
  font-family: var(--ldc-font-display) !important;
  font-weight: 700 !important;
  color: var(--ldc-petrol) !important;
  text-decoration: none !important;
  line-height: 1.35 !important;
}
html body .blog .entry-title a:hover,
html body .archive .entry-title a:hover {
  color: var(--ldc-gold) !important;
  opacity: 1 !important;
}
html body .entry-meta,
html body .entry-meta a,
html body .ast-blog-single-element .entry-meta {
  font-family: var(--ldc-font-ui) !important;
  font-size: 11px !important;
  color: var(--ldc-mist) !important;
}
html body .cat-links a {
  font-weight: 700 !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
  color: var(--ldc-gold) !important;
  text-decoration: none !important;
}

/* ── SINGLE POST ────────────────────────────────────────────── */
html body .single .ast-article-single {
  background: white !important;
  border-radius: 8px !important;
  box-shadow: var(--ldc-shadow-sm) !important;
}
html body .single .entry-title {
  font-size: clamp(1.6rem, 3vw, 2.4rem) !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
}
html body .single .entry-content h2 { margin-top: 2em !important; margin-bottom: 0.75em !important; }
html body .single .entry-content h3 { margin-top: 1.75em !important; margin-bottom: 0.6em !important; }

/* ── SIDEBAR WIDGETS ────────────────────────────────────────── */
html body .widget {
  background: var(--ldc-stone) !important;
  border-radius: 8px !important;
  padding: 20px 22px !important;
  box-shadow: var(--ldc-shadow-sm) !important;
  margin-bottom: 24px !important;
  border: none !important;
}
html body .widget-title,
html body .widgettitle {
  font-family: var(--ldc-font-ui) !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  letter-spacing: 0.12em !important;
  text-transform: uppercase !important;
  color: var(--ldc-mist) !important;
  margin-bottom: 14px !important;
  border: none !important;
  padding: 0 !important;
}
html body .widget a { color: var(--ldc-teal) !important; }
html body .widget a:hover { color: var(--ldc-gold) !important; opacity: 1 !important; }

/* ── TAGS / CATEGORIAS ──────────────────────────────────────── */
html body .tags-links a,
html body .post-tags a,
html body .ast-tags-list a {
  font-family: var(--ldc-font-ui) !important;
  font-size: 11px !important;
  font-weight: 500 !important;
  padding: 4px 12px !important;
  border-radius: 9999px !important;
  background: var(--ldc-stone) !important;
  color: var(--ldc-teal) !important;
  border: 1px solid var(--ldc-border) !important;
  text-decoration: none !important;
  display: inline-block !important;
  margin: 2px !important;
  transition: all 150ms !important;
}
html body .tags-links a:hover,
html body .ast-tags-list a:hover {
  background: var(--ldc-gold) !important;
  color: #ffffff !important;
  border-color: var(--ldc-gold) !important;
  opacity: 1 !important;
}

/* ── FORMULÁRIOS ────────────────────────────────────────────── */
html body input[type="text"],
html body input[type="email"],
html body input[type="search"],
html body textarea,
html body select {
  font-family: var(--ldc-font-body) !important;
  border: 1.5px solid var(--ldc-border) !important;
  border-radius: 6px !important;
  background: var(--ldc-linen) !important;
  color: var(--ldc-petrol) !important;
  padding: 10px 14px !important;
}
html body input:focus,
html body textarea:focus {
  border-color: var(--ldc-gold) !important;
  box-shadow: 0 0 0 3px rgba(184,134,11,0.15) !important;
  outline: none !important;
}

/* ── CODE / PRÉ ─────────────────────────────────────────────── */
html body code, html body kbd {
  font-family: var(--ldc-font-mono) !important;
  font-size: 0.875em !important;
  background: var(--ldc-stone) !important;
  padding: 2px 6px !important;
  border-radius: 4px !important;
  color: var(--ldc-teal) !important;
}
html body pre {
  font-family: var(--ldc-font-mono) !important;
  background: var(--ldc-stone) !important;
  padding: 20px 24px !important;
  border-radius: 8px !important;
  overflow-x: auto !important;
  color: var(--ldc-petrol) !important;
}

/* ── PAGINAÇÃO ──────────────────────────────────────────────── */
html body .page-numbers {
  font-family: var(--ldc-font-ui) !important;
  color: var(--ldc-teal) !important;
  border: 1.5px solid var(--ldc-border) !important;
  border-radius: 6px !important;
  padding: 6px 14px !important;
  text-decoration: none !important;
}
html body .page-numbers.current,
html body .page-numbers:hover {
  background: var(--ldc-gold) !important;
  border-color: var(--ldc-gold) !important;
  color: #ffffff !important;
  opacity: 1 !important;
}

/* ── SCIENCE CALLOUT (shortcode) ────────────────────────────── */
.ldc-science-callout {
  border-left: 4px solid var(--ldc-sea);
  border-radius: 4px;
  padding: 18px 20px;
  margin: 28px 0;
  background: #C8E2E8;
}
.ldc-science-callout--warning { border-left-color: var(--ldc-gold); background: #F0DFA0; }
.ldc-science-callout--tip     { border-left-color: var(--ldc-mustard); background: rgba(212,160,23,0.12); }
.ldc-callout__label {
  font-family: var(--ldc-font-ui) !important;
  font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--ldc-sea); margin-bottom: 8px;
}
.ldc-science-callout--warning .ldc-callout__label { color: var(--ldc-gold); }
.ldc-science-callout--tip .ldc-callout__label     { color: #9A6F09; }
.ldc-callout__text { font-family: var(--ldc-font-body) !important; font-size: 0.9rem; line-height: 1.7; color: var(--ldc-petrol); }
.ldc-callout__formula code { background: rgba(255,255,255,0.6) !important; padding: 6px 12px !important; display: inline-block; margin-top: 10px; }

/* ── SELEÇÃO ────────────────────────────────────────────────── */
::selection { background: var(--ldc-gold); color: #ffffff; }
