/* ============================================
   Manuela Pastor — Psicóloga Clínica
   Sistema de diseño: cálido / clínico-claro
   ============================================ */

:root {
  --color-bg: #FBF0EB;
  --color-surface: #F5E4BE;
  --color-surface-2: #EDD5A0;
  --color-text: #2C1810;
  --color-text-muted: #C07878;
  --color-sage: #357A8A;
  --color-sage-dark: #1E5A68;
  --color-sage-light: #A8D8DF;
  --color-terracotta: #F0AAAF;
  --color-border: #E8D5C4;

  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --radius: 4px;
  --radius-lg: 8px;
  --max-width: 1120px;
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2.5rem;
  --space-5: 4rem;
  --space-6: 6rem;
}

*, *::before, *::after { 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;
  }
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.2;
  margin: 0 0 var(--space-2);
  color: var(--color-sage-dark);
}

h1 { font-size: clamp(2.1rem, 4.5vw, 3.4rem); font-weight: 600; }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 var(--space-2); }

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

.eyebrow {
  font-family: var(--font-body);
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-terracotta);
  font-weight: 600;
  margin-bottom: var(--space-1);
  display: inline-block;
}

.lede {
  font-size: 1.15rem;
  color: var(--color-text-muted);
  max-width: 60ch;
}

/* Skip link */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--color-sage);
  color: #fff;
  padding: 0.75rem 1.25rem;
  z-index: 200;
  border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus {
  left: 0;
}

/* Focus visibility */
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--color-sage);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(243, 239, 224, 0.95);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--color-border);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--space-2);
  padding-bottom: var(--space-2);
}

.brand {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-sage-dark);
}

.brand span {
  display: block;
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 400;
  color: var(--color-text-muted);
  letter-spacing: 0.02em;
}

.main-nav ul {
  list-style: none;
  display: flex;
  gap: var(--space-4);
  margin: 0;
  padding: 0;
}

.main-nav ul a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--color-text);
  position: relative;
  padding-bottom: 4px;
  transition: color 0.15s;
}

.main-nav ul a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-terracotta);
  border-radius: 1px;
  transition: width 0.2s ease;
}

.main-nav ul a[aria-current="page"] {
  color: var(--color-sage-dark);
}

.main-nav ul a[aria-current="page"]::after,
.main-nav ul a:hover::after {
  width: 100%;
}

.main-nav ul a:hover {
  color: var(--color-sage-dark);
}

.main-nav .nav-cta { display: none; }

.header-ig {
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  transition: color 0.15s;
  flex-shrink: 0;
  padding: 0.6rem;
  margin: -0.6rem;
}
.header-ig:hover { color: var(--color-sage-dark); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  width: 40px;
  height: 40px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
  transform-origin: center;
}

.nav-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.6rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  border: 1.5px solid transparent;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  cursor: pointer;
}

.btn-primary {
  background: var(--color-sage);
  color: #fff;
}
.btn-primary:hover { background: var(--color-sage-dark); }

.btn-secondary {
  background: transparent;
  color: var(--color-sage-dark);
  border-color: var(--color-sage);
}
.btn-secondary:hover { background: var(--color-sage-light); }

/* ---------- Hero ---------- */
.hero {
  padding: var(--space-6) 0 var(--space-5);
}

.hero .container {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: var(--space-5);
  align-items: center;
}

.hero-portrait {
  aspect-ratio: 4/5;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
}

.hero-portrait img { width: 100%; height: 100%; object-fit: cover; }

.section-img {
  aspect-ratio: 3/4;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  align-self: stretch;
}

.section-img img { width: 100%; height: 100%; object-fit: cover; }

.hero-actions {
  display: flex;
  gap: var(--space-2);
  margin-top: var(--space-3);
  flex-wrap: wrap;
}

/* ---------- Breath divider (signature element) ---------- */
.breath-divider {
  width: 100%;
  height: 48px;
  display: block;
  color: var(--color-sage);
  opacity: 0.35;
}

.section {
  padding: var(--space-5) 0;
}

.section-surface {
  background: var(--color-surface);
}

.section-header {
  max-width: 62ch;
  margin-bottom: var(--space-3);
}
.section-header h2:last-child,
.section-header h1:last-child {
  margin-bottom: 0;
}

/* ---------- Cards / grids ---------- */
.grid {
  display: grid;
  gap: var(--space-3);
}

.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.topic-chip {
  border: 1px solid var(--color-border);
  background: var(--color-bg);
  border-radius: 999px;
  padding: 0.6rem 1.15rem;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--color-sage-dark);
  display: inline-block;
}

.topics-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.info-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-3);
}

.info-card h3 {
  color: var(--color-sage-dark);
  margin-bottom: 0.4rem;
}

.info-card p {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  margin: 0;
}

/* ---------- Blog preview cards ---------- */
.post-card {
  display: block;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
}

.post-card-media {
  aspect-ratio: 16/10;
  background: var(--color-surface-2);
}

