/* Daniela Molina — Asistente social y mediadora familiar (v2 interactiva) */
:root {
  --verde: #3f6b5c;
  --verde-osc: #24413a;
  --verde-claro: #e6efe9;
  --terracota: #c8734f;
  --terracota-osc: #a95a3a;
  --arena: #f7f1ea;
  --tinta: #22302b;
  --gris: #5e6a65;
  --linea: #e6e1d9;
  --radio: 20px;
  --sombra: 0 14px 40px rgba(34, 48, 43, .10);
  --max: 1160px;
  --serif: Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body { margin: 0; font-family: var(--sans); font-size: 17px; line-height: 1.65; color: var(--tinta); background: #fff; }
img { display: block; max-width: 100%; }
a { color: var(--verde); }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.18; margin: 0 0 .5em; color: var(--verde-osc); }
h1 { font-size: clamp(2.3rem, 5vw, 3.8rem); }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; }
.contenedor { width: min(100% - 2.5rem, var(--max)); margin-inline: auto; }
.saltar { position: absolute; left: -999px; }
.saltar:focus { left: 1rem; top: 1rem; background: var(--verde); color: #fff; padding: .5rem 1rem; z-index: 99; }
.etiqueta { display: inline-block; font-size: .78rem; letter-spacing: .16em; text-transform: uppercase; color: var(--terracota); font-weight: 700; margin-bottom: .9rem; }

/* Botones */
.btn { display: inline-flex; align-items: center; gap: .55rem; padding: .9rem 1.5rem; border-radius: 999px; font-weight: 600; text-decoration: none; border: 2px solid transparent; cursor: pointer; font: inherit; font-weight: 600; transition: transform .2s ease, background .2s ease, box-shadow .2s ease; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(0,0,0,.12); }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn-wa { background: #1f9d55; color: #fff; }
.btn-wa:hover { background: #17834a; color: #fff; }
.btn-claro { background: rgba(255,255,255,.14); color: #fff; border-color: rgba(255,255,255,.7); backdrop-filter: blur(4px); }
.btn-claro:hover { background: rgba(255,255,255,.25); color: #fff; }
.btn-borde { border-color: var(--verde); color: var(--verde-osc); background: transparent; }
.btn-borde:hover { background: var(--verde-claro); }

/* Encabezado */
.cabecera { position: fixed; inset: 0 0 auto; z-index: 40; transition: background .3s ease, box-shadow .3s ease; }
.cabecera .contenedor { display: flex; align-items: center; justify-content: space-between; min-height: 78px; gap: 1rem; transition: min-height .3s ease; }
.cabecera.solida { background: rgba(255,255,255,.96); backdrop-filter: blur(10px); box-shadow: 0 4px 20px rgba(0,0,0,.06); }
.cabecera.solida .contenedor { min-height: 64px; }
.marca { text-decoration: none; color: #fff; line-height: 1.1; transition: color .3s ease; }
.marca strong { font-family: var(--serif); font-size: 1.22rem; display: block; }
.marca small { font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; opacity: .9; font-weight: 600; }
.cabecera.solida .marca { color: var(--verde-osc); }
.menu { display: flex; gap: .2rem; align-items: center; list-style: none; margin: 0; padding: 0; }
.menu a { text-decoration: none; color: #fff; padding: .5rem .85rem; border-radius: 999px; font-weight: 500; font-size: .96rem; transition: background .2s ease, color .2s ease; }
.menu a:hover { background: rgba(255,255,255,.18); }
.cabecera.solida .menu a { color: var(--tinta); }
.cabecera.solida .menu a:hover { background: var(--verde-claro); color: var(--verde-osc); }
.menu .btn { padding: .55rem 1.15rem; }
.menu .btn-wa, .cabecera.solida .menu .btn-wa { color: #fff; }
.boton-menu { display: none; background: none; border: 0; color: #fff; padding: .5rem; cursor: pointer; }
.boton-menu svg { width: 28px; height: 28px; }
.cabecera.solida .boton-menu { color: var(--verde-osc); }

/* Portada */
.portada { position: relative; min-height: 100vh; min-height: 100svh; display: flex; align-items: center; color: #fff; overflow: hidden; }
.portada-fondo { position: absolute; inset: 0; background: url("/img/fotos/portada-familia-playa.jpg") center 65% / cover no-repeat; animation: acercar 22s ease-in-out infinite alternate; }
.portada::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, rgba(36,65,58,.88) 0%, rgba(36,65,58,.62) 45%, rgba(36,65,58,.15) 100%); }
.portada .contenedor { position: relative; z-index: 1; padding: 7rem 0 5rem; }
.portada h1 { color: #fff; max-width: 15ch; }
.portada .etiqueta { color: #f3c6ad; }
.rotativa { display: inline-block; color: #f3c6ad; border-bottom: 3px solid rgba(243,198,173,.5); min-width: 6ch; transition: opacity .35s ease, transform .35s ease; }
.rotativa.saliendo { opacity: 0; transform: translateY(-10px); }
.portada p.lead { font-size: 1.22rem; color: #e3eee8; max-width: 38ch; }
.acciones { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2rem; }
.sellos { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 2.4rem; padding: 0; list-style: none; }
.sellos li { background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.25); padding: .45rem .95rem; border-radius: 999px; font-size: .9rem; backdrop-filter: blur(4px); }
.bajar { position: absolute; left: 50%; bottom: 1.6rem; z-index: 1; transform: translateX(-50%); color: #fff; opacity: .8; animation: rebote 2s infinite; }
.bajar svg { width: 30px; height: 30px; }
@keyframes acercar { from { transform: scale(1); } to { transform: scale(1.08); } }
@keyframes rebote { 0%,100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, 8px); } }

/* Secciones */
.seccion { padding: clamp(4rem, 8vw, 6.5rem) 0; }
.seccion.suave { background: var(--arena); }
.cabeza { max-width: 700px; margin-bottom: 2.8rem; }
.cabeza.centro { text-align: center; margin-inline: auto; }
.cabeza p { color: var(--gris); font-size: 1.1rem; }

/* Selector de ayuda */
.chips { display: flex; flex-wrap: wrap; gap: .6rem; justify-content: center; margin-bottom: 2rem; }
.chip { font: inherit; font-weight: 600; font-size: .98rem; border: 2px solid var(--linea); background: #fff; color: var(--tinta); padding: .7rem 1.2rem; border-radius: 999px; cursor: pointer; display: inline-flex; align-items: center; gap: .5rem; transition: all .2s ease; }
.chip svg { width: 20px; height: 20px; color: var(--verde); }
.chip:hover { border-color: var(--verde); transform: translateY(-2px); }
.chip[aria-selected="true"] { background: var(--verde-osc); border-color: var(--verde-osc); color: #fff; box-shadow: 0 10px 24px rgba(36,65,58,.25); }
.chip[aria-selected="true"] svg { color: #f3c6ad; }
.panel { display: grid; grid-template-columns: 1.05fr 1fr; background: #fff; border-radius: 28px; overflow: hidden; box-shadow: var(--sombra); border: 1px solid var(--linea); animation: aparecer .45s ease; }
.panel[hidden] { display: none; }
.panel-foto { position: relative; min-height: 380px; overflow: hidden; }
.panel-foto img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 6s ease; }
.panel:hover .panel-foto img { transform: scale(1.06); }
.panel-texto { padding: clamp(1.8rem, 4vw, 3rem); display: flex; flex-direction: column; justify-content: center; }
.panel-texto p { color: var(--gris); }
.panel-texto ul { list-style: none; padding: 0; margin: 0 0 1.6rem; display: grid; gap: .55rem; }
.panel-texto li { display: flex; gap: .7rem; align-items: flex-start; }
.panel-texto li::before { content: ""; flex: none; width: 22px; height: 22px; margin-top: .2rem; border-radius: 50%; background: var(--verde-claro) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233f6b5c' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center / 13px no-repeat; }
@keyframes aparecer { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* Proceso */
.linea-tiempo { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; list-style: none; padding: 0; margin: 0; }
.linea-tiempo::before { content: ""; position: absolute; top: 27px; left: 6%; right: 6%; height: 4px; background: var(--linea); border-radius: 4px; }
.linea-tiempo .progreso { position: absolute; top: 27px; left: 6%; height: 4px; width: 0; max-width: 88%; background: var(--terracota); border-radius: 4px; transition: width 1.6s ease; }
.linea-tiempo.activa .progreso { width: 88%; }
.paso { position: relative; text-align: center; }
.paso .num { width: 58px; height: 58px; margin: 0 auto 1rem; border-radius: 50%; background: #fff; border: 4px solid var(--terracota); color: var(--terracota-osc); font-weight: 800; font-size: 1.25rem; display: grid; place-items: center; position: relative; z-index: 1; transition: background .3s ease, color .3s ease, transform .3s ease; }
.paso:hover .num { background: var(--terracota); color: #fff; transform: scale(1.08); }
.paso h3 { font-size: 1.12rem; }
.paso p { color: var(--gris); font-size: .97rem; margin: 0; }
.nota { margin-top: 2.6rem; padding: 1.2rem 1.5rem; border-left: 4px solid var(--terracota); background: #fff; border-radius: 0 14px 14px 0; color: var(--gris); }

/* Franja con foto */
.franja { position: relative; padding: clamp(5rem, 12vw, 8rem) 0; color: #fff; text-align: center; background: url("/img/fotos/atardecer-familia.jpg") center / cover fixed; }
.franja::before { content: ""; position: absolute; inset: 0; background: rgba(36,65,58,.72); }
.franja .contenedor { position: relative; }
.franja blockquote { margin: 0 auto 2rem; font-family: var(--serif); font-size: clamp(1.6rem, 3.4vw, 2.5rem); line-height: 1.3; max-width: 26ch; }
.valores { display: flex; flex-wrap: wrap; justify-content: center; gap: .7rem; list-style: none; padding: 0; margin: 0; }
.valores li { padding: .5rem 1.2rem; border: 1px solid rgba(255,255,255,.45); border-radius: 999px; letter-spacing: .08em; text-transform: uppercase; font-size: .85rem; font-weight: 600; transition: background .2s ease; }
.valores li:hover { background: rgba(255,255,255,.18); }

/* Tarjetas con foto */
.rejilla { display: grid; gap: 1.5rem; }
.r2 { grid-template-columns: 1fr 1fr; align-items: center; gap: 3.5rem; }
.r3 { grid-template-columns: repeat(3, 1fr); }
.foto-redonda { border-radius: 28px; overflow: hidden; box-shadow: var(--sombra); aspect-ratio: 4 / 3; }
.foto-redonda img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s ease; }
.foto-redonda:hover img { transform: scale(1.05); }
.tarjeta { background: #fff; border: 1px solid var(--linea); border-radius: var(--radio); padding: 1.5rem; box-shadow: var(--sombra); transition: transform .25s ease, border-color .25s ease; }
.tarjeta:hover { transform: translateY(-6px); border-color: var(--verde); }
.tarjeta h3 { font-size: 1.1rem; margin-bottom: .3rem; }
.tarjeta p { color: var(--gris); margin: 0; font-size: .97rem; }
.icono { width: 52px; height: 52px; border-radius: 14px; background: var(--verde-claro); color: var(--verde); display: grid; place-items: center; margin-bottom: 1rem; }
.icono svg { width: 26px; height: 26px; }

/* Preguntas frecuentes */
.faq { max-width: 820px; margin-inline: auto; display: grid; gap: .8rem; }
.faq details { background: #fff; border: 1px solid var(--linea); border-radius: 16px; overflow: hidden; transition: border-color .2s ease, box-shadow .2s ease; }
.faq details[open] { border-color: var(--verde); box-shadow: var(--sombra); }
.faq summary { list-style: none; cursor: pointer; padding: 1.15rem 1.4rem; font-weight: 600; display: flex; justify-content: space-between; gap: 1rem; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--verde-claro); color: var(--verde-osc); display: grid; place-items: center; font-size: 1.3rem; transition: transform .25s ease; }
.faq details[open] summary::after { transform: rotate(45deg); background: var(--verde); color: #fff; }
.faq .respuesta { padding: 0 1.4rem 1.2rem; color: var(--gris); }

/* Contacto */
.contacto-rejilla { display: grid; grid-template-columns: 1fr 1.1fr; gap: 2.5rem; align-items: start; }
.canales { display: grid; gap: 1rem; }
.canal { display: flex; gap: 1rem; align-items: center; text-decoration: none; color: var(--tinta); background: #fff; border: 1px solid var(--linea); border-radius: 18px; padding: 1.1rem 1.3rem; transition: transform .2s ease, border-color .2s ease; }
.canal:hover { transform: translateX(6px); border-color: var(--verde); }
.canal .icono { margin: 0; flex: none; }
.canal strong { display: block; color: var(--verde-osc); word-break: break-word; }
.canal span { color: var(--gris); font-size: .92rem; }
.formulario { background: #fff; border: 1px solid var(--linea); border-radius: 24px; padding: clamp(1.5rem, 4vw, 2.2rem); box-shadow: var(--sombra); }
.formulario label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: .35rem; color: var(--verde-osc); }
.formulario input, .formulario select, .formulario textarea { width: 100%; font: inherit; font-size: 1rem; padding: .8rem .95rem; border: 1px solid #cfd8d3; border-radius: 12px; background: #fff; color: var(--tinta); margin-bottom: 1rem; }
.formulario input:focus, .formulario select:focus, .formulario textarea:focus { outline: 3px solid rgba(63,107,92,.25); border-color: var(--verde); }
.formulario textarea { min-height: 110px; resize: vertical; }
.formulario .btn { width: 100%; justify-content: center; }
.formulario small { display: block; color: var(--gris); margin-top: .7rem; text-align: center; }

/* Pie */
.pie { background: var(--verde-osc); color: #c6d6cd; font-size: .92rem; }
.pie .contenedor { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .6rem; padding: 1.6rem 0; }
.pie a { color: #fff; }

/* Flotantes */
.wa-flotante { position: fixed; right: 18px; bottom: 18px; z-index: 50; width: 60px; height: 60px; border-radius: 50%; background: #25d366; color: #fff; display: grid; place-items: center; box-shadow: 0 8px 24px rgba(0,0,0,.22); }
.wa-flotante::before { content: ""; position: absolute; inset: 0; border-radius: 50%; background: #25d366; animation: pulso 2.4s infinite; z-index: -1; }
.wa-flotante svg { width: 31px; height: 31px; }
@keyframes pulso { 0% { transform: scale(1); opacity: .6; } 100% { transform: scale(1.7); opacity: 0; } }
.subir { position: fixed; right: 26px; bottom: 92px; z-index: 50; width: 44px; height: 44px; border-radius: 50%; border: 0; background: #fff; color: var(--verde-osc); box-shadow: 0 6px 18px rgba(0,0,0,.15); cursor: pointer; display: grid; place-items: center; opacity: 0; pointer-events: none; transition: opacity .3s ease; }
.subir.visible { opacity: 1; pointer-events: auto; }
.subir svg { width: 22px; height: 22px; }

/* Animaciones al hacer scroll */
.revelar { opacity: 0; transform: translateY(28px); transition: opacity .8s ease, transform .8s ease; }
.revelar.visible { opacity: 1; transform: none; }
.revelar[data-retardo="1"] { transition-delay: .12s; }
.revelar[data-retardo="2"] { transition-delay: .24s; }
.revelar[data-retardo="3"] { transition-delay: .36s; }

/* Responsivo */
@media (max-width: 960px) {
  .r2, .panel, .contacto-rejilla { grid-template-columns: 1fr; }
  .r3 { grid-template-columns: 1fr; }
  .panel-foto { min-height: 260px; }
  .linea-tiempo { grid-template-columns: 1fr 1fr; row-gap: 2.2rem; }
  .linea-tiempo::before, .linea-tiempo .progreso { display: none; }
  .franja { background-attachment: scroll; }
  .boton-menu { display: block; }
  .menu { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; background: #fff; padding: 1rem 1.25rem 1.4rem; box-shadow: 0 12px 24px rgba(0,0,0,.1); }
  .menu.abierto { display: flex; }
  .menu a, .cabecera .menu a { color: var(--tinta); }
  .menu .btn { justify-content: center; margin-top: .4rem; }
}
@media (max-width: 560px) {
  .marca strong { font-size: 1rem; }
  .linea-tiempo { grid-template-columns: 1fr; }
  .chip { font-size: .92rem; padding: .6rem 1rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .revelar { opacity: 1; transform: none; }
}
