@import url('https://fonts.googleapis.com/css2?family=Libre+Baskerville:ital,wght@0,400;0,700;1,400&family=Work+Sans:wght@400;500;600&display=swap');

/* ==========================================================================
   HILARY MACEDO — PSICOLOGÍA CLÍNICA
   Sistema de diseño — "Estructura de la Herida"
   Paleta: Hueso claro, Grafito, Azul petróleo, Borgoña oscuro, Topo cálido
   ========================================================================== */

/* Oculta el header propio del tema Astra: nuestro diseño trae su propio header completo */
#masthead { display: none !important; }
#colophon { display: none !important; }

/* Fuerza ancho completo por si el tema Astra tiene un layout "en caja" (boxed) */
html, body, #page, .site, .ast-container, .ast-page-builder-template {
  max-width: none !important;
  width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  box-shadow: none !important;
}
body { background: var(--bone-soft, #F5F2EC) !important; }

:root {
  /* Color */
  --bone:        #EEE8E0;
  --bone-soft:   #F5F2EC;
  --charcoal:    #262322;
  --petrol:      #2E4950;
  --burgundy:    #5B333C;
  --burgundy-light: #7A4550;
  --taupe:       #9A8E84;
  --line:        rgba(38, 35, 34, 0.12);
  --line-light:  rgba(238, 232, 224, 0.18);

  /* Type */
  --serif: "Libre Baskerville", "Georgia", serif;
  --sans: "Work Sans", -apple-system, BlinkMacSystemFont, sans-serif;

  /* Layout */
  --max: 1180px;
  --gutter: clamp(1.5rem, 5vw, 4rem);
  --radius: 2px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  margin: 0;
  font-family: var(--sans);
  background: var(--bone-soft);
  color: var(--charcoal);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.2;
  margin: 0 0 0.6em;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.6rem, 5vw, 4.2rem); letter-spacing: -0.015em; }
h2 { font-size: clamp(1.8rem, 3.2vw, 2.6rem); }
h3 { font-size: 1.3rem; }

p { margin: 0 0 1em; }

a { color: inherit; text-decoration: none; }

img, svg { max-width: 100%; display: block; }

.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.eyebrow {
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--burgundy);
  font-weight: 600;
  margin-bottom: 0.9em;
  display: inline-block;
}
.eyebrow.on-dark { color: var(--taupe); }

.lede {
  font-size: 1.1rem;
  color: var(--charcoal);
  opacity: 0.82;
  max-width: 46em;
}

/* Buttons ------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--sans);
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 600;
  padding: 0.95em 1.8em;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease, transform 0.2s ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--burgundy);
  color: var(--bone);
}
.btn-primary:hover { background: var(--burgundy-light); transform: translateY(-1px); }

.btn-outline {
  background: transparent;
  border-color: currentColor;
  color: var(--charcoal);
}
.btn-outline:hover { background: var(--charcoal); color: var(--bone); }

.btn-outline.on-dark {
  color: var(--bone);
}
.btn-outline.on-dark:hover { background: var(--bone); color: var(--charcoal); }

.btn-block { width: 100%; justify-content: center; }

/* Door mark ------------------------------------------------------------ */
.door {
  display: inline-block;
  color: var(--burgundy);
}
.door path { transition: opacity 0.3s ease; }
.card-dark .door,
.section-dark .door,
.section-petrol .door { color: var(--taupe); }
.price-card.featured .door { color: var(--taupe); }

