/* Blog Styles – Focofy v1.1
   - Layout + componentes
   - Conteúdo (prose) centralizado e reaproveitável
*/

/* ===== Containers ===== */
.focofy-container{
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}
.focofy-container--read{
  max-width: 860px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ===== Blog Hero ===== */
.focofy-blog__hero{
  padding: 64px 0;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.focofy-blog__title{
  font-size: 42px;
  line-height: 1.1;
  margin: 0 0 12px;
}
.focofy-blog__desc{
  opacity: .85;
  margin: 0 0 18px;
  max-width: 60ch;
}
.focofy-blog__search{ max-width: 520px; }
.focofy-blog__content{ padding: 40px 0; }

/* ===== Cards / Grid ===== */
.focofy-blog__featured{ margin-bottom: 28px; }

.focofy-blog__grid{
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 18px;
}
@media (max-width: 980px){
  .focofy-blog__grid{ grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 620px){
  .focofy-blog__grid{ grid-template-columns: 1fr; }
}

.focofy-post{
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 18px;
  overflow: hidden;
  background: color-mix(in srgb, white 2%, transparent);
}
.focofy-post__media img{
  width: 100%;
  height: auto;
  display: block;
}
.focofy-post__body{ padding: 18px; }
.focofy-post__meta{
  font-size: 13px;
  opacity: .8;
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.focofy-post__meta .dot{ opacity: .6; }
.focofy-post__title{ margin: 0 0 10px; }
.focofy-post__title a{ text-decoration: none; color: inherit; }
.focofy-post__excerpt{ margin: 0; opacity: .9; }

/* ===== Pagination ===== */
.focofy-blog__pagination{
  margin-top: 26px;
  display: flex;
  justify-content: center;
}

/* ===== Single Post ===== */
.focofy-post-page{ padding: 42px 0; }
.focofy-post-single{ padding: 0; }

.focofy-breadcrumbs{
  font-size: 13px;
  opacity: .8;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0 0 14px;
}
.focofy-breadcrumbs a{ color: inherit; text-decoration: none; }
.focofy-breadcrumbs a:hover{ text-decoration: underline; }

.focofy-post-single__meta{
  font-size: 13px;
  opacity: .85;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 10px;
}
.focofy-post-single__meta .dot{ opacity: .6; }
.focofy-post-single__meta a{
  color: inherit;
  text-decoration: none;
  opacity: .95;
}
.focofy-post-single__meta a:hover{ text-decoration: underline; }

.focofy-post-single__title{
  font-size: 44px;
  line-height: 1.1;
  margin: 0 0 18px;
}

.focofy-post-single__cover{
  margin: 0 0 18px;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.08);
}
.focofy-post-single__cover img{
  display: block;
  width: 100%;
  height: auto;
}

/* ===== Prose (conteúdo do post) ===== */
.focofy-prose{
  font-size: 18px;
  line-height: 1.75;
  letter-spacing: .1px;
}
.focofy-prose p{ margin: 0 0 18px; }
.focofy-prose h2{ font-size: 28px; line-height: 1.25; margin: 34px 0 14px; }
.focofy-prose h3{ font-size: 22px; line-height: 1.3; margin: 26px 0 12px; }
.focofy-prose ul,
.focofy-prose ol{ margin: 0 0 18px; padding-left: 22px; }
.focofy-prose a{ text-decoration: underline; }
.focofy-prose img{
  max-width: 100%;
  height: auto;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.08);
}

/* =========================
   Blocks: Quote / Table / Gallery (Front)
   ========================= */

/* QUOTE */
.focofy-prose .wp-block-quote,
.focofy-prose blockquote{
  margin: 22px 0;
  padding: 14px 16px;
  border-left: 3px solid rgba(255,255,255,.2);
  background: color-mix(in srgb, white 3%, transparent);
  border-radius: 12px;
}
.focofy-prose .wp-block-quote p,
.focofy-prose blockquote p{ margin: 0; }
.focofy-prose .wp-block-quote cite{
  display: inline-block;
  margin-top: 10px;
  font-size: 13px;
  opacity: .75;
}

/* TABLE */
.focofy-prose .wp-block-table{
  margin: 18px 0 22px;
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.08);
  background: color-mix(in srgb, white 2%, transparent);
}
.focofy-prose .wp-block-table table{
  width: 100%;
  border-collapse: collapse;
  min-width: 620px;
}
.focofy-prose .wp-block-table th,
.focofy-prose .wp-block-table td{
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  border-right: 1px solid rgba(255,255,255,.06);
  text-align: left;
  vertical-align: top;
}
.focofy-prose .wp-block-table th:last-child,
.focofy-prose .wp-block-table td:last-child{ border-right: none; }
.focofy-prose .wp-block-table thead th{
  font-weight: 700;
  background: color-mix(in srgb, white 3%, transparent);
}
.focofy-prose .wp-block-table tbody tr:nth-child(even) td{
  background: color-mix(in srgb, white 1.5%, transparent);
}

/* GALLERY */
.focofy-prose .wp-block-gallery{
  margin: 18px 0 22px;
  gap: 12px;
}
.focofy-prose .wp-block-gallery .wp-block-image img{
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.08);
}
.focofy-prose .wp-block-gallery .wp-element-caption{
  font-size: 13px;
  opacity: .75;
  margin-top: 6px;
}

