/* =========================================================
   VECINOS VOLUNTARIOS · hoja de estilos
   Se usa en todas las páginas del sitio (index y las demás).
   ========================================================= */

/* ---------- Colores y tipografías ---------- */
:root {
  /* Color del logo y su versión más fuerte (para texto blanco con buen contraste) */
  --orquidea: #C76AE5;
  --orquidea-fuerte: #A63FCF;
  --orquidea-suave: #F6E4FB;

  /* Paleta semi pastel, pero con brillo */
  --girasol: #FFD84D;
  --cielo: #5FD3EC;
  --mandarina: #FF9D66;
  --lila: #BBA8F5;
  --menta: #7EDBA8;

  /* Textos y fondos */
  --ciruela: #2A1240;
  --ciruela-suave: #5B4470;
  --papel: #FFFFFF;
  --papel-tenue: #FEF8FF;

  --f-titulos: "Bricolage Grotesque", "Trebuchet MS", system-ui, sans-serif;
  --f-texto: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;

  --alto-header: 76px;
  --inclinacion: -12deg; /* la misma inclinación del logo */
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--alto-header) + 12px); }
body {
  margin: 0;
  font-family: var(--f-texto);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ciruela);
  background: var(--papel);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--f-titulos); line-height: 1.08; letter-spacing: -0.02em; margin: 0; text-wrap: balance; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

:focus-visible { outline: 3px solid var(--ciruela); outline-offset: 3px; border-radius: 6px; }

.wrap { width: min(1180px, 100% - 2.5rem); margin-inline: auto; }
.section { padding: clamp(3.5rem, 8vw, 6.5rem) 0; }
.section h2 { font-size: clamp(1.9rem, 3.8vw, 3.1rem); font-weight: 800; }
.lead { font-size: 1.15rem; color: var(--ciruela-suave); max-width: 58ch; }

.skip {
  position: absolute; left: -999px; top: 8px; z-index: 100;
  background: var(--ciruela); color: #fff; padding: .6rem 1rem; border-radius: 10px;
}
.skip:focus { left: 8px; }