/* Header ---------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(245, 242, 236, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 84px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-family: var(--serif);
}
.logo-mark {
  display: flex;
  flex-direction: column;
  line-height: 0.95;
  font-size: 1.5rem;
  letter-spacing: 0.02em;
}
.logo-mark span:last-child { align-self: flex-end; margin-top: 0.05em; }
.logo-divider { width: 1px; height: 34px; background: var(--burgundy); }
.logo-text { display: flex; flex-direction: column; line-height: 1; }
.logo-text .name { font-size: 1.2rem; letter-spacing: 0.05em; line-height: 1; }
.logo-text .role {
  font-family: var(--sans);
  font-size: 0.6rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--taupe);
  line-height: 1;
  margin-top: 0.05em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.83rem;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.nav-links a {
  position: relative;
  padding: 0.3em 0;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -2px;
  width: 0; height: 1px;
  background: var(--burgundy);
  transition: width 0.25s ease;
}
.nav-links a:hover::after,
.nav-links a.active::after { width: 100%; }
.nav-links a.active { color: var(--burgundy); }

.nav-right { display: flex; align-items: center; gap: 1.5rem; }

/* Checkbox oculto que controla el menú móvil sin JavaScript */
.nav-toggle-checkbox {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

.nav-toggle {
  display: none;
  cursor: pointer;
  padding: 0.5em;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 1.5px;
  background: var(--charcoal);
  margin: 5px 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

@media (max-width: 1300px) {
  .nav-links { display: none; }
  .nav-toggle { display: block; }
  .nav-right .btn-primary { display: none; }

  .nav-toggle-checkbox:checked ~ nav {
    overflow: visible !important;
    height: auto !important;
    max-height: none !important;
  }
  .nav-toggle-checkbox:checked ~ nav .nav-links {
    display: flex !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    height: 100vh !important;
    width: 100% !important;
    max-height: none !important;
    background: var(--bone-soft);
    flex-direction: column;
    align-items: flex-start;
    padding: 6rem var(--gutter) 2rem;
    gap: 1.6rem;
    font-size: 1.1rem;
    overflow-y: auto !important;
    z-index: 9999;
  }
  .nav-toggle-checkbox:checked ~ .nav-right .btn-primary {
    display: inline-flex;
    margin-top: 0;
  }
  .nav-toggle-checkbox:checked ~ .nav-right .nav-toggle {
    position: relative;
    z-index: 10000;
  }
  .nav-toggle-checkbox:checked ~ .nav-right .nav-toggle span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
  .nav-toggle-checkbox:checked ~ .nav-right .nav-toggle span:nth-child(2) { opacity: 0; }
  .nav-toggle-checkbox:checked ~ .nav-right .nav-toggle span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }
}

/* Sections --------------------------------------------------------------- */
section { padding: clamp(3.5rem, 8vw, 6.5rem) 0; }
.section-dark { background: var(--charcoal); color: var(--bone); }
.section-petrol { background: var(--petrol); color: var(--bone); }
.section-burgundy { background: var(--burgundy); color: var(--bone); }
.section-burgundy .door { color: var(--taupe); }
.section-burgundy .quote-block cite { color: var(--bone); opacity: .7; }

/* Fuerza el color de los títulos dentro de secciones oscuras: el tema Astra
   trae su propio color de encabezados (h1-h6) que gana por sobre la herencia. */
.section-dark h1, .section-dark h2, .section-dark h3, .section-dark h4,
.section-petrol h1, .section-petrol h2, .section-petrol h3, .section-petrol h4,
.section-burgundy h1, .section-burgundy h2, .section-burgundy h3, .section-burgundy h4,
.hero h1, .hero h2, .page-hero h1, .page-hero h2,
.price-card.featured h1, .price-card.featured h2, .price-card.featured h3 {
  color: var(--bone);
}
.section-bone { background: var(--bone); }
.section-tight { padding: clamp(2.5rem, 5vw, 3.5rem) 0; }

/* Photo frame (portrait placeholder) --------------------------------------- */
.photo-frame {
  position: relative;
  aspect-ratio: 3/4;
  overflow: hidden;
  background: var(--taupe);
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 480px;
  width: 100%;
  margin: 0 auto;
}
.photo-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-frame.placeholder {
  border: 1.5px dashed currentColor;
  background: rgba(128,110,100,0.08);
}
.photo-frame.placeholder .placeholder-label {
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: currentColor;
  opacity: .7;
  text-align: center;
  padding: 1rem;
}
.hero-photo-col .photo-frame { aspect-ratio: 3/4; max-width: 480px; margin: 0 auto; }

.section-head { max-width: 42em; margin-bottom: 3rem; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

/* Hero --------------------------------------------------------------------- */
.hero {
  position: relative;
  background: var(--charcoal);
  color: var(--bone);
  overflow: hidden;
  min-height: 88vh;
  display: flex;
  align-items: center;
}
.hero-grain {
  position: absolute; inset: 0;
  background-image:
    radial-gradient(circle at 15% 20%, rgba(91,51,60,0.6), transparent 55%),
    radial-gradient(circle at 85% 75%, rgba(91,51,60,0.5), transparent 60%),
    radial-gradient(circle at 60% 40%, rgba(46,73,80,0.18), transparent 50%);
  pointer-events: none;
}
.hero-arch {
  position: absolute;
  right: -6%;
  bottom: -8%;
  width: min(46vw, 620px);
  opacity: 0.9;
  pointer-events: none;
}
.hero .container {
  position: relative;
  z-index: 2;
  padding-top: 4rem;
  padding-bottom: 4rem;
}
.hero-inner { max-width: 34em; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
}
.hero h1 { color: var(--bone); }
.hero .lede { color: var(--bone); opacity: 0.78; }
.hero-ctas { display: flex; gap: 1rem; margin-top: 2.2rem; flex-wrap: wrap; }

.hero-meta {
  display: flex;
  gap: 2.5rem;
  margin-top: 3.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line-light);
  flex-wrap: wrap;
}
.hero-meta div { max-width: 14em; font-size: 0.85rem; opacity: 0.75; }
.hero-meta strong { display: block; font-family: var(--serif); font-size: 1rem; color: var(--bone); opacity: 1; margin-bottom: 0.2em; }

/* Page hero (secondary pages, shorter) */
.page-hero {
  background: var(--charcoal);
  color: var(--bone);
  padding: 7.5rem 0 4.5rem;
  position: relative;
  overflow: hidden;
}
.page-hero .container { position: relative; z-index: 2; }
.page-hero h1 { color: var(--bone); max-width: 24em; }
.page-hero .lede { color: var(--bone); opacity: 0.78; max-width: 38em; }
.breadcrumb {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--taupe);
  margin-bottom: 1.5rem;
}
.breadcrumb a:hover { color: var(--bone); }