/* ===== Author box / CTA / Related ===== */
.focofy-authorbox {
  display:       flex;
  gap:           var(--space-5, 20px);
  align-items:   flex-start;
  margin-top:    var(--space-8, 32px);
  padding:       var(--space-6, 24px);
  border-radius: var(--radius-lg, 16px);
  border:        1px solid var(--color-border-subtle, rgba(255,255,255,.10));
  background:    var(--color-surface-2, rgba(255,255,255,.04));
}

.focofy-authorbox__avatar {
  flex-shrink: 0;
}

.focofy-authorbox__avatar img {
  width:         80px;
  height:        80px;
  border-radius: 999px;
  object-fit:    cover;
  border:        2px solid var(--color-accent, #0B8AD9);
  display:       block;
}

.focofy-authorbox__info {
  display:        flex;
  flex-direction: column;
  gap:            var(--space-1, 4px);
}

.focofy-authorbox__label {
  font-size:      var(--font-size-xs, 0.75rem);
  font-weight:    var(--fw-semibold, 600);
  text-transform: uppercase;
  letter-spacing: .08em;
  color:          var(--color-accent, #0B8AD9);
  margin:         0;
}

.focofy-authorbox__name {
  display:     block;
  font-size:   var(--font-size-lg, 1.125rem);
  font-weight: var(--fw-bold, 700);
  color:       var(--color-heading, #EAF2FF);
  margin:      0;
}

.focofy-authorbox__bio {
  margin:    var(--space-2, 8px) 0 0;
  font-size: var(--font-size-sm, 0.875rem);
  color:     var(--color-text-muted, #B8C7E6);
  line-height: var(--lh-normal, 1.6);
}

.focofy-post-cta{ margin-top: 16px; }

.focofy-btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
  border-radius: 14px;
  text-decoration: none;
  font-weight: 600;
  border: 1px solid rgba(255,255,255,.12);
  color: inherit;
  background: color-mix(in srgb, white 2%, transparent);
}
.focofy-btn--primary{
  background: var(--btn-primary-bg);
  color: var(--color-text-inverse);
  border-color: transparent;
}

.focofy-related{ margin-top: 38px; }
.focofy-related__title{ margin: 0 0 14px; font-size: 22px; }
.focofy-related__grid{
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 18px;
}
@media (max-width: 980px){
  .focofy-related__grid{ grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 620px){
  .focofy-related__grid{ grid-template-columns: 1fr; }
}

/* ===== Search ===== */
.focofy-search__section-title{ margin: 0 0 14px; font-size: 20px; }
.focofy-search__empty{
  padding: 18px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.08);
  background: color-mix(in srgb, white 2%, transparent);
}
.focofy-search__empty h2{ margin: 0 0 10px; }

.focofy-search__list{ display: grid; gap: 12px; }
.focofy-search__item{
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.08);
  background: color-mix(in srgb, white 2%, transparent);
}
.focofy-search__item-title{ margin: 0 0 8px; }
.focofy-search__item-title a{ color: inherit; text-decoration: none; }
.focofy-search__item-title a:hover{ text-decoration: underline; }
.focofy-search__item-excerpt{ margin: 0; opacity: .9; }

/* Archive tweaks */
.focofy-archive .focofy-blog__desc p{ margin: 0; opacity: .9; max-width: 70ch; }


/* ===== Single + Sidebar (AdSense) ===== */
.focofy-container--with-sidebar {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.focofy-single-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 40px;
  /* sem align-items:start — sidebar ocupa altura total do grid row,
     permitindo que position:sticky acompanhe o scroll do inicio ao fim */
}

.focofy-single-content {
  min-width: 0;
}

/* Sidebar — ocupa a altura total da linha do grid */
.focofy-single-sidebar {
  min-width: 0;
  position: relative;
}

/* sticky no inner — acompanha o scroll dentro da coluna */
.focofy-sidebar-inner {
  position: sticky;
  top: 100px; /* compensa header sticky de 80px */
  /* sem overflow:hidden aqui — quebra o sticky */
}

.focofy-sidebar-inner__box {
  border-radius: var(--radius-lg, 18px);
  border: 1px solid var(--color-border-subtle, rgba(255,255,255,.10));
  background: var(--color-surface-2, rgba(255,255,255,.04));
  padding: var(--space-5, 20px);
  overflow: hidden;
}

.focofy-sidebar__label {
  font-size: var(--font-size-xs, 11px);
  font-weight: var(--fw-semibold, 600);
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--color-text-muted, rgba(255,255,255,.5));
  margin: 0 0 var(--space-3, 12px);
  text-align: center;
}

.focofy-adsense-widget {
  display: block;
  width: 100%;
  min-height: 100px;
  text-align: center;
}

.focofy-adsense-widget ins,
.focofy-adsense-widget > * {
  display: block;
  width: 100% !important;
}

/* Responsive: sidebar some em telas pequenas */
@media (max-width: 1024px) {
  .focofy-single-layout {
    grid-template-columns: 1fr;
  }
  .focofy-single-sidebar {
    display: none;
  }
}


/* ===== Banner proprio (sidebar) ===== */
/* focofy-custom-banner movido para bloco CTA abaixo */

.focofy-custom-banner__link {
  display: block;
  border-radius: 14px;
  overflow: hidden;
  transition: opacity .2s ease, transform .2s ease;
}

.focofy-custom-banner__link:hover {
  opacity: .9;
  transform: translateY(-2px);
}

.focofy-custom-banner__img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.08);
}

