/* =============================================================
   LAB DO CONFEITEIRO — style.css (tema completo)
   Azul Petróleo + Ouro Velho · Playfair Display + Lora
   ============================================================= */

/*
Theme Name:  Lab do Confeiteiro
Theme URI:   https://labdoconfeiteiro.com.br
Description: Tema completo para o Lab do Confeiteiro.
Author:      Lab do Confeiteiro
Version:     1.0.0
Text Domain: lab-do-confeiteiro
Tags:        blog, custom-colors, custom-logo, featured-images, two-columns, right-sidebar
*/

/* ── TOKENS ─────────────────────────────────────────────── */
:root {
  --p:  #0D3B4A; /* petrol */
  --t:  #1A5C6E; /* teal */
  --s:  #2E8099; /* sea */
  --m:  #8BB8C2; /* mist */
  --g:  #B8860B; /* old gold */
  --mu: #D4A017; /* mustard */
  --l:  #F6F2E8; /* linen */
  --st: #E0DAC8; /* stone */
  --cr: #EEE9DC; /* cream */
  --bd: #C8C2AE; /* border */
  --bs: #DDD8CC; /* border subtle */

  --fd: 'Playfair Display', Georgia, serif;
  --fb: 'Lora', Georgia, serif;
  --fu: 'DM Sans', system-ui, sans-serif;
  --fm: 'JetBrains Mono', 'Courier New', monospace;

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

/* ── RESET ──────────────────────────────────────────────── */
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0;}
html{font-size:16px;scroll-behavior:smooth;}
img{max-width:100%;height:auto;display:block;}
ul{list-style:none;}

/* ── BASE ───────────────────────────────────────────────── */
body {
  font-family: var(--fb);
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--p);
  background: var(--l);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--g); text-decoration-color: transparent; text-underline-offset: 3px; transition: opacity .15s, text-decoration-color .15s; }
a:hover { opacity: .85; text-decoration-color: var(--g); }

h1,h2,h3,h4,h5,h6 { font-family: var(--fd); color: var(--p); letter-spacing: -.02em; line-height: 1.25; text-wrap: pretty; }
h1 { font-size: clamp(1.75rem,3.5vw,2.4rem); font-weight: 700; }
h2 { font-size: clamp(1.35rem,2.5vw,1.875rem); font-weight: 600; }
h3 { font-size: 1.35rem; font-weight: 600; }
h4 { font-family: var(--fu); font-size: .8rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--t); }
h5,h6 { font-family: var(--fu); font-size: .8rem; font-weight: 600; color: var(--m); letter-spacing: .08em; text-transform: uppercase; }

p { margin-bottom: 1.2em; }
strong { font-weight: 600; }
em { font-style: italic; }

code,kbd { font-family: var(--fm); font-size: .875em; background: var(--st); padding: 2px 6px; border-radius: 4px; color: var(--t); }
pre { font-family: var(--fm); font-size: .875rem; background: var(--st); padding: 20px 24px; border-radius: 8px; overflow-x: auto; line-height: 1.75; color: var(--p); margin: 1.5em 0; }

blockquote { border-left: 4px solid var(--g); padding: 16px 20px; background: var(--st); border-radius: 0 4px 4px 0; margin: 1.5em 0; font-style: italic; color: var(--t); }