/* Cards grid --------------------------------------------------------------- */
.grid {
  display: grid;
  gap: 1.75rem;
}
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 980px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
}

.card {
  background: var(--bone-soft);
  border: 1px solid var(--line);
  padding: 2.1rem 1.8rem;
  transition: transform 0.25s ease, border-color 0.25s ease;
}
.card:hover { transform: translateY(-4px); border-color: var(--burgundy); }
.card .door { margin-bottom: 1.3rem; }
.card h3 { margin-bottom: 0.5em; }
.card p { font-size: 0.92rem; opacity: 0.8; margin-bottom: 1.2em; }
.card-link {
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--burgundy);
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
}
.card-link svg { width: 14px; height: 14px; transition: transform 0.2s ease; }
.card:hover .card-link svg { transform: translateX(3px); }

.card-dark {
  background: rgba(238,232,224,0.05);
  border: 1px solid var(--line-light);
  color: var(--bone);
}
.card-dark:hover { border-color: var(--taupe); }
.card-dark p { opacity: 0.72; }

/* Quote -------------------------------------------------------------------- */
.quote-block {
  max-width: 38em;
  margin: 0 auto;
  text-align: center;
}
.quote-block blockquote {
  font-family: var(--serif);
  font-size: clamp(1.4rem, 3vw, 2rem);
  line-height: 1.4;
  margin: 0 0 1rem;
}
.quote-block cite {
  font-style: normal;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--burgundy);
}
.section-dark .quote-block cite,
.section-petrol .quote-block cite { color: var(--taupe); }

/* Two-column feature -------------------------------------------------------- */
.feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
}
@media (max-width: 860px) {
  .feature { grid-template-columns: 1fr; }
}
.feature-visual {
  aspect-ratio: 4/5;
  background: var(--petrol);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.feature-visual .door { width: 34%; opacity: 0.85; }
.feature-visual.tone-charcoal { background: var(--charcoal); }
.feature-visual.tone-burgundy { background: var(--burgundy); }

.feature-list {
  list-style: none;
  padding: 0; margin: 1.6rem 0 0;
  display: grid;
  gap: 1rem;
}
.feature-list li {
  display: flex;
  gap: 0.8em;
  font-size: 0.95rem;
}
.feature-list .tick {
  flex: none;
  width: 18px; height: 18px;
  margin-top: 0.15em;
  color: var(--burgundy);
}

/* Process steps -------------------------------------------------------------- */
.process {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-top: 1px solid var(--line-light);
}
.section-bone .process,
.section-dark .process:not(.on-dark-border) { border-color: var(--line); }
.process-step {
  padding: 2rem 1.6rem 0;
  border-left: 1px solid var(--line);
  position: relative;
}
.process-step:first-child { border-left: none; }
.process-num {
  font-family: var(--serif);
  font-size: 0.85rem;
  color: var(--burgundy);
  letter-spacing: 0.05em;
  display: block;
  margin-bottom: 0.8em;
}
@media (max-width: 860px) {
  .process { grid-template-columns: 1fr; }
  .process-step { border-left: none; border-top: 1px solid var(--line); padding: 1.8rem 0 0; }
  .process-step:first-child { border-top: none; }
}

/* Pricing -------------------------------------------------------------------- */
.price-card {
  background: var(--bone-soft);
  border: 1px solid var(--line);
  padding: 2.4rem 2rem;
  text-align: left;
  display: flex;
  flex-direction: column;
}
.price-card.featured {
  background: var(--charcoal);
  color: var(--bone);
  border-color: var(--charcoal);
}
.price-card .amount {
  font-family: var(--serif);
  font-size: 2.4rem;
  margin: 0.4em 0 0.2em;
}
.price-card .amount small { font-family: var(--sans); font-size: 0.9rem; opacity: 0.65; }
.price-card ul { list-style: none; padding: 0; margin: 1.5rem 0; display: grid; gap: 0.7rem; font-size: 0.9rem; }
.price-card ul li { display: flex; gap: 0.6em; }
.price-card .btn { margin-top: auto; }

/* FAQ -------------------------------------------------------------------- */
.faq-item {
  border-bottom: 1px solid var(--line);
}
.faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: 1.4rem 0;
  font-family: var(--serif);
  font-size: 1.1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item .faq-icon { flex: none; font-size: 1.3rem; color: var(--burgundy); transition: transform 0.25s ease; }
.faq-item[open] .faq-icon { transform: rotate(45deg); }
.faq-item p { padding-bottom: 1.4rem; opacity: 0.8; max-width: 42em; }

/* Testimonial strip ------------------------------------------------------- */
.testimonial-card {
  border: 1px solid var(--line);
  padding: 1.8rem;
  background: var(--bone-soft);
}
.testimonial-card p { font-family: var(--serif); font-size: 1.05rem; font-style: italic; margin-bottom: 1em; }
.testimonial-card cite { font-style: normal; font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--burgundy); }
.testimonial-note {
  font-size: 0.78rem;
  opacity: 0.55;
  margin-top: 1rem;
  font-style: italic;
}

