/* Dra. María Luisa Rivera García — réplica estática de la plantilla Clove (Squarespace) */
:root {
  --accent: hsl(20.38, 47.32%, 56.08%);      /* #c47e5a */
  --accent-dark: hsl(20.38, 47%, 44%);
  --ink: hsl(25.71, 8.24%, 16.67%);           /* #2e2a27 */
  --paper: hsl(37.5, 44.44%, 96.47%);         /* #faf7f2 */
  --light-accent: hsl(34, 40.54%, 85.49%);
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Lato", "Helvetica Neue", Arial, sans-serif;
  --meta: "Pontano Sans", "Lato", sans-serif;
  --btn: "Asap", "Lato", sans-serif;
  --post: "Libre Caslon Text", Georgia, serif;
  --gutter: 4vw;
  --max: 1440px;
}

*, *::before, *::after { box-sizing: border-box; }
html { font-size: 17px; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--sans); font-size: 1rem; line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .2em; }
a:hover { color: var(--accent-dark); }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 400; line-height: 1.12; margin: 0 0 .5em; hyphens: none; overflow-wrap: normal; word-break: normal; }
h1 { font-size: 6rem; }
h2 { font-size: 4rem; line-height: 1.23; }
h4 { font-size: 1.6rem; line-height: 1.37; }
p { margin: 0 0 1rem; }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: var(--paper); padding: .5rem 1rem; z-index: 100; }
.skip:focus { left: 0; }
.lead p { font-size: 1.4rem; line-height: 1.8; }
.small p, p.small { font-size: .898rem; line-height: 1.8; }

/* Botones */
.btn {
  display: inline-block; font-family: var(--btn); font-size: 1.1rem; letter-spacing: .04em;
  background: var(--accent); color: var(--paper); text-decoration: none; border: 0;
  padding: .7em 1.35em; border-radius: 300px; cursor: pointer; line-height: 1.2; text-align: center;
}
.btn:hover { background: var(--accent-dark); color: var(--paper); }
.btn--hero { font-size: 1.2rem; padding: .9em 2.4em; letter-spacing: .2em; }

/* Encabezado */
.header { position: relative; z-index: 20; }
.header--overlay { position: absolute; top: 0; left: 0; right: 0; }
.header__inner {
  max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter);
  height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 2rem;
}
.header__title { font-family: var(--serif); font-size: 1.75rem; letter-spacing: .02em; color: inherit; text-decoration: none; white-space: nowrap; }
.header__nav { display: flex; align-items: center; gap: 2.9rem; }
.header__nav a:not(.btn) { color: inherit; text-decoration: none; font-size: 1.4rem; line-height: 1.8; border-bottom: 1px solid transparent; }
.header__nav a:not(.btn):hover, .header__nav a[aria-current="page"] { border-bottom-color: currentColor; }
.header__nav .btn { font-size: 1.1rem; }
.header--light { color: var(--paper); }
.header--dark { color: var(--ink); }
.burger { display: none; background: none; border: 0; padding: 8px; color: inherit; cursor: pointer; }
.burger span { display: block; width: 36px; height: 1px; background: currentColor; margin: 8px 0; transition: transform .25s; }
.menu-open .burger span:first-child { transform: translateY(4.5px) rotate(45deg); }
.menu-open .burger span:last-child { transform: translateY(-4.5px) rotate(-45deg); }
.mobile-menu {
  display: none; position: fixed; inset: 0; z-index: 15; background: var(--paper); color: var(--ink);
  padding: 110px 6vw 40px; flex-direction: column; gap: 1.2rem;
}
.mobile-menu a:not(.btn) { color: var(--ink); text-decoration: none; font-size: 1.9rem; line-height: 1.4; }
.mobile-menu .btn { align-self: stretch; margin-top: 1rem; }
.menu-open .mobile-menu { display: flex; }
.menu-open .header { color: var(--ink); }
.menu-open .header--overlay { position: fixed; }