::selection { background: var(--g); color: #fff; }

/* ── LAYOUT ─────────────────────────────────────────────── */
.ldc-container { max-width: 1100px; margin: 0 auto; padding: 0 40px; }
.ldc-main { min-height: 60vh; }

/* ── HEADER ─────────────────────────────────────────────── */
.ldc-header { background: var(--l); border-bottom: 1px solid var(--bd); position: sticky; top: 0; z-index: 100; }
.ldc-header__inner { max-width: 1100px; margin: 0 auto; padding: 0 40px; height: 64px; display: flex; align-items: center; gap: 36px; }
.ldc-header__logo { flex-shrink: 0; }
.ldc-header__logo img,.ldc-header__logo .custom-logo { height: 48px; width: auto; }
.ldc-header__nav { margin-left: 0; }
.ldc-nav { display: flex; gap: 28px; }
.ldc-nav li a { font-family: var(--fu); font-size: 13px; font-weight: 500; color: var(--t); text-decoration: none; transition: color .15s; }
.ldc-nav li a:hover,.ldc-nav .current-menu-item > a { color: var(--g); opacity: 1; text-decoration-color: transparent; }
.ldc-header__actions { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.ldc-icon-btn { background: none; border: none; cursor: pointer; color: var(--m); padding: 6px; display: flex; align-items: center; border-radius: 6px; transition: color .15s; }
.ldc-icon-btn:hover { color: var(--p); }

/* Search bar */
.ldc-search-bar { background: var(--l); border-bottom: 1px solid var(--bd); padding: 12px 40px; }
.ldc-search-bar__inner { max-width: 1100px; margin: 0 auto; }
.ldc-search-bar .search-form { display: flex; gap: 10px; }
.ldc-search-bar input[type=search] { flex: 1; font-family: var(--fb); font-size: 15px; border: 1.5px solid var(--bd); border-radius: 6px; padding: 9px 14px; background: var(--l); color: var(--p); outline: none; }
.ldc-search-bar input[type=search]:focus { border-color: var(--g); box-shadow: 0 0 0 3px rgba(184,134,11,.15); }
.ldc-search-bar input[type=submit] { font-family: var(--fu); font-size: 13px; font-weight: 600; background: var(--g); color: #fff; border: none; border-radius: 6px; padding: 9px 18px; cursor: pointer; }

/* Logo fallback text */
.ldc-logo-text { text-decoration: none; font-family: var(--fd); font-size: 1.4rem; line-height: 1; }
.ldc-logo-lab  { font-weight: 700; color: var(--p); }
.ldc-logo-do   { font-weight: 400; font-style: italic; color: var(--g); }
.ldc-logo-conf { font-weight: 700; color: var(--p); }
.ldc-logo-text--light .ldc-logo-lab,
.ldc-logo-text--light .ldc-logo-conf { color: var(--cr); }

/* ── BUTTONS ────────────────────────────────────────────── */
.ldc-btn { font-family: var(--fu); font-size: 13px; font-weight: 600; background: var(--g); color: #fff; border: none; border-radius: 6px; padding: 10px 22px; cursor: pointer; text-decoration: none; display: inline-block; transition: background .15s; }
.ldc-btn:hover { background: #9A6F09; color: #fff; opacity: 1; }
.ldc-btn--sm { padding: 7px 16px; font-size: 12px; }
.ldc-btn--outline { background: transparent; border: 1.5px solid var(--bd); color: var(--p); }
.ldc-btn--outline:hover { border-color: var(--g); color: var(--g); background: transparent; }

/* ── TAGS ───────────────────────────────────────────────── */
.ldc-tag,.ldc-cats a,.ldc-article__tags a,
.post-tags a,.tags-links a { font-family: var(--fu); font-size: 11px; font-weight: 500; padding: 4px 12px; border-radius: 9999px; background: var(--st); color: var(--t); border: 1px solid var(--bd); text-decoration: none; display: inline-block; transition: all .15s; }
.ldc-tag:hover,.ldc-cats a:hover,.ldc-article__tags a:hover,
.post-tags a:hover,.tags-links a:hover,.ldc-tag--active { background: var(--g); color: #fff; border-color: var(--g); opacity: 1; }

/* ── HERO ───────────────────────────────────────────────── */
.ldc-hero { background: var(--p); padding: 72px 40px; text-align: center; }
.ldc-hero__eyebrow { font-family: var(--fu); font-size: 11px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--g); margin-bottom: 16px; }
.ldc-hero__title { font-family: var(--fd); font-size: clamp(2rem,5vw,3rem); font-weight: 700; color: var(--cr); line-height: 1.2; letter-spacing: -.02em; margin-bottom: 20px; max-width: 640px; margin-left: auto; margin-right: auto; }
.ldc-hero__lead { font-family: var(--fb); font-size: 1.1rem; color: rgba(238,233,220,.7); line-height: 1.7; max-width: 520px; margin: 0 auto 32px; font-style: italic; }

/* ── SECTION LABEL ──────────────────────────────────────── */
.ldc-section-label { font-family: var(--fu); font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--m); margin: 48px 0 20px; }

/* ── CATEGORY FILTER ────────────────────────────────────── */
.ldc-cats { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 28px; }

/* ── CARDS GRID ─────────────────────────────────────────── */
.ldc-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 24px; padding-bottom: 48px; }
@media(max-width:900px){.ldc-grid{grid-template-columns:repeat(2,1fr);}}
@media(max-width:580px){.ldc-grid{grid-template-columns:1fr;}}

.ldc-card { background: var(--st); border-radius: 8px; box-shadow: var(--sh-sm); overflow: hidden; transition: box-shadow .15s, transform .15s; }
.ldc-card:hover { box-shadow: var(--sh-md); transform: translateY(-2px); }
.ldc-card__link { text-decoration: none; display: block; color: inherit; }
.ldc-card__img { height: 160px; overflow: hidden; background: linear-gradient(135deg,var(--p) 0%,var(--s) 100%); }
.ldc-card__img img { width: 100%; height: 100%; object-fit: cover; }
.ldc-card__img--placeholder { display: flex; align-items: center; justify-content: center; }
.ldc-card__img--placeholder::after { content: 'imagem'; font-family: var(--fu); font-size: 11px; color: rgba(255,255,255,.3); }
.ldc-card__body { padding: 18px 20px; }
.ldc-card__cat { font-family: var(--fu); font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--g); margin-bottom: 6px; }
.ldc-card__cat a { color: var(--g); text-decoration: none; }
.ldc-card__title { font-family: var(--fd); font-size: 1rem; font-weight: 700; line-height: 1.35; color: var(--p); margin-bottom: 8px; }
.ldc-card__title a { color: var(--p); text-decoration: none; }
.ldc-card__title a:hover { color: var(--g); opacity: 1; }
.ldc-card__excerpt { font-family: var(--fb); font-size: .9rem; line-height: 1.65; color: var(--t); margin-bottom: 10px; }
.ldc-card__meta { font-family: var(--fu); font-size: 11px; color: var(--m); }

/* Featured card */
.ldc-card--featured { display: flex; }
@media(max-width:680px){.ldc-card--featured{flex-direction:column;}}
.ldc-card__img--featured { width: 280px; flex-shrink: 0; height: auto; min-height: 200px; }
.ldc-card__body--featured { padding: 28px 24px; }
.ldc-card--featured .ldc-card__title { font-size: 1.2rem; }

/* ── PAGINATION ─────────────────────────────────────────── */
.ldc-pagination { padding: 32px 0 64px; }
.ldc-pagination .page-numbers { display: inline-flex; }
.ldc-pagination ul { display: flex; gap: 8px; list-style: none; }
.ldc-pagination ul li a,
.ldc-pagination ul li span { font-family: var(--fu); font-size: 13px; color: var(--t); border: 1.5px solid var(--bd); border-radius: 6px; padding: 6px 14px; text-decoration: none; transition: all .15s; display: inline-block; }
.ldc-pagination ul li .current,
.ldc-pagination ul li a:hover { background: var(--g); border-color: var(--g); color: #fff; opacity: 1; }

/* ── PAGE HEADER ────────────────────────────────────────── */
.ldc-page-header { padding: 40px 0 0; }
.ldc-page-title { font-size: 2rem; margin-bottom: 32px; }

/* ── ARTICLE LAYOUT ─────────────────────────────────────── */
.ldc-article-layout { display: grid; grid-template-columns: 1fr 280px; gap: 48px; align-items: start; padding-top: 48px; padding-bottom: 80px; }
@media(max-width:900px){.ldc-article-layout{grid-template-columns:1fr;}}

.ldc-article-main {}
.ldc-article { }

.ldc-breadcrumb { display: flex; align-items: center; gap: 8px; margin-bottom: 24px; font-family: var(--fu); font-size: 12px; color: var(--m); }
.ldc-breadcrumb a { color: var(--g); text-decoration: none; }

.ldc-article__title { font-size: clamp(1.6rem,3vw,2.4rem); font-weight: 700; line-height: 1.2; letter-spacing: -.02em; margin-bottom: 18px; }
.ldc-article__lead { font-size: 1.15rem; line-height: 1.7; color: var(--t); font-style: italic; margin-bottom: 28px; }
.ldc-article__meta { display: flex; align-items: center; gap: 16px; padding-bottom: 28px; border-bottom: 1px solid var(--bs); margin-bottom: 36px; font-family: var(--fu); font-size: 12px; color: var(--m); }
.ldc-article__hero { border-radius: 8px; overflow: hidden; margin-bottom: 40px; }
.ldc-article__hero img { width: 100%; height: auto; }

.ldc-article__content { font-family: var(--fb); font-size: 1.05rem; line-height: 1.8; }
.ldc-article__content h2 { font-size: 1.6rem; font-weight: 600; margin: 2em 0 .75em; }
.ldc-article__content h3 { font-size: 1.25rem; font-weight: 600; margin: 1.75em 0 .6em; }
.ldc-article__content p { margin-bottom: 1.25em; }
.ldc-article__content img { border-radius: 4px; margin: 1.5em 0; }
.ldc-article__content ul,.ldc-article__content ol { margin: 1em 0 1em 1.5em; }
.ldc-article__content li { margin-bottom: .4em; }
.ldc-article__content ol { list-style: decimal; }
.ldc-article__content ul { list-style: disc; }

.ldc-article__tags { margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--bs); display: flex; gap: 6px; flex-wrap: wrap; }

/* Post nav */
.ldc-post-nav { display: flex; justify-content: space-between; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--bs); gap: 20px; }
.ldc-post-nav a { font-family: var(--fu); font-size: 13px; color: var(--g); text-decoration: none; font-weight: 500; }
.ldc-post-nav__next { text-align: right; }

/* ── SIDEBAR ────────────────────────────────────────────── */
.ldc-sidebar { position: sticky; top: 80px; }
.widget { background: var(--st); border-radius: 8px; padding: 20px 22px; box-shadow: var(--sh-sm); margin-bottom: 24px; border: none; }
.widget-title { font-family: var(--fu); font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--m); margin-bottom: 14px; }
.widget ul li { border-bottom: 1px solid var(--bs); }
.widget ul li:last-child { border: none; }
.widget ul li a { font-family: var(--fu); font-size: 13px; color: var(--g); text-decoration: none; display: block; padding: 7px 0; }
.widget ul li a:hover { color: var(--p); opacity: 1; }