/* Blog --------------------------------------------------------------------- */
.post-card { display: flex; flex-direction: column; height: 100%; }
.post-card .tag {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--burgundy);
  font-weight: 600;
  margin-bottom: 0.8em;
}
.post-card .meta { font-size: 0.78rem; opacity: 0.55; margin-top: auto; padding-top: 1em; }

.post-body {
  max-width: 40em;
  margin: 0 auto;
  font-size: 1.05rem;
}
.post-body h2 { margin-top: 1.6em; }
.post-body blockquote {
  border-left: 3px solid var(--burgundy);
  padding-left: 1.2em;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.15rem;
  margin: 1.8em 0;
  opacity: 0.9;
}

/* Forms ----------------------------------------------------------------- */
.form-grid { display: grid; gap: 1.3rem; }
.field label {
  display: block;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 0.6em;
  color: var(--charcoal);
}
.field input, .field select, .field textarea {
  width: 100%;
  padding: 0.9em 1em;
  border: 1px solid var(--line);
  background: var(--bone-soft);
  font-family: var(--sans);
  font-size: 0.95rem;
  color: var(--charcoal);
  border-radius: var(--radius);
}
.field textarea { resize: vertical; min-height: 120px; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: 2px solid var(--burgundy);
  outline-offset: 1px;
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.3rem; }
@media (max-width: 640px) { .field-row { grid-template-columns: 1fr; } }
.form-note { font-size: 0.8rem; opacity: 0.6; margin-top: 1rem; }

/* Focus visibility -------------------------------------------------------- */
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 2px solid var(--burgundy);
  outline-offset: 2px;
}

/* CTA band ----------------------------------------------------------------- */
.cta-band {
  text-align: center;
}
.cta-band h2 { max-width: 20em; margin-left: auto; margin-right: auto; }
.cta-band .btn-group { display: flex; gap: 1rem; justify-content: center; margin-top: 1.8rem; flex-wrap: wrap; }

/* Footer --------------------------------------------------------------------- */
.site-footer {
  background: var(--charcoal);
  color: var(--bone);
  padding: 4.5rem 0 2rem;
}
.footer-top {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr 1fr;
  gap: 2.5rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--line-light);
}
@media (max-width: 860px) {
  .footer-top { grid-template-columns: 1fr 1fr; }
}
.footer-brand .logo-text .role { color: var(--taupe); }
.footer-brand p { font-size: 0.85rem; opacity: 0.65; margin-top: 1rem; max-width: 22em; }
.footer-col h4 {
  font-family: var(--sans);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--taupe);
  margin-bottom: 1.1em;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.7rem; font-size: 0.88rem; }
.footer-col a:hover { color: var(--taupe); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1.8rem;
  font-size: 0.78rem;
  opacity: 0.55;
  flex-wrap: wrap;
  gap: 1rem;
}
.footer-social { display: flex; gap: 1rem; }

/* Utility ------------------------------------------------------------------ */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
  padding: 0.5em 0.9em;
  border: 1px solid var(--line);
  color: var(--burgundy);
}
.badge.on-dark { border-color: var(--line-light); color: var(--taupe); }

.reveal {
  opacity: 1;
}
.reveal.is-visible { opacity: 1; }

.divider-door {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 3rem 0;
  opacity: 0.5;
}
.divider-door::before, .divider-door::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}