// Section components for Zubeltzu Torre const { useState: useState2, useEffect: useEffect2, useRef: useRef2, useMemo: useMemo2 } = React; // Google-style profile avatars for reviews const REVIEW_AVATARS = ["#2d5a44", "#9c5a32", "#3a5566"]; function initialsOf(name) { return (name || "").split(/\s+/).filter(Boolean).slice(0, 2).map((w) => w[0]).join("").replace(/\./g, "").toUpperCase(); } // Pone en negrita la palabra "Zumaia" (con sufijo, p. ej. "Zumaiatik" en // euskera) dentro de un texto plano de i18n. function boldZumaia(text) { const parts = String(text || "").split(/(\bZumaia\w*)/); return parts.map((p, i) => /^Zumaia/.test(p) ? {p} : p); } /* ============================================================ HERO ============================================================ */ function Hero({ t, variant, mist, goTo, onBook }) { const [idx, setIdx] = useState2(0); const imgs = window.SITE.heroImages; useEffect2(() => { const id = setInterval(() => setIdx((i) => (i + 1) % imgs.length), 6000); return () => clearInterval(id); }, []); useEffect2(() => {imgs.forEach((src) => {const i = new Image();i.src = src;});}, []); return (
{imgs.map((src, i) =>
)}
{mist && }
{t.hero.eyebrow}
{t.hero.since}
{window.SITE.contact.googleScore}/5 · Google

{t.hero.title_a}
{t.hero.title_em}

{boldZumaia(t.hero.lede)}