/* ToC */
.ldc-toc__list a { font-family: var(--fu); font-size: 13px; color: var(--g); display: block; padding: 6px 0; border-bottom: 1px solid var(--bs); text-decoration: none; }
.ldc-toc__list a:last-child { border: none; }
.ldc-toc__list a:hover { color: var(--p); opacity: 1; }

/* Ad placeholder */
.ldc-ad-placeholder__box { height: 120px; background: var(--bd); border-radius: 6px; display: flex; align-items: center; justify-content: center; font-family: var(--fu); font-size: 11px; color: var(--m); }

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

/* ── FOOTER ─────────────────────────────────────────────── */
.ldc-footer { background: var(--p); padding: 48px 40px 28px; color: var(--cr); }
.ldc-footer__inner { max-width: 1100px; margin: 0 auto; display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 48px; margin-bottom: 40px; }
@media(max-width:760px){.ldc-footer__inner{grid-template-columns:1fr;gap:32px;}}

.ldc-footer__brand .custom-logo,.ldc-footer__brand img { height: 48px; width: auto; filter: brightness(0) invert(1); margin-bottom: 14px; }
.ldc-footer__tagline { font-family: var(--fb); font-size: 13px; line-height: 1.75; color: rgba(238,233,220,.6); max-width: 240px; margin-bottom: 16px; }

