/* ═══════════════════════════════════════════════════════════
   TERRA EDITORIAL — CSS FINAL OTIMIZADO (MOBILE FIRST)
   Aparência > Personalizar > CSS Adicional
   ═══════════════════════════════════════════════════════════ */

:root{
  --te-terracotta:#B8572A;
  --te-terracotta-dk:#8E3F1C;
  --te-terracotta-lt:#D4845E;
  --te-olive:#3D4F2F;
  --te-slate:#2C2C2C;
  --te-slate-md:#4A4A4A;
  --te-slate-lt:#5F5F5F;
  --te-cream:#FAF6F1;
  --te-cream-dk:#F0E9DF;
  --te-white:#FFFFFF;
  --te-divider:#E5DDD3;

  --te-font-heading:Georgia,"Times New Roman",serif;
  --te-font-body:system-ui,-apple-system,"Segoe UI",Arial,sans-serif;

  --te-shadow-card:0 1px 2px rgba(0,0,0,.05);
  --te-shadow-hover:0 4px 12px rgba(0,0,0,.08);

  --te-radius-sm:4px;
  --te-radius-md:8px;
  --te-radius-lg:10px;

  --te-container:1120px;
  --te-gap:18px;
  --te-pad-x:18px;
  --te-section-y:26px;
  --te-section-y-lg:44px;
  --te-ease:cubic-bezier(.4,0,.2,1);
}