.post-card-body { padding: var(--space-2) var(--space-3) var(--space-3); }

.post-card time {
  font-size: 0.8rem;
  color: var(--color-terracotta);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.post-card h3 { margin: 0.4rem 0 0.4rem; font-size: 1.1rem; }

.post-card p {
  color: var(--color-text-muted);
  font-size: 0.92rem;
  margin: 0;
}

/* ---------- Instagram widget ---------- */
.ig-widget {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
}

.ig-item {
  aspect-ratio: 1;
  background: var(--color-surface-2);
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
}

.ig-item img { width: 100%; height: 100%; object-fit: cover; }

.ig-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-2);
}

.ig-handle {
  font-weight: 600;
  color: var(--color-sage-dark);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

/* ---------- FAQ ---------- */
.faq-item {
  border-top: 1px solid var(--color-border);
  padding: var(--space-2) 0;
}
.faq-item:last-child { border-bottom: 1px solid var(--color-border); }

.faq-item summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 1.02rem;
  color: var(--color-sage-dark);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
  content: "+";
  font-size: 1.4rem;
  color: var(--color-terracotta);
  font-weight: 400;
  line-height: 1;
}

.faq-item[open] summary::after { content: "–"; }

.faq-item p {
  margin-top: var(--space-1);
  color: var(--color-text-muted);
}

/* ---------- CTA band ---------- */
.cta-band {
  background: #1A4A55;
  color: #fff;
  padding: var(--space-5) 0;
  text-align: center;
}
.cta-band h2 { color: #fff; }
.cta-band p { color: var(--color-cta-band-text, #ffffff); }
.cta-band .btn-primary { background: var(--color-sage); }
.cta-band .btn-primary:hover { background: var(--color-sage-dark); }
.cta-band .btn-secondary { color: #fff; border-color: rgba(255,255,255,0.5); }
.cta-band .btn-secondary:hover { background: rgba(255,255,255,0.1); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  padding: var(--space-4) 0 var(--space-3);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
}

.footer-grid h4 {
  font-family: var(--font-body);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-terracotta);
  margin-bottom: var(--space-2);
}

.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 0.5rem; }
.footer-grid a { color: var(--color-text-muted); font-size: 0.95rem; }
.footer-grid a:hover { color: var(--color-sage-dark); }

.footer-contact-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--color-text-muted);
  font-size: 0.95rem;
}
.footer-contact-link svg { flex-shrink: 0; }
.footer-contact-static { cursor: default; }

.footer-bottom {
  border-top: 1px solid var(--color-border);
  padding-top: var(--space-2);
  font-size: 0.85rem;
  color: var(--color-text-muted);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-1);
}

/* ---------- WhatsApp floating button ---------- */
.wa-float {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  z-index: 150;
  background: #25D366;
  color: #fff;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(0,0,0,0.22);
  transition: transform 0.15s ease;
}
.wa-float:hover { transform: scale(1.06); }
.wa-float svg { width: 30px; height: 30px; fill: #fff; }

/* ---------- Sub-page hero (Sobre mí / Terapia) ---------- */
.page-hero {
  padding: var(--space-5) 0 var(--space-4);
  border-bottom: 1px solid var(--color-border);
}

.page-hero .eyebrow { margin-bottom: var(--space-1); }

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-5);
  align-items: start;
}

.credential-list {
  list-style: none;
  margin: var(--space-2) 0;
  padding: 0;
}
.credential-list li {
  padding-left: 1.6rem;
  position: relative;
  margin-bottom: 0.7rem;
  color: var(--color-text-muted);
}
.credential-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-terracotta);
}

.pull-quote {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-style: italic;
  color: var(--color-sage-dark);
  border-left: 3px solid var(--color-terracotta);
  padding-left: var(--space-3);
  margin: var(--space-4) 0;
  max-width: 55ch;
}

.approach-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-3);
}

.approach-card .eyebrow { color: var(--color-sage); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero .container { grid-template-columns: 1fr; }
  .hero-portrait { max-width: 340px; }
  .two-col { grid-template-columns: 1fr; }
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; gap: var(--space-3); }
  .ig-widget { grid-template-columns: repeat(3, 1fr); }

  .nav-toggle { display: flex; }
  .header-cta { display: none; }

  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    padding: var(--space-2) var(--space-4) var(--space-3);
    z-index: 99;
  }

  .main-nav.is-open { display: block; }

  .main-nav ul {
    flex-direction: column;
    gap: 0;
  }

  .main-nav ul a {
    display: block;
    padding: var(--space-2) 0;
    font-size: 1.05rem;
    border-bottom: 1px solid var(--color-border);
  }

  .main-nav .nav-cta {
    display: inline-flex !important;
    margin-top: var(--space-3);
  }
}

@media (max-width: 560px) {
  .grid-3, .grid-2, .grid-4 { grid-template-columns: 1fr 1fr; }
  body { font-size: 16px; }
  .wa-float { right: 1rem; bottom: 1rem; width: 52px; height: 52px; }
}
