/*
Theme Name: Matheus Cruz Psicólogo
Theme URI: 
Author: 
Author URI: 
Description: Tema personalizado para o site do psicólogo Matheus Cruz. Seções institucionais editáveis via ACF, blog nativo em Gutenberg.
Version: 1.1
Requires PHP: 7.4
Text Domain: matheus-cruz
*/

/* ACESSIBILIDADE — leitores de tela e navegação por teclado */
.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap;
}
.skip-link.screen-reader-text:focus {
  position: fixed !important;
  top: 8px; left: 8px;
  width: auto; height: auto;
  clip: auto;
  z-index: 999;
  background: var(--green);
  color: var(--white);
  padding: 12px 20px;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
}
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}

:root {
    --green: #2E8558;
    --green-hover: #6FCF97;
    --charcoal: #33312D;
    --gray: #6B655D;
    --sand: #F5F0E6;
    --sand-deep: #E8DFCB;
    --white: #FFFFFF;
    --radius-lg: 28px;
    --radius-md: 18px;
    --font-display: 'Fraunces', serif;
    --font-body: 'Work Sans', sans-serif;
  }
  html { scroll-behavior: smooth; }
  * { box-sizing: border-box; margin: 0; padding: 0; }
  body {
    font-family: var(--font-body);
    color: var(--charcoal);
    background: var(--white);
    line-height: 1.6;
  }
  img, svg { display: block; max-width: 100%; }
  a { color: inherit; text-decoration: none; }
  .wrap { max-width: 1080px; margin: 0 auto; padding: 0 32px; }
  section { padding: 96px 0; scroll-margin-top: 84px; }
  .alt { background: var(--sand); }

  h1, h2, h3 { font-family: var(--font-display); font-weight: 500; color: var(--charcoal); line-height: 1.15; }
  h1 { font-size: 52px; font-weight: 600; }
  h2 { font-size: 36px; }
  h3 { font-size: 20px; }
  p { color: var(--gray); }
  .eyebrow {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: 13px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase;
    color: var(--green); margin-bottom: 16px;
  }
  .eyebrow::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--green); }

  .btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 15px 28px; border-radius: 999px;
    font-family: var(--font-body); font-weight: 600; font-size: 15px;
    border: none; cursor: pointer; transition: background 0.2s ease;
  }
  .btn-primary { background: var(--green); color: var(--white); }
  .btn-primary:hover { background: var(--green-hover); color: var(--charcoal); }
  .btn-outline { background: transparent; color: var(--charcoal); border: 2px solid rgba(51,49,45,0.32); }
  .btn-outline:hover { border-color: var(--green); color: var(--green); background: rgba(46,133,88,0.06); }

  /* NAV */
  header {
    position: -webkit-sticky; position: sticky; top: 0; z-index: 100;
  }
  body.admin-bar header { top: 32px; }
  @media screen and (max-width: 782px) {
    body.admin-bar header { top: 46px; }
  }
  nav {
    background: rgba(255,255,255,0.92); backdrop-filter: blur(6px);
    border-bottom: 1px solid var(--sand-deep);
  }
  nav .wrap { display: flex; align-items: center; justify-content: space-between; padding: 20px 32px; }
  .logo { font-family: var(--font-display); font-weight: 600; font-size: 19px; }
  .nav-links { display: flex; gap: 32px; font-size: 14px; font-weight: 500; }
  .nav-links a { position: relative; padding-bottom: 5px; }
  .nav-links a::after {
    content: ''; position: absolute; left: 0; bottom: -1px; height: 2px; width: 0;
    background: var(--green); border-radius: 999px;
    transition: width 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  }
  .nav-links a:hover::after, .nav-links a.active::after { width: 100%; }
  .nav-links a:hover, .nav-links a.active { color: var(--green); }
  @media (max-width: 720px) { .nav-links { display: none; } }

  /* HERO */
  .hero { padding: 88px 0 100px; background: var(--sand); position: relative; overflow: hidden; }
  .hero .wrap { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 56px; align-items: center; }
  .hero p.lead { font-size: 18px; margin: 20px 0 32px; max-width: 460px; }
  .hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 22px; }
  .trust-note { font-size: 13px; color: var(--gray); }
  .breathing-wrap { display: flex; align-items: center; justify-content: center; position: relative; height: 340px; cursor: pointer; }
  .breath-follow { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1); will-change: transform; }
  .breath-circle {
    position: absolute; border-radius: 50%;
  }
  .b1 { width: 340px; height: 340px; background: transparent; border: 2px solid rgba(46,133,88,0.35); animation: breathe 8s ease-in-out infinite; }
  .b2 { width: 250px; height: 250px; background: transparent; border: 2px solid rgba(46,133,88,0.45); animation: breathe 8s ease-in-out infinite; animation-delay: -2.6s; }
  .b3 { width: 160px; height: 160px; background: #D8E9D5; border: 2px solid rgba(46,133,88,0.45);
        display: flex; align-items: center; justify-content: center; animation: breathe 8s ease-in-out infinite; animation-delay: -5.2s; }
  .b3 span { font-family: var(--font-body); font-weight: 500; font-size: 14px; color: var(--charcoal); text-align: center; padding: 0 22px; }
  @keyframes breathe {
    0%, 100% { transform: scale(0.9); }
    50% { transform: scale(1.06); }
  }
  @media (prefers-reduced-motion: reduce) {
    .b1, .b2, .b3 { animation: none; }
    .breath-follow { transition: none; }
  }

  /* ENTRADA SUTIL POR SEÇÃO */
  .reveal { opacity: 0; transform: translateY(64px) scale(0.97); transition: opacity 0.85s cubic-bezier(0.16, 1, 0.3, 1), transform 0.85s cubic-bezier(0.16, 1, 0.3, 1); }
  .reveal.is-visible { opacity: 1; transform: translateY(0) scale(1); }
  @media (prefers-reduced-motion: reduce) {
    .reveal { opacity: 1; transform: none; transition: none; }
  }

  /* LINHA DE DESTAQUE — desenha ao entrar, dá ritmo visual entre seções */
  .accent-line {
    width: 0; height: 3px; background: var(--green); border-radius: 999px; margin-bottom: 18px;
    transition: width 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.2s;
  }
  .reveal.is-visible .accent-line { width: 56px; }
  @media (prefers-reduced-motion: reduce) {
    .accent-line { width: 56px; transition: none; }
  }

  /* CARDS ENTRAM EM CASCATA DEPOIS DA SEÇÃO */
  .steps-grid .step-card, .spec-grid .spec-card, .blog-grid .blog-card {
    opacity: 0; transform: translateY(46px) scale(0.96);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  }
  .reveal.is-visible .steps-grid .step-card,
  .reveal.is-visible .spec-grid .spec-card,
  .reveal.is-visible .blog-grid .blog-card { opacity: 1; transform: translateY(0) scale(1); }
  .steps-grid .step-card:nth-child(1), .spec-grid .spec-card:nth-child(1), .blog-grid .blog-card:nth-child(1) { transition-delay: 0.25s; }
  .steps-grid .step-card:nth-child(2), .spec-grid .spec-card:nth-child(2), .blog-grid .blog-card:nth-child(2) { transition-delay: 0.4s; }
  .steps-grid .step-card:nth-child(3), .spec-grid .spec-card:nth-child(3), .blog-grid .blog-card:nth-child(3) { transition-delay: 0.55s; }
  .spec-grid .spec-card:nth-child(4) { transition-delay: 0.7s; }
  .spec-grid .spec-card:nth-child(5) { transition-delay: 0.85s; }
  .spec-grid .spec-card:nth-child(6) { transition-delay: 1s; }
  @media (prefers-reduced-motion: reduce) {
    .steps-grid .step-card, .spec-grid .spec-card, .blog-grid .blog-card { opacity: 1; transform: none; }
  }

  /* MICROINTERAÇÃO DE CARDS */
  .step-card, .spec-card, .blog-card, .contact-info {
    position: relative;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1),
      border-color 0.3s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  }
  .card-accent {
    width: 0; height: 3px; background: var(--green); border-radius: 999px; margin-bottom: 12px;
    transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  }
  .step-card:hover .card-accent, .step-card:active .card-accent,
  .spec-card:hover .card-accent, .spec-card:active .card-accent,
  .blog-card:hover .card-accent, .blog-card:active .card-accent,
  .contact-info:hover .card-accent, .contact-info:active .card-accent { width: 32px; }
  .step-card:hover, .blog-card:hover, .contact-info:hover,
  .step-card:active, .blog-card:active, .contact-info:active {
    transform: translateY(-5px);
    box-shadow: 0 14px 30px rgba(51,49,45,0.08);
    border-color: var(--green);
    background-color: rgba(46,133,88,0.06);
  }
  .spec-card { border: 2px solid transparent; }
  .spec-card:hover, .spec-card:active {
    transform: translateY(-5px);
    box-shadow: 0 14px 30px rgba(51,49,45,0.08);
    background-color: #FBF8F1;
    border-color: var(--sand-deep);
  }
  @media (max-width: 860px) {
    .hero .wrap { grid-template-columns: 1fr; }
    .breathing-wrap { height: 220px; }
    h1 { font-size: 38px; }
  }

  /* AGENDAMENTO */
  .steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 48px; }
  .step-card { background: var(--white); border: 2px solid var(--sand-deep); border-radius: var(--radius-md); padding: 32px 28px; }
  .step-num { font-family: var(--font-display); font-size: 15px; color: var(--green); font-weight: 600; margin-bottom: 14px; }
  .step-card h3 { margin-bottom: 8px; }
  .step-card p { font-size: 14px; }
  .section-head { max-width: 620px; }
  .section-head p.lead { font-size: 17px; margin-top: 14px; }
  .center-cta { text-align: center; margin-top: 48px; }
  @media (max-width: 860px) { .steps-grid { grid-template-columns: 1fr; } }

  /* SOBRE */
  .about-grid { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 56px; align-items: start; margin-top: 8px; }
  .about-photo { aspect-ratio: 4/5; border-radius: var(--radius-lg); overflow: hidden; background: var(--sand-deep);
    box-shadow: 0 20px 44px rgba(51,49,45,0.16); border: 1px solid rgba(51,49,45,0.08); }
  .about-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
  .about-body p { font-size: 16px; margin-bottom: 18px; }
  .diff-list { list-style: none; margin-top: 24px; display: grid; gap: 12px; }
  .diff-list li { display: flex; gap: 12px; font-size: 15px; color: var(--charcoal); align-items: flex-start; }
  .diff-list li::before { content: ''; min-width: 8px; height: 8px; border-radius: 50%; background: var(--green); margin-top: 7px; }
  @media (max-width: 860px) { .about-grid { grid-template-columns: 1fr; } }

  /* ESPECIALIDADES */
  .spec-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 48px; }
  .spec-card { background: var(--sand); border-radius: var(--radius-md); padding: 28px 24px; }
  .spec-card h3 { margin-bottom: 8px; }
  .spec-card p { font-size: 14px; }
  @media (max-width: 860px) { .spec-grid { grid-template-columns: 1fr 1fr; } }
  @media (max-width: 560px) { .spec-grid { grid-template-columns: 1fr; } }

  /* COMO FUNCIONA */
  .flow-list { list-style: none; margin: 40px 0 0; padding: 0; }
  .flow-item {
    display: grid; grid-template-columns: 90px 1fr; gap: 24px;
    padding: 28px 20px; margin: 0 -20px; border-top: 1px solid var(--sand-deep);
    border-radius: 14px; background-color: transparent;
    transition: background-color 0.3s ease, transform 0.3s ease;
  }
  .flow-item:hover { background-color: #FBF8F1; transform: translateX(4px); }
  .flow-item:last-of-type { border-bottom: 1px solid var(--sand-deep); }
  .flow-num { font-family: var(--font-display); font-size: 28px; color: rgba(46,133,88,0.45); font-weight: 600; }
  .flow-item h3 { margin-bottom: 6px; }
  .flow-item p { font-size: 15px; max-width: 520px; }
  .practical-box { margin-top: 40px; background: var(--sand); border-radius: var(--radius-md); padding: 28px 32px;
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
  .practical-box div { font-size: 14px; color: var(--charcoal); }
  .practical-box strong { display: block; font-family: var(--font-display); font-size: 15px; color: var(--green); margin-bottom: 4px; }
  @media (max-width: 720px) { .practical-box { grid-template-columns: 1fr; } }

  /* BLOG */
  .blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 48px; }
  .blog-card { background: var(--white); border: 2px solid var(--sand-deep); border-radius: var(--radius-md); overflow: hidden; }
  .blog-thumb { height: 140px; background: var(--sand-deep); overflow: hidden; }
  .blog-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
  .blog-body { padding: 22px 22px 26px; }
  .tag { display: inline-block; font-size: 12px; font-weight: 600; color: var(--green); background: rgba(46,133,88,0.1); padding: 4px 12px; border-radius: 999px; margin-bottom: 12px; }
  .blog-body h3 { font-size: 17px; margin-bottom: 8px; }
  .blog-body p { font-size: 14px; }
  .blog-link { display: inline-block; margin-top: 14px; font-size: 13px; font-weight: 600; color: var(--green); }
  @media (max-width: 860px) { .blog-grid { grid-template-columns: 1fr; } }

  /* CONTATO */
  .contact-grid { display: grid; grid-template-columns: 1fr 0.85fr; gap: 56px; margin-top: 48px; }
  form { display: grid; gap: 16px; }
  label { font-size: 13px; font-weight: 600; color: var(--charcoal); margin-bottom: 6px; display: block; }
  input, textarea {
    width: 100%; padding: 13px 16px; border-radius: 12px; border: 1px solid var(--sand-deep);
    font-family: var(--font-body); font-size: 14px; background: var(--white); color: var(--charcoal);
  }
  input:focus, textarea:focus { border-color: var(--green); }
  textarea { resize: vertical; min-height: 110px; }
  .contact-info { background: var(--sand); border: 2px solid transparent; border-radius: var(--radius-md); padding: 32px; height: fit-content; }
  .contact-info h3 { margin-bottom: 20px; }
  .contact-row { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 18px; font-size: 14px; }
  .contact-row .dot { min-width: 8px; height: 8px; border-radius: 50%; background: var(--green); margin-top: 6px; }
  .closing-note { margin-top: 20px; font-family: var(--font-display); font-size: 15px; color: var(--green); }
  @media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }

  footer { background: var(--charcoal); color: var(--sand); padding: 48px 0; }
  footer .wrap { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; }
  footer .logo { color: var(--sand); }
  footer p { color: rgba(245,240,230,0.6); font-size: 13px; }