/* Hero del inicio */
.hero { position: relative; color: var(--paper); background: var(--ink); overflow: hidden; }
.hero__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(90deg, rgba(30,24,20,.55) 0%, rgba(30,24,20,.25) 55%, rgba(30,24,20,.1) 100%);
}
.hero__content {
  position: relative; z-index: 2; max-width: var(--max); margin: 0 auto;
  padding: 104px var(--gutter) 3.2rem; min-height: min(1320px, 92vw); display: flex; flex-direction: column;
}
.hero__content .btn--hero { align-self: flex-start; }
.hero__text { margin-top: auto; padding-top: 14vw; max-width: 62%; }
.hero h1 { font-size: 6rem; line-height: 1.12; margin-bottom: .3em; }
.hero h2 { font-size: 4rem; line-height: 1.23; margin: 0; }

/* Banner de montañas (Quién soy, Diplomados, Blog) */
.banner {
  position: relative; color: var(--paper); text-align: center; overflow: hidden;
  background: #c9b59d url(/img/montanas-2500.webp) center 30% / cover no-repeat;
  border-bottom-left-radius: 50% 56px; border-bottom-right-radius: 50% 56px;
  padding: 64px var(--gutter) 70px; min-height: 225px; display: flex; align-items: center; justify-content: center;
}
.banner h1 { margin: 0; font-size: 6rem; line-height: 1.12; }
.banner--short { min-height: 172px; }

/* Contenido */
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: 6vw 0; }
.section--tight { padding: 4.5rem 0; }
.prose p { font-size: 1.4rem; line-height: 1.8; }

/* Rejilla de servicios del inicio: orden del DOM = orden en celular */
.services { display: grid; grid-template-columns: 1fr 1fr; column-gap: 5.5vw; row-gap: 0; margin-top: 1rem; }
.services > * { margin-bottom: 2.4rem; }
.services h4 { margin-top: .4rem; margin-bottom: 1.2rem; }
.services .ph { width: 100%; object-fit: cover; }
.s-salp  { grid-column: 1; grid-row: 1 / span 2; }
.s-psico { grid-column: 2; grid-row: 1; }
.s-arbol { grid-column: 2; grid-row: 2 / span 2; }
.s-const { grid-column: 1; grid-row: 3 / span 2; }
.s-abrazo{ grid-column: 2; grid-row: 4 / span 2; }
.s-orilla{ grid-column: 1; grid-row: 5 / span 2; }
.s-pino  { grid-column: 2; grid-row: 6 / span 2; }
.s-dipl  { grid-column: 1; grid-row: 7 / span 2; padding-top: 3rem; }
.s-artic { grid-column: 2; grid-row: 8; }
.ph--salp  { aspect-ratio: 1.38; object-position: 50% 55%; }
.ph--arbol { aspect-ratio: 1.24; }
.ph--orilla{ aspect-ratio: 1.38; }
.ph--pino  { aspect-ratio: 1.24; }

/* Contacto + suscripción del inicio */
.contact-band { display: grid; grid-template-columns: 1fr 1fr; gap: 5vw; padding: 4rem 0 5rem; }
.contact-band__info { padding-left: 4vw; }
.contact-band__info h4 { margin-bottom: 1.6rem; }
.subscribe { text-align: center; }
.subscribe p { font-size: .898rem; max-width: 22rem; margin: 0 auto 1.6rem; }
.subscribe form { max-width: 20rem; margin: 0 auto; display: grid; gap: 1rem; }