/* ---------- Botones (pastilla inclinada, como el logo) ---------- */
.btn {
  --bg: var(--orquidea-fuerte);
  --fg: #fff;
  position: relative; isolation: isolate;
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .95rem 1.7rem;
  font: 700 1rem/1.1 var(--f-titulos);
  color: var(--fg); text-decoration: none;
  border: 0; background: none; cursor: pointer;
}
.btn::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--bg); border-radius: 14px;
  transform: skewX(var(--inclinacion));
  transition: transform .15s ease, filter .15s ease;
}
.btn:hover::before { transform: skewX(var(--inclinacion)) translateY(-3px); filter: brightness(1.06); }
.btn-oscuro   { --bg: var(--ciruela); --fg: #fff; }
.btn-claro    { --bg: #fff; --fg: var(--ciruela); }
.btn-girasol  { --bg: var(--girasol); --fg: var(--ciruela); }
.btn-donar    { --bg: var(--mandarina); --fg: var(--ciruela); padding: .8rem 1.4rem; flex: none; }
.btn-borde    { --fg: var(--ciruela); }
.btn-borde::before { background: transparent; box-shadow: inset 0 0 0 2.5px var(--ciruela); }
.btn-borde:hover::before { background: rgba(255,255,255,.55); }
.botones { display: flex; flex-wrap: wrap; gap: 1rem 1.25rem; }

/* ---------- Marcador de foto (reemplazar por imágenes reales) ---------- */
.ph {
  position: relative; display: grid; place-items: center; overflow: hidden;
  width: 100%; height: 100%;
  background: var(--ph, linear-gradient(135deg, #E0A6F2, var(--lila)));
  color: rgba(42, 18, 64, .5);
}
.ph svg { width: 34%; max-width: 110px; fill: currentColor; }
.ph small {
  position: absolute; left: 14px; right: 14px; bottom: 10px;
  font: 600 .78rem/1.25 var(--f-texto); color: rgba(42, 18, 64, .72);
}
.ph-play svg.play { position: absolute; width: 56px; height: 56px; fill: none; opacity: .9; }

/* =========================================================
   HEADER (fijo) + MENÚ
   ========================================================= */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: #fff;
  box-shadow: 0 1px 0 rgba(42, 18, 64, .08);
}
.site-header .wrap { width: min(1400px, 100% - 2rem); }
.bar { display: flex; align-items: center; gap: 1rem; min-height: var(--alto-header); }
.brand { display: block; flex: none; }
.brand img { height: 40px; width: auto; }

.main-nav { margin-left: auto; }
.menu { display: flex; align-items: center; gap: 0; }
.menu > li { position: relative; }
.item {
  display: flex; align-items: center; border-radius: 10px;
  transition: background-color .15s ease;
}
.item > a {
  display: block; padding: .55rem .3rem .55rem .6rem; white-space: nowrap;
  font-weight: 600; font-size: clamp(.86rem, 1.02vw, .96rem); text-decoration: none;
}
.item > a[aria-current="page"] { color: var(--orquidea-fuerte); }
.menu > li:not(.has-sub) > .item > a { padding-right: .6rem; }
/* El texto y la flechita son un solo botón visual: el resaltado va en .item, no en cada hijo por separado */
.menu > li:not(.has-sub) > .item:hover,
.menu > li:not(.has-sub) > .item:focus-within,
.has-sub:hover > .item,
.has-sub:focus-within > .item,
.has-sub.open > .item { background: var(--orquidea-suave); }

.chev {
  width: 26px; height: 32px; border: 0; background: none; cursor: pointer;
  display: grid; place-items: center; margin-left: -.2rem;
}
.chev::before {
  content: ""; width: 7px; height: 7px;
  border-right: 2.5px solid var(--ciruela); border-bottom: 2.5px solid var(--ciruela);
  transform: rotate(45deg) translate(-1px, -1px); transition: transform .15s ease;
}
.has-sub.open > .item .chev::before { transform: rotate(-135deg) translate(-1px, -1px); }

.sub {
  display: none; position: absolute; left: 0; top: 100%; z-index: 60;
  min-width: 250px; padding: .5rem; background: #fff; border-radius: 16px;
  box-shadow: 0 14px 40px rgba(42, 18, 64, .18), 0 0 0 1px rgba(42, 18, 64, .05);
}
.sub a {
  display: flex; align-items: center; gap: .65rem;
  padding: .6rem .8rem; border-radius: 10px; text-decoration: none; font-weight: 500;
}
.sub a:hover { background: var(--orquidea-suave); }
.has-sub.open > .sub { display: block; }

.burger {
  display: none; flex: none; margin-left: auto; width: 46px; height: 46px; border: 0; background: var(--orquidea-suave);
  border-radius: 12px; cursor: pointer; position: relative;
}
.burger span, .burger::before, .burger::after {
  content: ""; position: absolute; left: 12px; right: 12px; height: 3px; background: var(--ciruela); border-radius: 3px;
  transition: transform .2s ease, opacity .2s ease;
}
.burger::before { top: 14px; }
.burger span { top: 21.5px; }
.burger::after { top: 29px; }
.burger[aria-expanded="true"]::before { transform: translateY(7.5px) rotate(45deg); }
.burger[aria-expanded="true"] span { opacity: 0; }
.burger[aria-expanded="true"]::after { transform: translateY(-7.5px) rotate(-45deg); }

/* Escritorio: el submenú aparece al pasar el mouse o al enfocar con teclado */
@media (min-width: 1381px) {
  .has-sub:hover > .sub, .has-sub:focus-within > .sub { display: block; }
  .sub a { white-space: nowrap; }
}

/* Móvil y tablet: menú hamburguesa con submenús colapsados */
@media (max-width: 1380px) {
  .burger { display: block; }
  .bar { gap: .75rem; }
  .btn-donar { margin-left: auto; padding: .7rem 1.2rem; }
  .burger { margin-left: 0; }
  .main-nav {
    position: absolute; left: 0; right: 0; top: 100%; margin: 0;
    background: #fff; max-height: calc(100vh - var(--alto-header)); overflow-y: auto;
    box-shadow: 0 18px 30px rgba(42, 18, 64, .16);
    display: none; padding: .5rem 1.25rem 1.25rem;
  }
  .main-nav.open { display: block; }
  .menu { flex-direction: column; align-items: stretch; gap: 0; }
  .menu > li { border-bottom: 1px solid rgba(42, 18, 64, .08); }
  .item { justify-content: space-between; }
  .item > a { flex: 1; padding: .95rem .5rem; font-size: 1.05rem; }
  .chev { width: 44px; height: 44px; }
  .sub { position: static; box-shadow: none; padding: 0 0 .6rem .6rem; min-width: 0; background: transparent; }
}

/* =========================================================
   HERO
   ========================================================= */
.hero { background: var(--papel-tenue); overflow: hidden; padding: clamp(2.5rem, 6vw, 5rem) 0 clamp(3rem, 7vw, 6rem); }
.hero .wrap { display: grid; grid-template-columns: 1.08fr .92fr; gap: clamp(1.5rem, 4vw, 4rem); align-items: center; }
.hero h1 { font-size: clamp(2.4rem, 5.2vw, 4.3rem); font-weight: 800; }
.hero .lead { margin: 1.4rem 0 2rem; font-size: 1.25rem; color: var(--ciruela); }

.hero-art { position: relative; min-height: 470px; }
.blk { position: absolute; border-radius: 30px; transform: skewX(var(--inclinacion)); }
.blk-cielo   { background: var(--cielo);   width: 60%; height: 74%; right: 0;   top: 10%; }
.blk-girasol { background: var(--girasol); width: 30%; height: 20%; left: 0;    bottom: 12%; }
.blk-menta   { background: var(--menta);   width: 22%; height: 15%; right: 6%;  bottom: 0; }

/* Huellitas de colores, para no repetir siempre el mismo paralelogramo inclinado */
.pata { position: absolute; fill: currentColor; filter: drop-shadow(0 6px 14px rgba(42, 18, 64, .18)); }
.pata-a { width: 52px; height: 52px; color: var(--lila);      left: 8%;  top: 2%;   rotate: -18deg; }
.pata-b { width: 34px; height: 34px; color: var(--menta);     right: 3%; top: 4%;   rotate: 14deg; }
.pata-c { width: 30px; height: 30px; color: var(--mandarina); left: 4%;  bottom: 34%; rotate: -10deg; }

.frame {
  position: absolute; left: 12%; top: 0; width: 64%; height: 88%;
  border-radius: 30px; overflow: hidden; transform: skewX(var(--inclinacion));
  box-shadow: 0 24px 50px rgba(42, 18, 64, .22);
}
.frame .ph { transform: skewX(12deg) scale(1.28); --ph: linear-gradient(150deg, #E3ADF4 0%, var(--orquidea) 55%, #B98BF0 100%); }
.frame .ph small { top: 16%; bottom: auto; left: 24%; right: 16%; text-align: center; }
.frame img {
  width: 100%; height: 100%; object-fit: cover; object-position: 50% 22%;
  transform: skewX(12deg) scale(1.3);
}
.hero-chip {
  position: absolute; left: 0; bottom: 3%; z-index: 2;
  padding: .8rem 1.4rem; font: 700 .98rem/1.25 var(--f-titulos); color: var(--ciruela);
  isolation: isolate; max-width: 250px;
}
.hero-chip::before {
  content: ""; position: absolute; inset: 0; z-index: -1; background: #fff; border-radius: 14px;
  transform: skewX(var(--inclinacion)); box-shadow: 0 10px 26px rgba(42, 18, 64, .18);
}

/* Un único movimiento al cargar: los bloques de color entran una vez */
@keyframes entra { from { opacity: 0; translate: 0 26px; } to { opacity: 1; translate: 0 0; } }
.blk, .frame, .hero-chip, .pata { animation: entra .7s cubic-bezier(.2, .8, .3, 1) both; }
.blk-cielo { animation-delay: .05s; } .frame { animation-delay: .15s; }
.blk-girasol { animation-delay: .3s; } .blk-menta { animation-delay: .38s; }
.pata-a { animation-delay: .48s; } .pata-b { animation-delay: .56s; }
.pata-c { animation-delay: .62s; } .hero-chip { animation-delay: .5s; }

/* =========================================================
   ÚLTIMAS NOVEDADES (feed de Instagram)
   ========================================================= */
.s-novedades { background: var(--girasol); }
.s-novedades .cabecera { max-width: 70ch; margin-bottom: 2.25rem; }
.s-novedades .lead { color: var(--ciruela); margin-top: .8rem; }
.feed { display: grid; grid-template-columns: repeat(4, 1fr); gap: .9rem; }
.feed .tile { aspect-ratio: 1; border-radius: 20px; overflow: hidden; }
.feed .tile:nth-child(8n+1) .ph { --ph: linear-gradient(135deg, #F3B4F7, var(--orquidea)); }
.feed .tile:nth-child(8n+2) .ph { --ph: linear-gradient(135deg, #A9EFFF, var(--cielo)); }
.feed .tile:nth-child(8n+3) .ph { --ph: linear-gradient(135deg, #FFC9A6, var(--mandarina)); }
.feed .tile:nth-child(8n+4) .ph { --ph: linear-gradient(135deg, #C8F5DC, var(--menta)); }
.feed .tile:nth-child(8n+5) .ph { --ph: linear-gradient(135deg, #D9CCFB, var(--lila)); }
.feed .tile:nth-child(8n+6) .ph { --ph: linear-gradient(135deg, #FFF3B0, #FFE585); }
.feed .tile:nth-child(8n+7) .ph { --ph: linear-gradient(135deg, #FFB9CF, #FF8FB5); }
.feed .tile:nth-child(8n+8) .ph { --ph: linear-gradient(135deg, #B9E4FF, #7DC3F7); }
.feed-pie { margin-top: 2rem; display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 2rem; justify-content: space-between; }
.feed-pie p { font-weight: 600; max-width: 52ch; }

/* =========================================================
   PREVENCIÓN Y JORNADAS
   ========================================================= */
.s-prevencion { background: var(--cielo); }
.prev-cabecera { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(1.5rem, 4vw, 4rem); align-items: center; }
.prev-cabecera .lead { color: var(--ciruela); margin-top: 1.1rem; }
.prev-cabecera .lead + .lead { margin-top: .8rem; }
.prev-cabecera .botones { margin-top: 1.8rem; }
.collage { display: grid; grid-template-columns: 1.25fr 1fr; grid-template-rows: 1fr 1fr; gap: .9rem; min-height: 360px; }
.collage > div { border-radius: 22px; overflow: hidden; }
.collage > div:first-child { grid-row: span 2; }
.collage > div:nth-child(1) .ph { --ph: linear-gradient(150deg, #FFF3B0, var(--girasol)); }
.collage > div:nth-child(2) .ph { --ph: linear-gradient(150deg, #FFC9A6, var(--mandarina)); }
.collage > div:nth-child(3) .ph { --ph: linear-gradient(150deg, #D9CCFB, var(--lila)); }

.mitos-titulo { margin: clamp(3rem, 6vw, 4.5rem) 0 1.4rem; font-size: clamp(1.5rem, 2.6vw, 2.1rem); font-weight: 800; }
.mitos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.mito { background: #fff; border-radius: 24px; padding: 1.5rem 1.5rem 1.7rem; display: flex; flex-direction: column; gap: 1rem; }
.mito .par { display: flex; flex-direction: column; gap: .45rem; }
.etiqueta {
  align-self: flex-start; position: relative; isolation: isolate;
  padding: .18rem .95rem; font: 700 .85rem/1.5 var(--f-titulos); color: var(--ciruela);
}
.etiqueta::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: 8px; transform: skewX(var(--inclinacion)); background: var(--mandarina); }
.etiqueta.verdad::before { background: var(--menta); }
.mito .dicho { font-family: var(--f-titulos); font-weight: 700; font-size: 1.2rem; line-height: 1.25; }
.mito .par + .par { padding-top: 1rem; border-top: 2px dotted rgba(42, 18, 64, .18); }

/* =========================================================
   CASOS DE ÉXITO
   ========================================================= */
.s-casos .cabecera { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 1rem 2rem; margin-bottom: 2.5rem; }
.casos { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1.25rem, 3vw, 2.5rem); }
.caso { padding-inline: .9rem; }
.caso .foto { aspect-ratio: 4 / 3.2; border-radius: 26px; overflow: hidden; transform: skewX(-5deg); margin-bottom: 1.4rem; background: var(--acento); }
.caso .foto .ph small { bottom: 12%; left: 14%; right: 14%; text-align: center; }
.caso .foto .ph { transform: skewX(5deg) scale(1.14); --ph: linear-gradient(140deg, color-mix(in srgb, var(--acento) 55%, white), var(--acento)); }
.caso h3 { font-size: 1.6rem; font-weight: 800; }
.caso .tiempo { display: inline-block; margin: .35rem 0 .8rem; font-weight: 700; color: var(--orquidea-fuerte); }
.caso blockquote { margin: 0; font-size: 1.08rem; }

/* =========================================================
   POR QUÉ ADOPTAR CON NOSOTROS
   ========================================================= */
.s-confianza { background: var(--lila); }
.s-confianza h2 { margin-bottom: 2.5rem; }
.confianza { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(1.25rem, 3vw, 2.25rem); }
.conf-icono {
  position: relative; isolation: isolate; display: grid; place-items: center;
  width: 72px; height: 72px; font-size: 2.1rem; margin-bottom: 1.1rem;
}
.conf-icono::before { content: ""; position: absolute; inset: 0; z-index: -1; background: #fff; border-radius: 20px; transform: skewX(-10deg); }
.confianza h3 { font-size: 1.3rem; font-weight: 800; line-height: 1.15; margin-bottom: .45rem; }

/* =========================================================
   LLAMADA A LA ACCIÓN FINAL
   ========================================================= */
.s-final { background: var(--orquidea); position: relative; overflow: hidden; }
.s-final .wrap { position: relative; z-index: 1; }
.s-final h2 { color: #fff; font-size: clamp(2.2rem, 5vw, 4rem); max-width: 16ch; }
.s-final .lead { color: var(--ciruela); margin: 1.1rem 0 2rem; font-weight: 500; }
.s-final .deco { position: absolute; border-radius: 34px; transform: skewX(var(--inclinacion)); }
.s-final .d1 { background: var(--girasol); width: 220px; height: 130px; right: 6%; top: 14%; }
.s-final .d2 { background: var(--cielo);   width: 160px; height: 200px; right: 14%; bottom: -60px; }
.pata-final { width: 66px; height: 66px; color: var(--girasol); right: 5%; bottom: 26%; rotate: -12deg; }

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer { background: var(--ciruela); color: #F1E6F7; padding: clamp(3rem, 6vw, 4.5rem) 0 2rem; font-size: 1rem; }
.pie-grid { display: grid; grid-template-columns: 1.4fr .8fr 1fr 1.2fr; gap: 2.25rem; }
.pie-logo { display: inline-block; background: #fff; padding: .7rem 1rem; border-radius: 16px; margin-bottom: 1.1rem; }
.pie-logo img { height: 38px; width: auto; }
.site-footer h3 { font-size: 1.1rem; color: #fff; margin-bottom: .9rem; letter-spacing: 0; }
.site-footer li + li { margin-top: .45rem; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { text-decoration: underline; text-underline-offset: 3px; }
.site-footer :focus-visible { outline-color: #fff; }
.news { display: flex; gap: .5rem; margin-top: .3rem; }
.news input {
  flex: 1; min-width: 0; padding: .75rem .9rem; border-radius: 12px; border: 2px solid transparent;
  font: inherit; color: var(--ciruela); background: #fff;
}
.news button {
  padding: .75rem 1.1rem; border: 0; border-radius: 12px; cursor: pointer;
  font: 700 .98rem var(--f-titulos); color: var(--ciruela); background: var(--girasol);
}
.news-msg { min-height: 1.5rem; margin-top: .5rem; font-size: .95rem; color: var(--menta); }
.redes { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1rem; }
.redes a {
  padding: .4rem 1rem; border-radius: 999px; font-weight: 600; font-size: .95rem;
  background: rgba(255, 255, 255, .12);
}
.redes a:hover { background: rgba(255, 255, 255, .22); text-decoration: none; }
.pie-legal {
  margin-top: 2.5rem; padding-top: 1.4rem; border-top: 1px solid rgba(255, 255, 255, .16);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: .6rem 2rem; font-size: .92rem; color: #D5C3E0;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 980px) {
  .hero .wrap, .prev-cabecera { grid-template-columns: 1fr; }
  .hero-art { min-height: 400px; max-width: 520px; width: 100%; margin-inline: auto; }
  .feed { grid-template-columns: repeat(2, 1fr); }
  .mitos, .casos { grid-template-columns: 1fr; }
  .casos { max-width: 520px; }
  .confianza { grid-template-columns: repeat(2, 1fr); }
  .pie-grid { grid-template-columns: 1fr 1fr; }
  .s-final .deco, .pata-final { opacity: .35; }
}
@media (max-width: 560px) {
  body { font-size: 1rem; }
  .brand img { height: 34px; }
  .btn-donar { padding: .65rem 1rem; font-size: .95rem; }
  .hero-art { min-height: 340px; }
  .hero-chip { font-size: .88rem; max-width: 200px; }
  .confianza { grid-template-columns: 1fr; }
  .pie-grid { grid-template-columns: 1fr; }
  .collage { min-height: 300px; }
  .botones .btn { width: 100%; justify-content: center; }
  .s-final .deco, .pata-final { display: none; }
}
@media (max-width: 380px) {
  .brand img { height: 28px; }
  .bar { gap: .5rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .blk, .frame, .hero-chip { animation: none; }
  .btn::before, .chev::before, .burger::before, .burger::after, .burger span { transition: none; }
}