/* BLOG NATIVO — listagem (archive.php) e post único (single.php) */
.blog-header { padding: 64px 0 0; }
.post-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 48px; }
@media (max-width: 860px) { .post-list { grid-template-columns: 1fr; } }
.pagination { margin-top: 56px; display: flex; gap: 12px; justify-content: center; }
.pagination a, .pagination span { padding: 10px 16px; border-radius: 999px; border: 1px solid var(--sand-deep); font-size: 14px; }
.pagination .current { background: var(--green); color: var(--white); border-color: var(--green); }

.single-post-wrap { max-width: 720px; margin: 0 auto; padding: 64px 32px; }
.single-post-wrap .tag { margin-bottom: 18px; }
.single-post-wrap h1 { font-size: 38px; margin-bottom: 20px; }
.single-post-meta { font-size: 13px; color: var(--gray); margin-bottom: 32px; }
.single-post-thumb { border-radius: var(--radius-md); overflow: hidden; margin-bottom: 40px; }
.single-post-content { font-size: 17px; color: var(--charcoal); }
.single-post-content p { color: var(--charcoal); margin-bottom: 20px; }
.single-post-content h2, .single-post-content h3 { margin: 36px 0 16px; }
.single-post-content a { color: var(--green); text-decoration: underline; }
.single-post-content img { border-radius: var(--radius-md); margin: 24px 0; }
.single-post-cta { margin-top: 56px; background: var(--sand); border-radius: var(--radius-md); padding: 32px; text-align: center; }
.single-post-cta p { margin-bottom: 16px; color: var(--charcoal); font-size: 16px; }