.focofy-sidebar__label--mt {
  margin-top: 20px;
}

/* ===== Banner CTA ===== */
.focofy-custom-banner {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.focofy-banner-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding-top: 4px;
}

.focofy-banner-cta__btn {
  display: block;
  width: 100%;
  padding: 13px 16px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 15px;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: opacity .18s ease, transform .18s ease, box-shadow .18s ease;
  letter-spacing: .01em;
}

.focofy-banner-cta__btn:hover {
  opacity: .88;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,.25);
}

/* Primario */
.focofy-banner-cta__btn--primary {
  background: var(--color-accent, #0B8AD9);
  color: #fff;
  border: none;
  box-shadow: 0 4px 14px color-mix(in srgb, var(--color-accent, #0B8AD9) 35%, transparent);
}

/* Secundario (outline) */
.focofy-banner-cta__btn--secondary {
  background: transparent;
  color: inherit;
  border: 2px solid currentColor;
  opacity: .9;
}

/* Ghost */
.focofy-banner-cta__btn--ghost {
  background: color-mix(in srgb, white 8%, transparent);
  color: inherit;
  border: 1px solid rgba(255,255,255,.15);
}

.focofy-banner-cta__sub {
  margin: 0;
  font-size: 11px;
  opacity: .5;
  text-align: center;
  line-height: 1.4;
}


/* ===== Touch Targets & Mobile Font Fixes (Playwright Audit) ===== */

/* Breadcrumbs — min 44px touch target */
.focofy-breadcrumbs a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 4px;
  color: inherit;
  text-decoration: none;
}

/* Meta do post — aumentar fonte e target no mobile */
@media (max-width: 768px) {
  .focofy-post-single__meta {
    font-size: 14px;
    gap: 8px;
  }

  .focofy-post-single__meta a,
  .focofy-post-single__meta span {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }

  /* TOC links — touch target */
  [class*="toc"] a,
  [id*="toc"] a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 2px 0;
  }

  /* Links internos no prose — mais espaçamento vertical */
  .focofy-prose a {
    padding-top: 4px;
    padding-bottom: 4px;
  }

  /* Sidebar label minimo */
  .focofy-sidebar__label {
    font-size: 12px;
  }

  /* Tags */
  .focofy-post-single__tags a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 8px;
  }
}

/* Cards relacionados — links com min-height */
.focofy-related__grid .focofy-post a {
  display: block;
}


/* ===== Reading Progress Bar ===== */
#focofy-reading-bar-wrap {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  z-index: 9999;
  background: rgba(255,255,255,.06);
  pointer-events: none;
}

#focofy-reading-bar {
  height: 100%;
  width: 0%;
  background: var(--btn-primary-bg, #f97316);
  transition: width .1s linear;
  border-radius: 0 2px 2px 0;
}


/* ===== Mid-Content CTA ===== */
.focofy-mid-cta {
  margin: 32px 0;
  padding: 24px 28px;
  border-radius: 18px;
  text-align: center;
  clear: both;
}

.focofy-mid-cta--accent {
  background: var(--btn-primary-bg, #f97316);
  color: var(--color-text-inverse, #fff);
}

.focofy-mid-cta--subtle {
  border: 2px solid rgba(255,255,255,.15);
  background: color-mix(in srgb, white 3%, transparent);
}

.focofy-mid-cta--dark {
  background: rgba(0,0,0,.35);
  border: 1px solid rgba(255,255,255,.1);
}

.focofy-mid-cta__title {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 8px;
  line-height: 1.3;
}

.focofy-mid-cta__desc {
  margin: 0 0 16px;
  opacity: .9;
  font-size: 15px;
  line-height: 1.5;
}

.focofy-mid-cta__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 28px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  transition: opacity .18s, transform .18s;
  cursor: pointer;
  min-height: 44px;
}

.focofy-mid-cta--accent .focofy-mid-cta__btn {
  background: rgba(0,0,0,.25);
  color: inherit;
  border: 2px solid rgba(255,255,255,.4);
}

.focofy-mid-cta--subtle .focofy-mid-cta__btn,
.focofy-mid-cta--dark .focofy-mid-cta__btn {
  background: var(--btn-primary-bg, #f97316);
  color: var(--color-text-inverse, #fff);
  border: none;
}

.focofy-mid-cta__btn:hover {
  opacity: .88;
  transform: translateY(-2px);
}

@media (max-width: 620px) {
  .focofy-mid-cta {
    padding: 20px 18px;
    margin: 24px 0;
  }
  .focofy-mid-cta__btn {
    width: 100%;
  }
}
