/* ==========================================================
   ZORBA HELADOS · HISTORIA
   Misma línea visual del Inicio: azul metalizado, crema, tarjetas redondeadas,
   scoops y chispas de decoración, y el "portal" en arco para las fotos.
   Usa las variables de index.css (--zorba-blue, --font-title, --font-body, etc.).
   Para cambiar las fotos: reemplazá imagenes/historia1.jpg e imagenes/historia2.jpg
   (si el archivo no existe se ve una ilustración de fondo).
   ========================================================== */
.hist-page { background: var(--cream, #FFFBF5); overflow-x: clip; }

/* ---------------- ENCABEZADO ---------------- */
.hist-hero {
    position: relative; isolation: isolate; z-index: 2; color: #fff;
    background-color: #28549C;
    background-image:
        linear-gradient(112deg, rgba(255,255,255,0) 26%, rgba(255,255,255,.085) 39%, rgba(255,255,255,0) 52%),
        radial-gradient(ellipse 44% 86% at 76% 46%, rgba(80,168,255,.58) 0%, rgba(80,168,255,.24) 48%, rgba(80,168,255,0) 100%),
        radial-gradient(ellipse 70% 100% at 0% 100%, rgba(8,28,72,.42) 0%, rgba(8,28,72,0) 70%);
}
.hist-hero-bg { position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.hist-marca {
    position: absolute; right: 2%; top: 50%; transform: translateY(-50%);
    font-family: var(--font-title); font-size: clamp(240px, 36vw, 520px); font-weight: 800; line-height: .8; letter-spacing: -.08em;
    color: rgba(255,255,255,.075); user-select: none;
}
.hh { position: absolute; height: auto; filter: drop-shadow(0 14px 14px rgba(5,20,55,.38)); }
.hh-cono  { width: 92px;  left: 47%;  top: 66px;  transform: rotate(-14deg); animation: hFloat 7s ease-in-out infinite; }
.hh-choco { width: 64px;  left: 40%;  bottom: 74px; transform: rotate(-8deg);  animation: hFloat 9s ease-in-out -2s infinite; }
.hh-fru   { width: 74px;  left: 51%;  bottom: 44px; transform: rotate(10deg); animation: hFloat 8s ease-in-out -4s infinite; }
.hh-menta { width: 70px;  right: 3%;  top: 38px;  transform: rotate(12deg);  animation: hFloat 10s ease-in-out -1s infinite; }
.hh-pista { width: 58px;  right: 12%; bottom: 36px; transform: rotate(-12deg); animation: hFloat 9s ease-in-out -5s infinite; }
@keyframes hFloat { 0%,100% { translate: 0 0; } 50% { translate: 0 -10px; } }

.hs { position: absolute; width: 15px; height: 5px; border-radius: 3px; background: linear-gradient(180deg, rgba(255,255,255,.55) 0%, rgba(255,255,255,0) 45%, rgba(0,0,0,.14) 100%), var(--spr, #F08CB0); box-shadow: 0 2px 2px rgba(5,20,55,.35); }
.hc { position: absolute; width: 11px; height: 9px; border-radius: 55% 45% 50% 50% / 60% 55% 45% 40%; background: radial-gradient(ellipse at 32% 28%, #9A6A47 0%, #5A3420 48%, #2F1A0F 100%); box-shadow: 0 2px 3px rgba(5,20,55,.4); }
.hs-1 { left: 16%; top: 22%; --spr: #F08CB0; transform: rotate(32deg); }
.hs-2 { left: 36%; top: 78%; --spr: #F2C66C; transform: rotate(-24deg); }
.hs-3 { left: 58%; top: 16%; --spr: #8FD18B; transform: rotate(40deg); }
.hs-4 { left: 70%; top: 74%; --spr: #E5483E; transform: rotate(-30deg); }
.hs-5 { right: 6%; top: 52%; --spr: #F08CB0; transform: rotate(20deg); }
.hs-6 { left: 8%; top: 70%; --spr: #6DCBFF; transform: rotate(-10deg); }
.hc-1 { left: 26%; top: 14%; transform: rotate(25deg); }
.hc-2 { left: 62%; top: 60%; transform: rotate(-40deg); width: 9px; height: 7px; }
.hc-3 { right: 9%; top: 24%; transform: rotate(50deg); width: 10px; height: 8px; }

.hist-hero-inner {
    position: relative; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); align-items: center; gap: 40px;
    width: min(1180px, calc(100% - 48px)); min-height: 430px; margin: 0 auto; padding: 56px 0 84px;
}
.hist-migas { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; margin-bottom: 22px; font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.72); }
.hist-migas a { color: #BFE6FF; transition: color .2s ease; }
.hist-migas a:hover { color: #fff; text-decoration: underline; text-underline-offset: 4px; }
.hist-migas [aria-current] { color: #fff; }
.hist-hero .historia-titulo {
    margin: 0; font-family: var(--font-title); font-size: clamp(60px, 9vw, 120px); font-weight: 800; line-height: .94; letter-spacing: -.07em;
    text-transform: none; color: #fff; text-shadow: 0 10px 34px rgba(5,20,55,.28);
}
.hist-hero .historia-subtitulo {
    position: relative; display: block; max-width: 520px; margin: 22px 0 0; padding: 0 0 0 22px;
    font-family: var(--font-body); font-size: clamp(17px, 1.7vw, 22px); font-weight: 500; line-height: 1.5; letter-spacing: 0; color: #DDF1FF;
}
.hist-hero .historia-subtitulo::before { content: ""; position: absolute; left: 0; top: 4px; bottom: 4px; width: 4px; height: auto; border-radius: 4px; background: linear-gradient(180deg, #6DCBFF, #F08CB0); opacity: 1; transform: none; }
.hist-hero .historia-subtitulo::after { content: none; }

/* Sello "40 años" */
.hist-sello { position: relative; display: grid; place-items: center; width: min(360px, 100%); aspect-ratio: 1; margin: 0 auto; }
.hist-sello-aro { position: absolute; inset: 0; border-radius: 50%; border: 2px dashed rgba(255,255,255,.5); animation: hGira 48s linear infinite; }
.hist-sello-aro::after { content: ""; position: absolute; inset: -16px; border-radius: 50%; border: 1px solid rgba(255,255,255,.18); }
.hist-sello-nucleo {
    display: grid; place-content: center; justify-items: center; width: 74%; aspect-ratio: 1; border-radius: 50%; text-align: center;
    background: radial-gradient(circle at 34% 28%, rgba(255,255,255,.34) 0%, rgba(255,255,255,.08) 62%), rgba(12,36,84,.32);
    box-shadow: inset 0 0 0 3px rgba(255,255,255,.22), 0 24px 46px rgba(5,20,55,.34); backdrop-filter: blur(3px);
}
.hist-sello-nucleo strong { font-family: var(--font-title); font-size: clamp(88px, 11vw, 140px); font-weight: 800; line-height: .9; letter-spacing: -.07em; color: #fff; }
.hist-sello-nucleo small { margin-top: 2px; font-size: clamp(14px, 1.5vw, 19px); font-weight: 800; letter-spacing: .34em; text-indent: .34em; text-transform: uppercase; color: #BFE6FF; }
@keyframes hGira { to { transform: rotate(360deg); } }

/* Goteo del baño azul */
.hist-goteo { position: absolute; left: 0; top: calc(100% - 1px); z-index: 1; display: block; width: 100%; height: 86px; fill: #28549C; filter: drop-shadow(0 10px 8px rgba(8,28,72,.22)); pointer-events: none; }

/* ---------------- CUERPO ---------------- */
.hist-cuerpo { position: relative; padding: 150px 0 104px; }
.hist-deco { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.hd { position: absolute; height: auto; filter: drop-shadow(0 10px 10px rgba(31,40,60,.22)); }
.hd-1 { width: 74px; left: calc(50% - 690px); top: 360px; transform: rotate(-10deg); animation: hFloat 9s ease-in-out infinite; }
.hd-2 { width: 68px; right: calc(50% - 690px); top: 640px; transform: rotate(14deg); animation: hFloat 10s ease-in-out -3s infinite; }
.hd-3 { width: 62px; left: calc(50% - 668px); top: 1010px; transform: rotate(-6deg); animation: hFloat 8s ease-in-out -2s infinite; }
.hd-4 { width: 70px; right: calc(50% - 680px); top: 1290px; transform: rotate(10deg); animation: hFloat 9s ease-in-out -5s infinite; }
.hist-deco .hs { box-shadow: 0 2px 2px rgba(31,40,60,.22); }
.hist-deco .hc { box-shadow: 0 2px 3px rgba(31,20,12,.3); }
.hs-a { left: calc(50% - 640px); top: 250px; --spr: #F08CB0; transform: rotate(30deg); }
.hs-b { right: calc(50% - 620px); top: 470px; --spr: #4DB3E6; transform: rotate(-26deg); }
.hs-c { left: calc(50% - 650px); top: 780px; --spr: #F2C66C; transform: rotate(40deg); }
.hs-d { right: calc(50% - 650px); top: 960px; --spr: #E5483E; transform: rotate(-34deg); }
.hs-e { left: calc(50% - 630px); top: 1180px; --spr: #8FD18B; transform: rotate(18deg); }
.hs-f { right: calc(50% - 640px); top: 1120px; --spr: #F08CB0; transform: rotate(-12deg); }
.hc-a { left: calc(50% - 600px); top: 560px; transform: rotate(25deg); }
.hc-b { right: calc(50% - 600px); top: 780px; transform: rotate(-40deg); width: 9px; height: 7px; }
.hc-c { left: calc(50% - 610px); top: 1350px; transform: rotate(50deg); }

.hist-capitulos { position: relative; z-index: 1; display: grid; gap: 92px; width: min(1180px, calc(100% - 48px)); margin: 0 auto; }
.hist-capitulos::before { content: ""; position: absolute; left: 50%; top: 24px; bottom: 24px; border-left: 2px dashed rgba(40,84,156,.28); transform: translateX(-1px); }
.hist-cap { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 96px minmax(0, 1fr); align-items: center; }
.hist-nodo {
    position: relative; z-index: 2; grid-column: 2; grid-row: 1; justify-self: center; display: grid; place-items: center; width: 58px; height: 58px; border-radius: 50%;
    background: #28549C; color: #fff; font-family: var(--font-title); font-size: 16px; font-weight: 800; letter-spacing: .02em;
    box-shadow: 0 0 0 7px var(--cream, #FFFBF5), 0 0 0 9px rgba(40,84,156,.25), 0 12px 22px rgba(28,64,126,.3);
}
.hist-cap-1 .hist-card { grid-column: 1; grid-row: 1; }
.hist-cap-1 .hist-arco { grid-column: 3; grid-row: 1; }
.hist-cap-3 .hist-arco { grid-column: 1; grid-row: 1; }
.hist-cap-3 .hist-card { grid-column: 3; grid-row: 1; }
.hist-cap-2 { display: block; }
.hist-cap-2 .hist-nodo { position: absolute; left: 50%; top: -29px; transform: translateX(-50%); }

/* Tarjetas de texto */
.hist-card {
    position: relative; padding: 44px 46px; border-radius: 34px; background: #fff; border: 1px solid rgba(40,84,156,.09);
    box-shadow: 0 22px 50px rgba(31,57,73,.10);
}
.hist-card p { margin: 0; font-family: var(--font-body); font-size: 17px; line-height: 1.9; color: #4A4540; text-align: left; }
.hist-card .primer-parrafo::first-letter {
    float: left; margin: 6px 12px 0 0; font-family: var(--font-title); font-size: 82px; font-weight: 800; line-height: .78; color: var(--zorba-blue, #1C7FB8);
}
.hist-card-durazno { background: radial-gradient(circle at 12% 18%, rgba(255,255,255,.75) 0, rgba(255,255,255,0) 45%), linear-gradient(135deg, #FFF3E6 0%, #FFE4CC 100%); border-color: rgba(153,104,62,.12); box-shadow: 0 22px 54px rgba(72,55,38,.10); }
.hist-card-durazno p { color: #54483D; }

/* Capítulo central destacado */
.hist-card-azul {
    padding: 64px 72px 60px; border: 0; border-radius: 40px; color: #fff;
    background-color: #28549C;
    background-image:
        linear-gradient(112deg, rgba(255,255,255,0) 26%, rgba(255,255,255,.08) 40%, rgba(255,255,255,0) 54%),
        radial-gradient(ellipse 50% 90% at 88% 20%, rgba(80,168,255,.5) 0%, rgba(80,168,255,0) 100%),
        radial-gradient(ellipse 70% 100% at 0% 100%, rgba(8,28,72,.4) 0%, rgba(8,28,72,0) 70%);
    box-shadow: 0 28px 60px rgba(28,64,126,.32);
}
.hist-card-azul p { position: relative; z-index: 1; max-width: 880px; margin: 0 auto; font-size: clamp(18px, 1.8vw, 22px); line-height: 1.8; font-weight: 500; color: #EAF5FF; text-align: center; }
.hist-resalte { font-weight: 800; color: #fff; background: linear-gradient(180deg, transparent 62%, rgba(240,140,176,.55) 62%, rgba(240,140,176,.55) 92%, transparent 92%); padding: 0 3px; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.hist-comillas { position: absolute; left: 34px; top: -14px; font-family: Georgia, 'Times New Roman', serif; font-size: 190px; line-height: 1; color: rgba(255,255,255,.14); pointer-events: none; }
.hca { position: absolute; height: auto; filter: drop-shadow(0 12px 12px rgba(5,20,55,.4)); pointer-events: none; }
.hca-1 { width: 84px; right: -22px; bottom: -30px; transform: rotate(14deg); animation: hFloat 8s ease-in-out infinite; }
.hca-2 { width: 66px; left: -20px; bottom: 26px; transform: rotate(-12deg); animation: hFloat 9s ease-in-out -3s infinite; }

/* Portal en arco para las fotos */
.hist-arco { position: relative; width: min(100%, 360px); aspect-ratio: 4 / 5.2; margin: 0 auto; }
/* Arco: radios en % para que la parte de arriba sea un semicírculo y las esquinas de abajo conserven su curva */
.hist-arco-fondo, .hist-foto { position: absolute; inset: 0; border-radius: 50% 50% 34px 34px / 38.46% 38.46% 34px 34px; }
.hist-arco-fondo { overflow: hidden; box-shadow: 0 26px 50px rgba(15,76,122,.3), inset 0 0 0 1px rgba(255,255,255,.25); }
.hist-arco-azul .hist-arco-fondo { background: radial-gradient(circle at 50% 34%, rgba(255,255,255,.6) 0, rgba(255,255,255,0) 52%), linear-gradient(180deg, #62BDEC 0%, #1C7FB8 56%, #0F4C7A 100%); }
.hist-arco-rosa .hist-arco-fondo { background: radial-gradient(circle at 50% 34%, rgba(255,255,255,.65) 0, rgba(255,255,255,0) 52%), linear-gradient(180deg, #F9B9CF 0%, #E2709A 56%, #A83A66 100%); box-shadow: 0 26px 50px rgba(150,50,90,.3), inset 0 0 0 1px rgba(255,255,255,.25); }
.hist-arco-fondo img { position: absolute; height: auto; filter: drop-shadow(0 18px 16px rgba(5,20,55,.38)); }
.ar-cono { width: 40%; left: 30%; bottom: 8%; transform: rotate(-6deg); animation: hFloat 7s ease-in-out infinite; }
.ar-pote { width: 78%; left: 11%; bottom: 17%; transform: rotate(-4deg); animation: hFloat 7s ease-in-out infinite; }
.hist-arco-azul .ar-scoop { width: 28%; right: 9%; top: 36%; transform: rotate(12deg); }
.hist-arco-rosa .ar-scoop { width: 30%; left: 9%; top: 24%; transform: rotate(-10deg); }
.hist-foto { z-index: 1; width: 100%; height: 100%; object-fit: cover; box-shadow: 0 26px 50px rgba(15,76,122,.3); }
.hist-arco::after { content: ""; position: absolute; z-index: 2; inset: 14px; border: 2px dashed rgba(255,255,255,.55); border-radius: 50% 50% 24px 24px / 36% 36% 24px 24px; pointer-events: none; }
.hist-sticker {
    position: absolute; z-index: 3; display: grid; place-content: center; justify-items: center; width: 98px; height: 98px; border-radius: 50%; text-align: center; color: #fff; line-height: 1.05;
    box-shadow: 0 12px 24px rgba(12,36,84,.35), inset 0 0 0 3px rgba(255,255,255,.18);
}
.hist-sticker strong { font-family: var(--font-title); font-size: 19px; font-weight: 800; letter-spacing: -.02em; }
.hist-sticker small { font-size: 10px; font-weight: 700; letter-spacing: .05em; opacity: .92; }
.sticker-rojo { right: -26px; top: 10%; background: #A31C20; transform: rotate(10deg); }
.sticker-azul { left: -26px; bottom: 12%; background: #0C2454; transform: rotate(-9deg); }

/* Enlace a la siguiente página */
.hist-siguiente {
    position: relative; z-index: 1; display: flex; width: fit-content; max-width: calc(100% - 48px); margin: 84px auto 0; flex-direction: column; align-items: center; gap: 4px; padding: 20px 38px;
    border: 1px solid rgba(40,84,156,.18); border-radius: 999px; background: #fff; text-align: center; box-shadow: 0 14px 32px rgba(31,57,73,.09);
    transition: transform .25s ease, box-shadow .25s ease;
}
.hist-siguiente span { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted, #6B6B6B); }
.hist-siguiente strong { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-title); font-size: 20px; font-weight: 800; letter-spacing: -.03em; color: var(--zorba-blue, #1C7FB8); }
.hist-siguiente strong i { font-size: 15px; transition: transform .2s ease; }
.hist-siguiente:hover { transform: translateY(-4px); box-shadow: 0 20px 38px rgba(31,57,73,.14); }
.hist-siguiente:hover strong i { transform: translateX(5px); }

/* Cinta con el lema */
.hist-cinta { position: relative; z-index: 1; margin: -28px -30px 22px; padding: 18px 0; overflow: hidden; transform: rotate(-1.4deg); background: linear-gradient(90deg, #1C7FB8, #28549C 50%, #1C7FB8); box-shadow: 0 -8px 24px rgba(28,64,126,.2); }
.hist-cinta-pista { display: flex; align-items: center; gap: 34px; width: max-content; animation: hCinta 48s linear infinite; }
.hist-cinta-pista span { font-family: var(--font-title); font-size: 22px; font-weight: 800; letter-spacing: -.02em; text-transform: uppercase; color: #fff; white-space: nowrap; }
.hist-cinta-pista img { width: 36px; height: auto; filter: drop-shadow(0 4px 4px rgba(5,20,55,.35)); }
@keyframes hCinta { to { transform: translateX(-50%); } }

/* Aparición al hacer scroll (solo si hay JavaScript) */
.js .reveal { opacity: 0; transform: translateY(34px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.8,.2,1); }
.js .reveal.is-visible { opacity: 1; transform: none; }

/* ---------------- RESPONSIVE ---------------- */
@media (max-width: 1240px) {
    .hd-1 { left: -22px; } .hd-2 { right: -20px; } .hd-3 { left: -18px; } .hd-4 { right: -20px; }
    .hs-a, .hs-c, .hs-e, .hc-a, .hc-c { left: 12px; } .hs-b, .hs-d, .hs-f, .hc-b { right: 12px; }
}
@media (max-width: 960px) {
    .hist-hero-inner { grid-template-columns: 1fr; min-height: 0; gap: 26px; padding: 44px 0 100px; }
    .hist-sello { width: 250px; margin: 6px 0 0; justify-self: start; }
    .hh-cono { left: auto; right: 8%; top: 118px; width: 74px; } .hh-choco { left: auto; right: 24%; bottom: 40px; } .hh-fru { left: auto; right: 4%; bottom: 36px; } .hh-menta { right: 3%; top: 34px; } .hh-pista { display: none; }
    .hist-capitulos { gap: 72px; }
    .hist-capitulos::before { left: 29px; transform: none; }
    .hist-cap { grid-template-columns: 58px minmax(0, 1fr); column-gap: 22px; row-gap: 28px; align-items: start; }
    .hist-nodo { grid-column: 1; grid-row: 1; }
    .hist-cap-1 .hist-card, .hist-cap-3 .hist-card { grid-column: 2; grid-row: 1; }
    .hist-cap-1 .hist-arco, .hist-cap-3 .hist-arco { grid-column: 2; grid-row: 2; }
    .hist-cap-3 .hist-card { grid-row: 1; }
    .hist-cap-2 { display: grid; grid-template-columns: 58px minmax(0, 1fr); column-gap: 22px; }
    .hist-cap-2 .hist-nodo { position: relative; left: auto; top: auto; transform: none; grid-column: 1; grid-row: 1; }
    .hist-cap-2 .hist-card { grid-column: 2; grid-row: 1; }
    .hist-card-azul { padding: 48px 34px 44px; }
    .hist-card-azul p { text-align: left; }
    .hist-arco { margin: 0 auto 0 0; }
    .hist-deco { display: none; }
}
@media (max-width: 600px) {
    .hist-hero-inner { width: calc(100% - 36px); padding: 34px 0 88px; }
    .hist-hero .historia-titulo { font-size: clamp(54px, 18vw, 84px); }
    .hist-sello { width: 200px; }
    .hh-cono { width: 58px; left: auto; right: 16%; top: 100px; } .hh-choco { display: none; } .hh-fru { width: 56px; left: auto; right: 4%; bottom: 50px; } .hh-menta { width: 50px; right: 3%; top: 120px; }
    .hs-1, .hs-3, .hs-6, .hc-2 { display: none; }
    .hist-goteo { height: 62px; }
    .hist-cuerpo { padding: 110px 0 74px; }
    .hist-capitulos { width: calc(100% - 28px); gap: 58px; }
    .hist-capitulos::before { left: 21px; }
    .hist-cap, .hist-cap-2 { grid-template-columns: 42px minmax(0, 1fr); column-gap: 14px; }
    .hist-nodo { width: 42px; height: 42px; font-size: 13px; box-shadow: 0 0 0 5px var(--cream, #FFFBF5), 0 0 0 7px rgba(40,84,156,.25), 0 8px 16px rgba(28,64,126,.3); }
    .hist-card { padding: 28px 22px; border-radius: 26px; }
    .hist-card p { font-size: 15.5px; line-height: 1.8; }
    .hist-card .primer-parrafo::first-letter { font-size: 66px; margin-right: 10px; }
    .hist-card-azul { padding: 40px 22px 36px; border-radius: 28px; }
    .hist-card-azul p { font-size: 16.5px; }
    .hist-comillas { font-size: 130px; left: 16px; }
    .hca-1 { width: 62px; right: -10px; bottom: -22px; } .hca-2 { display: none; }
    .hist-sticker { width: 78px; height: 78px; } .hist-sticker strong { font-size: 15px; } .hist-sticker small { font-size: 8.5px; }
    .sticker-rojo { right: -8px; } .sticker-azul { left: -8px; }
    .hist-arco { width: min(100%, 300px); }
    .hist-siguiente { margin-top: 62px; padding: 16px 26px; } .hist-siguiente strong { font-size: 17px; }
    .hist-cinta { margin: -16px -20px 0; padding: 13px 0; } .hist-cinta-pista span { font-size: 16px; } .hist-cinta-pista img { width: 28px; }
}
@media (prefers-reduced-motion: reduce) {
    .hh, .hd, .hca, .ar-cono, .ar-pote, .hist-sello-aro, .hist-cinta-pista { animation: none; }
    .js .reveal { opacity: 1; transform: none; transition: none; }
}