/* Formularios */
.field { display: block; }
.field input, .field textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--ink); background: #fafafa;
  border: 1px solid var(--ink); border-radius: 0; padding: .9rem 1rem;
}
.subscribe .field input { border-color: hsl(34, 25%, 80%); background: #fff; font-size: .9rem; padding: .85rem 1rem; }
.field textarea { min-height: 100px; resize: vertical; }
.form-note { font-size: .8rem; opacity: .75; margin-top: .4rem; }

/* Testimonio */
.quote { position: relative; background: var(--light-accent); padding: 4.6rem var(--gutter) 6.5rem; text-align: center; }
.quote p { max-width: 50rem; margin: 0 auto .4rem; font-size: .898rem; line-height: 1.8; }
.quote svg { position: absolute; left: 0; bottom: -1px; width: 100%; height: 70px; }

/* Página de contacto */
.contact-page { display: grid; grid-template-columns: 1fr 1fr; gap: 8vw; padding-top: 7rem; padding-bottom: 8rem; }
.contact-page h1 { font-size: 6rem; line-height: 1.12; max-width: 7.5em; }
.contact-page__data p { font-size: 1.4rem; line-height: 1.8; margin: 0; }
.contact-page .social { margin-top: 2.4rem; }
.contact-form { display: grid; gap: 1.3rem; align-content: start; }
.contact-form legend, .contact-form .label { font-size: 1.25rem; margin-bottom: .5rem; padding: 0; }
.contact-form .label small, .contact-form legend small { font-size: .82rem; opacity: .8; margin-left: .4rem; }
.contact-form fieldset { border: 0; margin: 0; padding: 0; }
.contact-form .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.contact-form .sub { font-size: .85rem; display: block; margin-bottom: .4rem; }
.contact-form .btn { justify-self: start; letter-spacing: .2em; padding: .9em 1.5em; }

/* Diplomados */
.diplo .afiche { width: 100%; max-width: min(440px, 100%); margin: 1.6rem auto 0; }

/* Blog */
.blog-list { max-width: var(--max); margin: 0 auto; padding: 4.5rem var(--gutter) 9rem; display: grid; grid-template-columns: repeat(3, 1fr); gap: 3rem; }
.post-card { text-align: center; }
.blog-anio { grid-column: 1 / -1; font-family: var(--post); font-weight: 400; font-size: 2rem; text-align: center; margin: 1.5rem 0 -1rem; padding-top: 2rem; border-top: 1px solid rgba(46,42,39,.15); }
.blog-anio:first-child { border-top: 0; padding-top: 0; margin-top: 0; }
.post-card time { font-family: var(--meta); font-size: 1rem; letter-spacing: .01em; display: block; margin-bottom: 1rem; }
.post-card h1 { font-family: var(--post); font-size: 2.45rem; line-height: 1.3; margin-bottom: .8rem; }
.post-card h1 a { color: var(--ink); text-decoration: none; }
.post-card .more { font-size: .898rem; }
.entry { max-width: 40rem; margin: 0 auto; padding: 4.4rem var(--gutter) 9rem; }
.entry h1 { font-family: var(--post); font-size: 4rem; line-height: 1.3; }
.entry p { font-size: 1.4rem; line-height: 1.8; }
.articulo__meta { font-family: var(--meta); font-size: 1rem !important; color: var(--accent); margin-top: -.6rem; }
.articulo h2, .articulo h3 { font-family: var(--post); font-size: 2rem; line-height: 1.3; margin: 2.4rem 0 .8rem; }
.articulo h3 { font-size: 1.6rem; }
.articulo blockquote { margin: 1.6rem 0; padding-left: 1.2rem; border-left: 3px solid var(--accent); font-style: italic; }
.articulo ul { font-size: 1.4rem; line-height: 1.8; padding-left: 1.4rem; }
.articulo figure { margin: 2rem 0; }
.articulo img { width: 100%; height: auto; display: block; }
.articulo__pie { margin-top: 3rem; padding-top: 1.4rem; border-top: 1px solid currentColor; font-size: 1rem !important; }

/* Pie */
.footer { max-width: var(--max); margin: 0 auto; padding: 4.5rem var(--gutter) 5.5rem calc(var(--gutter) + 6.4vw); display: flex; justify-content: space-between; align-items: flex-start; gap: 2rem; }
.footer p { font-size: .898rem; margin: 0 0 2.5rem; }
.social { display: flex; gap: 1.1rem; align-items: center; }
.social a { color: var(--ink); display: inline-flex; }
.social svg { width: 28px; height: 28px; }
.social--sm svg { width: 20px; height: 20px; }

/* ---------- Tableta ---------- */
@media (max-width: 1100px) {
  h1, .hero h1, .banner h1, .contact-page h1 { font-size: 4.4rem; }
  .hero h2 { font-size: 3rem; }
  .header__nav { gap: 1.6rem; }
  .header__nav a:not(.btn) { font-size: 1.15rem; }
  .header__title { font-size: 1.45rem; }
}

/* ---------- Celular ---------- */
@media (max-width: 767px) {
  html { font-size: 16px; }
  :root { --gutter: 6vw; }
  h1, .hero h1, .banner h1, .contact-page h1 { font-size: clamp(1.9rem, 8.4vw, 2.2rem); line-height: 1.15; }
  h2, .hero h2 { font-size: clamp(1.35rem, 6vw, 1.6rem); line-height: 1.3; }
  h4 { font-size: 1.38rem; }
  .lead p, .prose p, .contact-page__data p, .entry p { font-size: 1.25rem; line-height: 1.8; }
  .small p, p.small, .quote p, .subscribe p { font-size: .94rem; }

  .header__inner { height: 64px; }
  .header__title { font-size: 1.25rem; white-space: normal; line-height: 1.2; }
  .header__nav { display: none; }
  .burger { display: block; }

  /* Foto completa: se ve el estudio, sin recortar a la cara */
  .hero { background: var(--ink); }
  .hero::before { display: none; }
  .hero__img { position: relative; inset: auto; height: auto; aspect-ratio: 2500 / 1207; }
  .hero__photo { position: relative; }
  .hero__photo::after { content: ""; position: absolute; inset: 0 0 auto 0; height: 80px; background: linear-gradient(rgba(30,24,20,.55), rgba(30,24,20,0)); }
  .hero__content { min-height: 0; padding: 1.8rem var(--gutter) 2.6rem; }
  .hero__text { padding-top: 1.6rem; max-width: none; margin-top: 0; }
  .btn--hero { font-size: 1rem; letter-spacing: .14em; padding: .9em 1.6em; align-self: stretch !important; }
  .header--overlay.header--light { color: var(--paper); }
  body.menu-open .header { color: var(--ink); }

  .banner { min-height: 150px; padding: 76px var(--gutter) 46px; border-bottom-left-radius: 50% 28px; border-bottom-right-radius: 50% 28px; }
  .section { padding: 3rem 0; }

  .services { display: block; }
  .services .ph { aspect-ratio: 1.3 !important; }
  .s-dipl { padding-top: 0; }

  .contact-band { grid-template-columns: 1fr; gap: 2.5rem; padding: 2rem 0 3.5rem; }
  .contact-band__info { padding-left: 0; }
  .contact-page { grid-template-columns: 1fr; gap: 3rem; padding-top: 3rem; padding-bottom: 4rem; }
  .contact-form .row2 { grid-template-columns: 1fr; }

  .quote { padding: 3rem var(--gutter) 5rem; }
  .blog-list { grid-template-columns: 1fr; padding: 3rem var(--gutter) 5rem; }
  .post-card h1 { font-size: 1.9rem; }
  .entry { padding: 2.5rem var(--gutter) 5rem; }
  .entry h1 { font-size: clamp(1.9rem, 8.4vw, 2.2rem); }
  .articulo ul { font-size: 1.25rem; }
  .articulo h2 { font-size: 1.6rem; }

  .footer { flex-direction: column-reverse; padding: 3rem var(--gutter) 3.5rem; gap: 1.5rem; }
  .footer p { margin-bottom: 1.2rem; }
}

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* Blog con artículos: tarjetas con la imagen de la revista (si la hay) */
.blog-list--tarjetas { max-width: 1200px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 3.2rem 2.4rem; align-items: start; }
.blog-list--tarjetas .post-card { text-align: left; display: flex; flex-direction: column; gap: 1.1rem; }
.blog-anios { grid-column: 1 / -1; display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem .5rem; margin-bottom: .5rem; font-family: var(--meta); }
.blog-anios a { padding: .45rem .9rem; min-height: 44px; display: inline-flex; align-items: center; border: 1px solid rgba(46,42,39,.18); border-radius: 999px; color: var(--ink); text-decoration: none; font-size: .95rem; transition: background-color .2s, border-color .2s; }
.blog-anios a:hover, .blog-anios a:focus-visible { background: var(--light-accent); border-color: var(--light-accent); }
.blog-list--tarjetas .blog-anio { text-align: left; font-size: 2.2rem; margin: 2rem 0 -1.4rem; padding-top: 2.2rem; scroll-margin-top: 1.5rem; }
.blog-list--tarjetas .blog-anios + .blog-anio { border-top: 0; padding-top: 0; margin-top: 1rem; }
.post-card__cubierta { display: block; overflow: hidden; background: #fff; border: 1px solid rgba(46,42,39,.1); box-shadow: 0 1px 2px rgba(46,42,39,.06), 0 8px 22px -12px rgba(46,42,39,.35); transition: transform .25s ease-out, box-shadow .25s ease-out; }
.post-card__cubierta img { display: block; width: 100%; height: auto; max-height: 380px; object-fit: cover; object-position: top center; }
.post-card:hover .post-card__cubierta { transform: translateY(-3px); box-shadow: 0 1px 2px rgba(46,42,39,.06), 0 14px 28px -12px rgba(46,42,39,.4); }
.blog-list--tarjetas .post-card--sin-imagen { border-top: 3px solid var(--light-accent); padding-top: 1.1rem; }
.post-card__texto { display: flex; flex-direction: column; gap: .5rem; }
.blog-list--tarjetas .post-card time { margin: 0; font-size: .82rem; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-dark); }
.blog-list--tarjetas .post-card__title { font-family: var(--post); font-size: 1.3rem; line-height: 1.38; margin: 0; overflow-wrap: break-word; }
.post-card__title--mayus { font-size: 1.08rem !important; letter-spacing: .04em; }
.post-card__title a { color: var(--ink); text-decoration: none; }
.post-card__title a:hover { color: var(--accent-dark); }
.post-card__resumen { margin: 0; font-size: .92rem; line-height: 1.65; color: hsl(25, 7%, 32%); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.post-card__acciones { margin: .2rem 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: .3rem 1.2rem; font-size: .92rem; }
.post-card__acciones a { min-height: 44px; display: inline-flex; align-items: center; gap: .35rem; }
.post-card__pdf { color: var(--ink); text-decoration: none; font-family: var(--meta); letter-spacing: .04em; }
.post-card__pdf:hover { color: var(--accent-dark); }
.articulo__descarga { margin: 0 0 2rem; }
.btn-pdf { display: inline-flex; align-items: center; gap: .5rem; min-height: 44px; padding: .55rem 1.2rem; border: 1px solid var(--accent); border-radius: 2px; color: var(--accent-dark); text-decoration: none; font-family: var(--btn); font-size: .95rem; letter-spacing: .03em; transition: background-color .2s, color .2s; }
.btn-pdf:hover, .btn-pdf:focus-visible { background: var(--accent); color: var(--paper); }
.articulo__descarga + .articulo__pie, .articulo > .articulo__descarga:nth-last-child(2) { margin-top: 2.5rem; }

@media (max-width: 767px) {
  .blog-list--tarjetas { grid-template-columns: 1fr; gap: 1.6rem; }
  .blog-list--tarjetas .post-card { display: grid; grid-template-columns: 96px 1fr; gap: 1rem; align-items: start; padding-bottom: 1.6rem; border-bottom: 1px solid rgba(46,42,39,.1); }
  .post-card__cubierta { aspect-ratio: 1 / 1; }
  .post-card__cubierta img { height: 100%; max-height: none; object-position: center; }
  .blog-list--tarjetas .post-card--sin-imagen { grid-template-columns: 1fr; border-top: 0; padding-top: 0; }
  .blog-list--tarjetas .post-card__title { font-size: 1.12rem; }
  .post-card__title--mayus { font-size: .98rem !important; }
  .post-card__resumen { -webkit-line-clamp: 2; font-size: .88rem; }
  .blog-list--tarjetas .blog-anio { font-size: 1.8rem; margin: 1rem 0 -.4rem; padding-top: 1.6rem; }
}
@media (prefers-reduced-motion: reduce) { .post-card__cubierta { transition: none; } .post-card:hover .post-card__cubierta { transform: none; } }