★ {window.SITE.contact.googleScore} {t.hero.trust1}
16 {t.hero.trust2}
{t.hero.trust3}
{imgs.map((_, i) =>
{t.hero.scroll}
); } /* ============================================================ TICKER — small marquee under hero ============================================================ */ function Ticker({ t }) { const items = [...t.ticker, ...t.ticker]; return (
{items.map((s, i) => {s} )}
); } /* ============================================================ INTRO — "El Caserío" home block ============================================================ */ function Intro({ t, goTo }) { return (
{t.intro.eyebrow}

{t.intro.h2}

{t.intro.body}

{[t.intro.feat1, t.intro.feat2, t.intro.feat3].map((f, i) =>
{f.split("\n").map((l, j) => {l}{j === 0 &&
}
)}
)}
Exterior del caserío Interior del caserío
Desde 2008 · Itziar, Deba
); } /* ============================================================ HOST — Ainara, la anfitriona (va justo debajo de "El Caserío") ============================================================ */ function HostSection({ t }) { const h = t.host; if (!h) return null; return (
Vacas de leche en los prados del caserío El establo del caserío
{h.badge}
{h.eyebrow}

{h.h2_a} {h.h2_em}

{h.body1}

{h.body2}

{h.facts.map((f, i) =>
{f}
)}
); } /* ============================================================ HOME ALOJAMIENTO teaser — 3 cards ============================================================ */ function LodgingTeaser({ t, goTo, onBook }) { return (
{t.aloj.eyebrow}

{t.aloj.head_a}
{t.aloj.head_em}

{t.aloj.head_sub}

{t.aloj.cards.map((c, i) =>
document.getElementById("lodging")?.scrollIntoView({ behavior: "smooth" })} data-cursor="hover"> {c.title}
{c.num}
{c.title}
)}
); } /* ============================================================ ALOJAMIENTO page ============================================================ */ /* Iconos de los servicios (mismo orden que t.aloj.amenities en i18n): 0 habitaciones · 1 apartamentos · 2 personas · 3 desayuno · 4 wifi · 5 jardín · 6 perros */ const ALOJ_AMENITY_ICONS = [ /* cama */ , /* edificio / apartamento */ , /* personas */ , /* desayuno (taza) */ , /* wifi */ , /* jardín (hoja) */ , /* perro (huella) */ ]; /* Categoría de la galería que abre cada tarjeta (mismo orden que t.aloj.cards): 0 habitaciones · 1 apartamentos · 2 casa completa → estancias comunes */ const ALOJ_CARD_FILTERS = ["habitaciones", "apartamentos", "estancias"]; function Lodging({ t, goTo, onBook }) { return (
{t.aloj.eyebrow}

{t.aloj.page_title_a}
{t.aloj.page_title_em}

{t.aloj.page_intro}

Interior de Zubeltzu Torre
{t.aloj.cards.map((c, i) =>
goTo("galeria", ALOJ_CARD_FILTERS[i])} onKeyDown={(e) => { if (e.key === "Enter" || e.key === " ") { e.preventDefault(); goTo("galeria", ALOJ_CARD_FILTERS[i]); } }}>
{c.title}
{c.num}

{c.title}

{c.body}

{t.gallery.see_photos || "Ver fotos"} →
)}

{t.aloj.body_text}

{t.aloj.amenities.map((a, i) => {a} )}
); } /* ============================================================ ENTORNO page ============================================================ */ /* Kilómetros desde el caserío para cada actividad de t.env.acts (mismo orden en los 4 idiomas) */ const ENV_ACT_KMS = [6, 6, 2, 6, 6, 6, 6, 8, 10, 4, 6, 6, 5]; function Environment({ t, goTo, onBook }) { // Búsqueda de experiencias en los alrededores del caserío (Itziar · Deba · Gipuzkoa) const PLACE_QUERIES = [ "surf Zarautz escuela", "Flysch Zumaia geoparque", "asadores sidrerías Getaria Deba", "senderismo Izarraitz rutas", "pueblos marineros Getaria Mutriku Deba", "San Sebastián Bilbao Guggenheim"]; const MAPS_LINKS = [ "https://www.google.com/maps/search/?api=1&query=Zarautz+Gipuzkoa", "https://www.google.com/maps/search/?api=1&query=Flysch+Itzurun+Zumaia+Geoparque+UNESCO", "https://www.google.com/maps/search/?api=1&query=Getaria+Gipuzkoa+restaurantes", "https://www.google.com/maps/search/?api=1&query=Monte+Izarraitz+senderismo+Gipuzkoa", "https://www.google.com/maps/search/?api=1&query=Deba+pueblo+Gipuzkoa", "https://www.google.com/maps/search/?api=1&query=San+Sebastian+Donostia+Gipuzkoa"]; const ACT_QUERIES = [ "surf escuela playa", "senderismo rutas", "parapente vuelo", "alquiler bicicletas BTT", "hípica centro ecuestre", "sidrería restaurante", "Camino de Santiago del Norte", "pesca río parque natural"]; const searchNearby = (q) => { window.open( "https://www.google.com/maps/search/" + encodeURIComponent(q + " cerca de Itziar, Deba, Gipuzkoa"), "_blank", "noopener" ); }; return (
Costa vasca
{t.env.eyebrow}

{t.env.title_a}
{t.env.title_em}

{t.env.hero_sub}

{t.env.dist.map(([n, l], i) =>
{n} {l}
{i < t.env.dist.length - 1 && }
)}
{t.env.bidegorri && }
{t.env.natura_label}

{t.env.natura_h2_a}
{t.env.natura_h2_em}

{t.env.natura_p1}

{t.env.natura_p2}

    {t.env.natura_list.map((s, i) =>
  • ✓{s}
  • )}
Caserío Costa vasca
{t.env.acts_eyebrow}

{t.env.acts_h3_a} {t.env.acts_h3_em}

{t.env.acts_lede}

    {t.env.acts.map((a, i) => (
  • ))}
{t.env.farm && (
{t.env.farm.eyebrow}

{t.env.farm.title_a} {t.env.farm.title_em}

{t.env.farm.lede}

{t.env.farm.cats.map((c, i) => (

{c.title}

    {c.items.map((it, j) => (
  • ))}
))}
)}
); } /* ============================================================ ENV CTA — closing call-to-action (rendered after the page footer) ============================================================ */ function EnvCTA({ t, onBook }) { return (
{t.env.cta_eyebrow}

{t.env.cta_h2_a}
{t.env.cta_h2_em}

); } /* ============================================================ BIDEGORRI — carril bici Zubeltzu → Zumaia (7 km) ============================================================ */ /* Ciclista visto desde arriba (cenital), orientado hacia la derecha. Para los que van hacia la izquierda se voltea con scaleX(-1) en CSS. */ function BidegorriRiderFig() { return ( ); } function BidegorriSection({ b }) { const routeUrl = "https://www.google.com/maps/dir/?api=1&origin=43.26638,-2.30071&destination=43.2937,-2.2549&travelmode=bicycling"; // Ciclistas que cruzan el carril de vez en cuando (carril, sentido, velocidad y retardo distintos) const riders = [ { dir: "r", top: "20%", dur: "16s", delay: "0s" }, { dir: "l", top: "80%", dur: "18s", delay: "2.5s" }, { dir: "r", top: "78%", dur: "15s", delay: "5s" }, { dir: "l", top: "22%", dur: "19s", delay: "7.5s" }, { dir: "r", top: "79%", dur: "17s", delay: "10s" }, { dir: "l", top: "21%", dur: "16s", delay: "12.5s" } ]; return (
{/* El propio carril: línea central discontinua + ciclistas cenitales */}