.ldc-newsletter-form { display: flex; gap: 8px; }
.ldc-newsletter-form input[type=email] { flex: 1; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); color: var(--cr); font-family: var(--fu); font-size: 12px; padding: 8px 12px; border-radius: 6px; outline: none; }
.ldc-newsletter-form input[type=email]::placeholder { color: rgba(238,233,220,.4); }
.ldc-newsletter-form button { background: var(--g); border: none; color: #fff; font-family: var(--fu); font-size: 12px; font-weight: 600; padding: 8px 14px; border-radius: 6px; cursor: pointer; white-space: nowrap; }
.ldc-newsletter-form button:hover { background: #9A6F09; }

.ldc-footer__col-title { font-family: var(--fu); font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--g); margin-bottom: 16px; }
.ldc-footer__col ul li { margin-bottom: 10px; }
.ldc-footer__col ul li a,.ldc-footer a { font-family: var(--fu); font-size: 13px; color: rgba(238,233,220,.6); text-decoration: none; transition: color .15s; }
.ldc-footer__col ul li a:hover,.ldc-footer a:hover { color: var(--cr); opacity: 1; }

.ldc-footer__bottom { max-width: 1100px; margin: 0 auto; border-top: 1px solid rgba(238,233,220,.1); padding-top: 24px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.ldc-footer__bottom span { font-family: var(--fu); font-size: 12px; color: rgba(238,233,220,.35); }

/* ── FORMS ──────────────────────────────────────────────── */
input[type=text],input[type=email],input[type=search],textarea,select { font-family: var(--fb); border: 1.5px solid var(--bd); border-radius: 6px; background: var(--l); color: var(--p); padding: 10px 14px; outline: none; width: 100%; transition: border-color .15s, box-shadow .15s; }
input:focus,textarea:focus,select:focus { border-color: var(--g); box-shadow: 0 0 0 3px rgba(184,134,11,.15); }

/* ── GUTENBERG CONTENT BLOCKS ───────────────────────────── */
.wp-block-image img { border-radius: 4px; }
.wp-block-quote { border-left: 4px solid var(--g); padding: 16px 20px; background: var(--st); font-style: italic; color: var(--t); margin: 1.5em 0; }
.wp-block-code { background: var(--st); border-radius: 8px; }
.wp-block-button .wp-block-button__link { background: var(--g); color: #fff; border-radius: 6px; }
.wp-block-button .wp-block-button__link:hover { background: #9A6F09; }
.has-petrol-color { color: var(--p); }
.has-old-gold-color { color: var(--g); }
.has-petrol-background-color { background-color: var(--p); }
.has-old-gold-background-color { background-color: var(--g); }

/* ── RESPONSIVE ─────────────────────────────────────────── */
@media(max-width:760px){
  .ldc-container,.ldc-footer,.ldc-hero,.ldc-search-bar { padding-left: 20px; padding-right: 20px; }
  .ldc-header__inner { padding: 0 20px; gap: 16px; }
  .ldc-hero { padding: 48px 20px; }
  .ldc-hero__title { font-size: 1.75rem; }
  .ldc-article-layout { padding-top: 24px; }
  .ldc-sidebar { display: none; }
  .ldc-footer__bottom { flex-direction: column; }
}