/* Base */
html{-webkit-text-size-adjust:100%}
body{
  font-family:var(--te-font-body);
  color:var(--te-slate);
  background:var(--te-cream);
}
h1,h2,h3,h4,h5,h6,.site-title,.entry-title{
  font-family:var(--te-font-heading);
  color:var(--te-slate);
}
a{color:var(--te-terracotta)}
a:hover{color:var(--te-terracotta-dk)}
img{max-width:100%;height:auto;display:block}
::selection{background:var(--te-terracotta);color:#fff}
:focus-visible{outline:2px solid var(--te-terracotta);outline-offset:2px}

/* Limpeza da home */
.home .entry-header,
.home .comments-area,
.home #comments,
.home .comment-respond,
.home .sharedaddy,
.home .jp-relatedposts,
.home .post-navigation,
.home .post-navigation-link-previous,
.home .post-navigation-link-next{
  display:none;
}

/* Header */
.site-header{
  position:static;
  background:var(--te-cream);
  border-bottom:1px solid var(--te-divider);
}
.site-header .site-header-wrap,
.site-header .site-header-inner-wrap{
  max-width:var(--te-container);
  margin-inline:auto;
}
.site-branding .site-title,
.site-branding .site-title a{
  font-family:var(--te-font-heading);
  font-size:17px;
  line-height:1.2;
  color:var(--te-slate);
  text-decoration:none;
}
.primary-navigation a,
.main-navigation a{
  font-family:var(--te-font-body);
  font-size:13px;
  font-weight:400;
  color:var(--te-slate-md);
  padding:6px 10px;
  white-space:nowrap;
  text-decoration:none;
}
.primary-navigation a:hover,
.main-navigation a:hover{color:var(--te-terracotta)}
.current-menu-item>a,
.current_page_item>a{
  color:var(--te-terracotta);
  font-weight:600;
}
.header-search-toggle,
.menu-toggle-open,
.menu-toggle-close,
.mobile-toggle-open-container,
.mobile-toggle-close-container{
  color:var(--te-slate);
}

/* Wrappers comuns */
.te-hero,
.te-strip,
.te-section,
.te-section--cream,
.te-section--white,
.te-section--cream-dk{
  padding-inline:var(--te-pad-x);
}
.te-hero>*,
.te-strip>*,
.te-section>*,
.te-section--cream>*,
.te-section--white>*,
.te-section--cream-dk>*{
  max-width:var(--te-container);
  margin-inline:auto;
}

/* Hero */
.te-hero{
  background:var(--te-cream);
  padding-top:22px;
  padding-bottom:26px;
}
.te-hero>.wp-block-columns{
  display:flex;
  flex-direction:column;
  gap:18px;
  align-items:center;
}
.te-hero>.wp-block-columns>.wp-block-column{flex-basis:100%}
.te-overline{
  margin:0 0 8px;
  font-size:11px;
  font-weight:700;
  letter-spacing:.08em;
  text-transform:uppercase;
}
.te-text-olive{color:var(--te-olive)}
.te-hero-title{
  margin:0 0 10px;
  font-family:var(--te-font-heading);
  font-size:clamp(26px,5.5vw,42px);
  line-height:1.08;
  font-weight:400;
  color:var(--te-slate);
}
.te-subtitle{
  margin:0 0 16px;
  max-width:58ch;
  font-size:15px;
  line-height:1.6;
  color:var(--te-slate-md);
}
.te-hero .wp-block-buttons{
  gap:8px;
  flex-wrap:wrap;
}
.te-hero-image,
.te-hero-image figure{margin:0}
.te-hero-image img{
  width:100%;
  aspect-ratio:4/3;
  object-fit:cover;
  border-radius:var(--te-radius-lg);
}

/* Strip */
.te-strip{
  background:var(--te-slate);
  padding-top:12px;
  padding-bottom:12px;
}
.te-strip>.wp-block-columns{
  display:flex;
  flex-direction:column;
  gap:12px;
  align-items:center;
  text-align:center;
}
.te-strip__label{
  margin:0;
  font-size:13px;
  color:rgba(255,255,255,.64);
}
.te-strip__label strong{
  color:#fff;
  font-family:var(--te-font-heading);
  font-size:17px;
  font-weight:400;
}
.te-strip .wp-block-buttons{justify-content:center}
.te-strip__btn .wp-block-button__link{
  padding:8px 14px;
  font-size:13px;
  color:var(--te-terracotta-lt);
  border-color:var(--te-terracotta-lt);
  background:transparent;
}

/* Seções */
.te-section,
.te-section--cream,
.te-section--white,
.te-section--cream-dk{
  padding-top:var(--te-section-y);
  padding-bottom:var(--te-section-y);
}
.te-section--cream{background:var(--te-cream)}
.te-section--white{background:var(--te-white)}
.te-section--cream-dk{background:var(--te-cream-dk)}
.te-section-title{
  margin:0 0 8px;
  font-family:var(--te-font-heading);
  font-size:22px;
  line-height:1.14;
  font-weight:400;
  color:var(--te-slate);
}
.te-mb-xl{margin-bottom:20px}
.te-mt-xl{margin-top:20px}
.te-divider{
  margin:24px 0;
  border-color:var(--te-divider);
}

/* Botões */
.te-btn-primary .wp-block-button__link,
.te-btn-outline .wp-block-button__link{
  padding:10px 16px;
  border-radius:var(--te-radius-sm);
  font-size:14px;
  font-weight:600;
  transition:background-color .2s var(--te-ease),color .2s var(--te-ease),border-color .2s var(--te-ease);
}
.te-btn-primary .wp-block-button__link{
  background:var(--te-terracotta);
  color:#fff;
  border:none;
}
.te-btn-primary .wp-block-button__link:hover{background:var(--te-terracotta-dk)}
.te-btn-outline .wp-block-button__link{
  background:transparent;
  color:var(--te-terracotta);
  border:1px solid var(--te-terracotta);
}
.te-btn-outline .wp-block-button__link:hover{
  background:var(--te-terracotta);
  color:#fff;
}

/* Linhas / grids */
.te-guides-row,
.te-cats-row{
  display:flex;
  flex-direction:column;
  gap:var(--te-gap);
}
.te-guides-row .wp-block-column,
.te-cats-row .wp-block-column{flex-basis:100%}

/* Cards de guias */
.te-guide-card{
  position:relative;
  overflow:hidden;
  padding:0 16px 16px;
  background:var(--te-white);
  border:1px solid var(--te-divider);
  border-radius:var(--te-radius-md);
  box-shadow:var(--te-shadow-card);
}
.te-guide-card::before{
  content:"";
  display:block;
  height:4px;
  background:var(--te-terracotta);
}
.te-guide-card--terracotta::before{background:#B8572A}
.te-guide-card--brown::before{background:#6B4D3A}
.te-guide-card--olive::before{background:#3D4F2F}
.te-guide-card--green::before{background:#5A6E4A}
.te-guide-card--earth::before{background:#7A6C5B}
.te-guide-card--blue::before{background:#4A7C8F}

.te-guide-card .te-badge{
  display:inline-block;
  margin:12px 0 0;
  padding:3px 10px;
  border-radius:999px;
  font-size:11px;
  font-weight:700;
  letter-spacing:.04em;
  text-transform:uppercase;
}
.te-badge--olive{
  background:var(--te-olive);
  color:#fff;
}
.te-guide-card__title{
  margin:10px 0 8px;
  font-family:var(--te-font-heading);
  font-size:18px;
  line-height:1.24;
  font-weight:400;
  color:var(--te-slate);
}
.te-guide-card__desc{
  margin:0 0 12px;
  font-size:13px;
  line-height:1.5;
  color:var(--te-slate-lt);
}
.te-guide-card__link{
  margin:0;
  font-size:13px;
  font-weight:700;
}
.te-guide-card__link a{
  color:var(--te-terracotta);
  text-decoration:none;
}

/* Pills */
.te-cat-pill{
  margin:0;
  padding:12px 14px;
  background:var(--te-white);
  border-radius:var(--te-radius-md);
  box-shadow:var(--te-shadow-card);
}
.te-cat-pill a{
  color:var(--te-slate);
  text-decoration:none;
  font-size:14px;
  font-weight:500;
}
.te-cat-pill--coffee:hover{background:#6B4D3A}
.te-cat-pill--agri:hover{background:#3D4F2F}
.te-cat-pill--fish:hover{background:#4A7C8F}
.te-cat-pill--forest:hover{background:#5A6E4A}
.te-cat-pill:hover a{color:#fff}

/* Query loop / posts */
.wp-block-post-template{gap:16px}
.wp-block-post-template .wp-block-post,
.te-latest-posts.wp-block-latest-posts li{
  overflow:hidden;
  background:var(--te-white);
  border-radius:var(--te-radius-md);
  box-shadow:var(--te-shadow-card);
}
.wp-block-post-template .wp-block-post{padding-bottom:14px}
.wp-block-post-template .wp-block-post-featured-image,
.te-latest-posts .wp-block-latest-posts__featured-image{margin:0}
.wp-block-post-template .wp-block-post-featured-image img,
.te-latest-posts .wp-block-latest-posts__featured-image img{
  width:100%;
  aspect-ratio:3/2;
  object-fit:cover;
  border-radius:0;
}
.wp-block-post-template .wp-block-post-terms,
.wp-block-post-template .te-card__cat{
  margin:0;
  padding:12px 14px 0;
}
.wp-block-post-template .wp-block-post-terms a,
.wp-block-post-template .te-card__cat a{
  display:inline-block;
  padding:3px 10px;
  border-radius:999px;
  background:var(--te-terracotta);
  color:#fff;
  font-size:11px;
  font-weight:700;
  letter-spacing:.04em;
  line-height:1.4;
  text-transform:uppercase;
  text-decoration:none;
}
.wp-block-post-template .wp-block-post-title,
.te-latest-posts .wp-block-latest-posts__post-title{
  margin:0;
  padding:8px 14px 0;
  font-family:var(--te-font-heading);
  font-size:17px;
  line-height:1.24;
  font-weight:400;
}
.wp-block-post-template .wp-block-post-title a,
.te-latest-posts .wp-block-latest-posts__post-title{
  display:block;
  color:var(--te-slate);
  text-decoration:none;
}
.wp-block-post-template .wp-block-post-excerpt,
.te-latest-posts .wp-block-latest-posts__post-excerpt{
  margin:0;
  padding:8px 14px 0;
  font-size:14px;
  line-height:1.5;
  color:var(--te-slate-lt);
}
.wp-block-post-template .wp-block-post-excerpt__excerpt{margin:0}
.wp-block-post-template .wp-block-post-date,
.te-latest-posts .wp-block-latest-posts__post-date{
  margin:0;
  padding:8px 14px 0;
  font-size:12px;
  color:var(--te-slate-lt);
}
.te-latest-posts .wp-block-latest-posts__post-date{padding-bottom:14px}
.te-latest-posts.wp-block-latest-posts{
  list-style:none;
  padding:0;
  margin:0;
}
.te-latest-posts li{
  padding:0;
  margin:0 0 16px;
}

/* Footer */
.site-footer{
  background:var(--te-slate);
  color:rgba(255,255,255,.64);
}
.site-footer a{color:rgba(255,255,255,.68)}
.site-footer a:hover{color:#fff}
.site-footer strong{color:#fff}
.site-info{color:rgba(255,255,255,.38)}
.site-footer .widget,
.site-footer .widget-area .widget{
  margin:0;
  padding:0;
  background:transparent;
  border:none;
  box-shadow:none;
  color:rgba(255,255,255,.64);
}
.site-footer .widget p,
.site-footer .widget span,
.site-footer .textwidget,
.site-footer .custom-html-widget p{
  color:rgba(255,255,255,.64);
  background:transparent;
}
.site-info a[href*="kadencewp"]{display:none}

/* Mobile: reduz custo visual */
@media (max-width:767px){
  .te-hero-title{font-size:28px}
  .te-section-title{font-size:22px}

  .te-hero-image img{
    aspect-ratio:16/9;
  }

  .te-guide-card:hover,
  .wp-block-post-template .wp-block-post:hover,
  .te-latest-posts li:hover,
  .te-cat-pill:hover{
    transform:none;
    box-shadow:var(--te-shadow-card);
  }

  .te-btn-primary .wp-block-button__link:hover,
  .te-btn-outline .wp-block-button__link:hover{
    transform:none;
  }
}

/* Tablet/Desktop */
@media (min-width:768px){
  .te-hero,
  .te-strip,
  .te-section,
  .te-section--cream,
  .te-section--white,
  .te-section--cream-dk{
    padding-inline:24px;
  }

  .te-hero{
    padding-top:34px;
    padding-bottom:38px;
  }

  .te-strip{
    padding-top:14px;
    padding-bottom:14px;
  }

  .te-strip>.wp-block-columns{
    flex-direction:row;
    justify-content:space-between;
    text-align:left;
  }

  .te-hero>.wp-block-columns{
    flex-direction:row;
    gap:30px;
  }

  .te-hero>.wp-block-columns>.wp-block-column{
    flex:1 1 0;
  }

  .te-section,
  .te-section--cream,
  .te-section--white,
  .te-section--cream-dk{
    padding-top:var(--te-section-y-lg);
    padding-bottom:var(--te-section-y-lg);
  }

  .te-section-title{font-size:26px}

  .te-guides-row,
  .te-cats-row{
    flex-direction:row;
    flex-wrap:wrap;
  }
}

/* Efeitos leves só no desktop grande */
@media (min-width:1025px){
  .te-guide-card,
  .wp-block-post-template .wp-block-post,
  .te-latest-posts li,
  .te-cat-pill{
    transition:
      box-shadow .22s var(--te-ease),
      transform .22s var(--te-ease),
      border-color .22s var(--te-ease),
      color .22s var(--te-ease),
      background-color .22s var(--te-ease);
  }

  .te-guide-card:hover{
    transform:translateY(-2px);
    border-color:var(--te-terracotta);
    box-shadow:var(--te-shadow-hover);
  }

  .te-guide-card:hover .te-guide-card__link a,
  .wp-block-post-template .wp-block-post:hover .wp-block-post-title a{
    color:var(--te-terracotta);
  }

  .wp-block-post-template .wp-block-post:hover,
  .te-latest-posts li:hover{
    transform:translateY(-2px);
    box-shadow:var(--te-shadow-hover);
  }

  .te-btn-primary .wp-block-button__link:hover,
  .te-btn-outline .wp-block-button__link:hover{
    transform:translateY(-1px);
  }
}

/* Reduced motion */
@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{
    animation:none !important;
    transition:none !important;
    scroll-behavior:auto !important;
  }
}
.wp-post-image, .entry-thumbnail img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;  /* ajuste ao ratio real */
}
a[href="#main"] { display: none !important; 
}
@media (max-width: 768px) {
  .te-hero-image img {
    max-height: 420px;
    width: 100%;
    object-fit: cover;
    object-position: center top;
  }
}
/* Garante aspect-ratio mesmo antes da imagem carregar */
.wp-block-post-featured-image img,
.entry-thumbnail img,
figure.wp-block-image img {
  width: 100%;
  height: auto;
}

/* Para thumbnails 16:9 */
.wp-block-post-featured-image {
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

/* Para thumbnails 1:1 (posts com imagem quadrada) */
.wp-block-post-template .wp-block-post-featured-image {
  aspect-ratio: 1 / 1;
  overflow: hidden;
}
/* Corrige o alinhamento do bloco newsletter - negaciona o padding do container pai (24px) */
.wp-block-group.te-section.te-section--cream-dk 
.wp-block-group__inner-container > 
.wp-block-group.alignfull.is-style-section-3 {
  margin-left: -24px !important;
  margin-right: -24px !important;
  width: calc(100% + 48px) !important;
  max-width: calc(100% + 48px) !important;
}

/* =====================================================
   CORREÇÕES HOMEPAGE - ruygripp.com.br
   Versão final - Março 2026
   ===================================================== */

/* 1. Remove paragrafos vazios do Gutenberg */
.entry-content > p:empty,
.single-content > p:empty {
  display: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* 2. Remove margin-bottom entre secoes */
.wp-block-group.te-section,
.wp-block-group.te-strip {
  margin-bottom: 0 !important;
}

/* 3. Remove margin-top da content-area */
.content-area {
  margin-top: 0 !important;
}

/* 4. Reduz padding do hero */
.wp-block-group.te-hero {
  padding-top: 24px !important;
  padding-bottom: 24px !important;
  margin-bottom: 0 !important;
}

/* 5. Remove padding cream ao redor do newsletter */
.wp-block-group.te-section--cream-dk {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

/* 6. Fundo escuro + texto claro no newsletter */
.wp-block-group.alignfull.is-style-section-3 {
  background-color: #2C2C2A !important;
  color: #fff !important;
  padding-top: 56px !important;
  padding-bottom: 56px !important;
}
.wp-block-group.alignfull.is-style-section-3 h2,
.wp-block-group.alignfull.is-style-section-3 p {
  color: #fff !important;
}

/* 7. Remove padding duplo do inner container do newsletter */
.wp-block-group.alignfull.is-style-section-3 > .wp-block-group__inner-container {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

/* 8. Newsletter - full viewport width breakout */
.wp-block-group.alignfull.is-style-section-3 {
  width: 100vw !important;
  max-width: 100vw !important;
  margin-left: calc(50% - 50vw) !important;
  margin-right: calc(50% - 50vw) !important;
  box-sizing: border-box !important;
}

/* 9. Thumbnails dos posts com proporcao fixa */
.wp-block-post-featured-image {
  aspect-ratio: 16 / 9;
  overflow: hidden;
}
.wp-block-post-featured-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 10. TEMAS - pills sem quebra de linha e row com wrap */
.te-cats-row {
  flex-wrap: wrap !important;
  gap: 8px !important;
}
.te-cats-row .wp-block-column {
  flex: 0 0 auto !important;
  width: auto !important;
  min-width: unset !important;
}
.te-cat-pill,
.te-cat-pill a {
  white-space: nowrap !important;
  display: inline-block !important;
}

/* 11. MOBILE - Hero: empilha imagem abaixo do texto */
@media (max-width: 767px) {
  .te-hero .wp-block-columns {
    flex-direction: column !important;
  }
  .te-hero .wp-block-column {
    flex-basis: 100% !important;
    width: 100% !important;
  }
  .te-hero-image img {
    max-height: 280px !important;
    width: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
  }
}

/* 12. MOBILE - Newsletter: input e botao em coluna */
@media (max-width: 600px) {
  .emailBtnElement {
    flex-direction: column !important;
    gap: 8px !important;
  }
  .emailBtnElement input[type="email"] {
    width: 100% !important;
  }
  .emailBtnElement button,
  .emailBtnElement input[type="submit"] {
    width: 100% !important;
  }
}

/* Hover colors para os 3 temas novos - iguais ao comportamento dos originais */
.te-cat-pill--stoic:hover { background: #5A5490 !important; }
.te-cat-pill--bible:hover { background: #8E5A4A !important; }
.te-cat-pill--health:hover { background: #4A7A5A !important; }

/* === CENTRALIZAÇÃO - Temas e Footer === */

/* Temas do site: pills centralizados horizontalmente */
.te-cats-row {
  justify-content: center !important;
}

/* Título da secao Temas: centralizado */
.wp-block-group.te-section--cream .te-section-title {
  text-align: center !important;
}

/* Footer: garante alinhamento centralizado no content */
.site-footer-wrap {
  padding-left: 24px !important;
  padding-right: 24px !important;
  box-sizing: border-box !important;
}
.site-middle-footer-inner-wrap {
  width: 100% !important;
  max-width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}
.site-footer-row-container-inner {
  width: 100% !important;
  max-width: 100% !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}
.site-lower-footer-row {
  width: 100% !important;
  max-width: 100% !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  text-align: center !important;
}

/* Remove espaço cream abaixo do footer */
body {
  background-color: #2C2C2A !important;
}
.site-footer {
  position: relative;
  z-index: 1;
}