/*
Theme Name: Italianos en el Mundo
Theme URI: https://www.italianosenelmundo.com
Author: Ignacio Bauchwitz SISTEMAS
Author URI: https://www.italianosenelmundo.com
Description: Portal para los italianos y sus descendientes en el mundo: noticias, directorio de entidades por país y servicios (ciudadanía, actas, traducciones, mudanza y estudio). Español como idioma principal con traducciones al italiano, inglés, alemán, francés y chino, traducción automática opcional con IA, formularios con aviso por email y WhatsApp, y zonas de banners.
Version: 1.3.1
Requires at least: 6.2
Requires PHP: 7.4
License: GPL-2.0-or-later
Text Domain: italianos-en-el-mundo
*/

/* ------------------------------------------------------------------
   Tokens
   ------------------------------------------------------------------ */
:root {
	--green: #00873E;
	--green-dark: #006B31;
	--red: #C8102E;
	--red-dark: #A50D26;
	--navy: #0E2A3F;
	--navy-deep: #071824;
	--gold: #E2A72E;
	--stone: #EEF1EE;
	--white: #FFFFFF;
	--ink: #0E2A3F;
	--muted: #4C6070;
	--line: #D3DBD6;

	--display: "Josefin Sans", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
	--text: "Literata", Georgia, "Noto Sans SC", "PingFang SC", "Microsoft YaHei", serif;

	--wrap: 1240px;
	--gutter: clamp(16px, 4vw, 40px);
	--radius: 6px;
	--section: clamp(48px, 7vw, 88px);
}

/* ------------------------------------------------------------------
   Base
   ------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
	margin: 0;
	background: var(--white);
	color: var(--ink);
	font-family: var(--text);
	font-size: 1.0625rem;
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
}
.lang-zh { --display: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif; --text: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif; }
img, svg, iframe { max-width: 100%; }
img { height: auto; display: block; }
a { color: var(--green-dark); text-underline-offset: .18em; }
a:hover { color: var(--red); }
h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.15; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--gold); color: var(--navy); padding: .6rem 1rem; font-family: var(--display); font-weight: 700; }
.skip:focus { left: 8px; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 800px; }
.hp { position: absolute; left: -9999px; }

/* Franja tricolor: firma visual del sitio */
.tricolor { display: flex; height: 5px; }
.tricolor span { flex: 1; }
.tricolor span:nth-child(1) { background: var(--green); }
.tricolor span:nth-child(2) { background: var(--white); }
.tricolor span:nth-child(3) { background: var(--red); }

/* ------------------------------------------------------------------
   Botones y enlaces
   ------------------------------------------------------------------ */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
	font-family: var(--display); font-weight: 700; font-size: 1rem; line-height: 1.1;
	padding: .95rem 1.4rem .8rem; border-radius: 4px; border: 2px solid transparent;
	text-decoration: none; cursor: pointer; transition: background-color .15s, color .15s, border-color .15s;
	white-space: nowrap;
}
.lang-zh .btn { padding: .85rem 1.4rem; }
.btn--green { background: var(--green); color: var(--white); }
.btn--green:hover { background: var(--green-dark); color: var(--white); }
.btn--red { background: var(--red); color: var(--white); }
.btn--red:hover { background: var(--red-dark); color: var(--white); }
.btn--navy { background: var(--navy); color: var(--white); }
.btn--navy:hover { background: var(--navy-deep); color: var(--white); }
.btn--white { background: var(--white); color: var(--red); }
.btn--white:hover { background: var(--navy); color: var(--white); }
.btn--ghost { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn--ghost:hover { background: var(--navy); color: var(--white); }
.btn[disabled] { opacity: .6; cursor: progress; }
.link { font-family: var(--display); font-weight: 700; color: var(--green-dark); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: .3em; }
.link:hover { color: var(--red); }
.kicker { display: inline-block; font-family: var(--display); font-weight: 700; font-size: .875rem; color: var(--red); text-decoration: none; margin-bottom: .35rem; }
.kicker:hover { color: var(--green-dark); }
.meta { font-family: var(--display); font-size: .875rem; color: var(--muted); }

/* ------------------------------------------------------------------
   Cabecera
   ------------------------------------------------------------------ */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--navy); color: var(--white); }
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 0; } }
.site-header__row { display: flex; align-items: center; gap: 1.5rem; min-height: 72px; }
.brand { display: inline-flex; align-items: center; gap: .7rem; color: inherit; text-decoration: none; flex-shrink: 0; }
.brand:hover { color: inherit; }
.brand__mark { flex-shrink: 0; }
.brand__name { font-family: var(--display); font-weight: 700; font-size: 1.2rem; line-height: 1; padding-top: .2em; letter-spacing: .01em; }
.custom-logo { max-height: 56px; width: auto; }

.nav { margin-left: auto; }
.nav .menu { list-style: none; margin: 0; padding: 0; display: flex; gap: .25rem; }
.nav .menu a {
	display: block; padding: .6rem .8rem .45rem; color: var(--white); text-decoration: none;
	font-family: var(--display); font-weight: 600; font-size: 1.02rem; border-bottom: 3px solid transparent;
}
.nav .menu a:hover, .nav .menu .current-menu-item > a, .nav .menu .current_page_item > a { border-bottom-color: var(--gold); color: var(--white); }
.nav .sub-menu { list-style: none; margin: 0; padding: .4rem 0; position: absolute; background: var(--navy-deep); min-width: 220px; display: none; }
.nav .menu li { position: relative; }
.nav .menu li:hover > .sub-menu, .nav .menu li:focus-within > .sub-menu { display: block; }

.site-header__tools { display: flex; align-items: center; gap: .4rem; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 0; border-radius: 4px; background: transparent; color: var(--white); cursor: pointer; }
.icon-btn:hover { background: rgba(255,255,255,.08); }
.nav-toggle { display: none; }
.nav-toggle__bars { display: grid; gap: 5px; width: 22px; }
.nav-toggle__bars span { display: block; height: 2px; background: currentColor; transition: transform .2s, opacity .2s; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.langs ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 2px; }
.langs a {
	display: block; min-width: 34px; padding: .42rem .45rem .3rem; text-align: center; border-radius: 3px;
	font-family: var(--display); font-weight: 700; font-size: .82rem; color: rgba(255,255,255,.78); text-decoration: none;
}
.langs a[data-lang="zh"] { font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif; padding-top: .36rem; }
.langs a:hover { color: var(--white); background: rgba(255,255,255,.1); }
.langs a[aria-current="true"] { background: var(--gold); color: var(--navy); }
.langs--mobile { display: none; }

.search-drawer { background: var(--navy-deep); padding: 1rem 0; }
.search-form { display: flex; gap: .5rem; width: 100%; }
.search-form input[type="search"] {
	flex: 1; min-width: 0; font: inherit; font-size: 1rem; padding: .85rem 1rem; border: 2px solid var(--line); border-radius: 4px; background: var(--white); color: var(--ink);
}
.search-form input[type="search"]:focus { border-color: var(--green); outline: none; }

/* ------------------------------------------------------------------
   Cartel de portada
   ------------------------------------------------------------------ */
.hero { position: relative; height: clamp(560px, 56.25vw, 88vh); overflow: hidden; background: var(--white); }
.hero__art-wrap, .hero__art, .hero__img { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero__img { object-fit: cover; }
.hero__copy {
	position: absolute; left: 50%; top: 8%; transform: translateX(-50%);
	width: min(30vw, 520px); text-align: center; color: var(--navy);
}
.hero__motto { font-family: var(--text); font-style: italic; color: var(--green-dark); font-size: clamp(1rem, 1.3vw, 1.25rem); margin-bottom: .6em; }
.hero__title {
	font-family: var(--display); font-weight: 700; color: var(--navy);
	font-size: clamp(2.4rem, 4.7vw, 5.4rem); line-height: .98; letter-spacing: -.01em; margin: 0 0 .35em;
	text-wrap: balance;
}
.lang-zh .hero__title { line-height: 1.15; letter-spacing: .02em; }
.hero__tag { font-size: clamp(.98rem, 1.15vw, 1.15rem); color: var(--muted); max-width: 30ch; margin: 0 auto; text-wrap: balance; }

/* Entrada única del cartel */
@media (prefers-reduced-motion: no-preference) {
	.hero__copy > * { animation: iem-rise .8s cubic-bezier(.2,.7,.2,1) both; }
	.hero__copy > :nth-child(2) { animation-delay: .12s; }
	.hero__copy > :nth-child(3) { animation-delay: .24s; }
	.hero__art g[transform^="translate(1300"] { animation: iem-fly 1.4s .3s cubic-bezier(.2,.7,.2,1) both; transform-box: fill-box; }
}
@keyframes iem-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes iem-fly { from { opacity: 0; translate: -80px 30px; } to { opacity: 1; translate: 0 0; } }

.quickbar { background: var(--stone); padding: 1.25rem 0; border-bottom: 1px solid var(--line); }
.quickbar__row { display: flex; gap: 1rem; align-items: center; }
.quickbar .search-form { flex: 1; }
.quickbar__links { display: flex; gap: .5rem; }

/* ------------------------------------------------------------------
   Secciones
   ------------------------------------------------------------------ */
.section { padding: var(--section) 0; }
.section--tight { padding-top: calc(var(--section) * .6); }
.section__head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 2rem; flex-wrap: wrap; }
.section__head--stack { display: block; max-width: 760px; }
.section__title { font-family: var(--display); font-weight: 700; font-size: clamp(1.75rem, 3vw, 2.5rem); color: var(--navy); margin: 0; padding-top: .1em; }
.section__intro { color: var(--muted); font-size: 1.125rem; margin: .6rem 0 0; }
.section__more { margin: 2.5rem 0 0; }

.chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 2rem; }
.chip {
	display: inline-block; padding: .5rem .9rem .38rem; border: 1.5px solid var(--line); border-radius: 999px;
	font-family: var(--display); font-weight: 600; font-size: .92rem; color: var(--navy); text-decoration: none; background: var(--white);
}
.chip:hover, .chip[aria-current="page"] { border-color: var(--navy); background: var(--navy); color: var(--white); }

/* ------------------------------------------------------------------
   Noticias
   ------------------------------------------------------------------ */
.news-layout { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: clamp(1.5rem, 3vw, 3rem); }
.news-layout__list { display: flex; flex-direction: column; }
.news-layout__list .card-news { padding: 1.1rem 0; border-top: 1px solid var(--line); }
.news-layout__list .card-news:first-child { border-top: 0; padding-top: 0; }

.card-news { position: relative; }
.card-news__media { display: block; text-decoration: none; overflow: hidden; border-radius: var(--radius); aspect-ratio: 16 / 10; background: var(--navy); margin-bottom: 1rem; }
.card-news__media img { width: 100%; height: 100%; object-fit: cover; }
.card-news__poster {
	display: flex; align-items: flex-end; width: 100%; height: 100%; padding: 1.1rem 1.2rem;
	background:
		linear-gradient(90deg, var(--green) 0 33.33%, var(--white) 33.33% 66.66%, var(--red) 66.66%) bottom / 100% 6px no-repeat,
		radial-gradient(circle at 92% 118%, var(--gold) 0 26%, transparent 26.4%),
		var(--navy);
	color: var(--white); font-family: var(--display); font-weight: 700; font-size: clamp(1.1rem, 2vw, 1.6rem); line-height: 1.05;
}
.card-news__poster span { max-width: 62%; padding-bottom: .4rem; }
.card-news__title { font-family: var(--text); font-weight: 600; font-size: 1.28rem; line-height: 1.25; margin: 0 0 .5rem; }
.card-news__title a { color: var(--ink); text-decoration: none; }
.card-news__title a:hover { color: var(--red); }
.card-news__excerpt { color: var(--muted); font-size: 1rem; margin-bottom: .6rem; }

.card-news--lead .card-news__media { aspect-ratio: 16 / 9; }
.card-news--lead .card-news__title { font-size: clamp(1.6rem, 2.6vw, 2.3rem); line-height: 1.15; }
.card-news--lead .card-news__excerpt { font-size: 1.1rem; }
.card-news--lead .card-news__poster { font-size: clamp(1.6rem, 3vw, 2.6rem); }

.card-news--row { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 1rem; align-items: start; }
.card-news--row .card-news__media { margin: 0; aspect-ratio: 1; }
.card-news--row .card-news__poster span { display: none; }
.card-news--row .card-news__title { font-size: 1.08rem; margin-bottom: .3rem; }
.card-news--row .kicker { font-size: .8rem; margin-bottom: .15rem; }

.grid-news { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2.5rem 2rem; }
.grid-news--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* ------------------------------------------------------------------
   Servicios
   ------------------------------------------------------------------ */
.section--services { background: var(--white); }
.grid-services { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.card-service { position: relative; padding: 2rem 1.75rem 1.75rem; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--white); transition: background-color .15s; }
.card-service:hover { background: var(--stone); }
.card-service__icon { display: inline-flex; align-items: center; justify-content: center; width: 56px; height: 56px; border-radius: 50%; background: var(--stone); color: var(--red); margin-bottom: 1.1rem; }
.card-service:hover .card-service__icon { background: var(--white); }
.card-service__icon--lg { width: 84px; height: 84px; flex-shrink: 0; background: var(--white); }
.card-service__icon--lg .icon { width: 40px; height: 40px; }
.card-service__title { font-family: var(--display); font-weight: 700; font-size: 1.3rem; margin-bottom: .5rem; padding-top: .1em; }
.card-service__title a { color: var(--navy); text-decoration: none; }
.card-service__title a::after { content: ""; position: absolute; inset: 0; }
.card-service p { color: var(--muted); font-size: 1rem; margin: 0; }
.card-service .card-service__price, .card-service__price { margin-top: .9rem; font-family: var(--display); font-weight: 700; color: var(--green-dark); }

/* ------------------------------------------------------------------
   Del barco al avión
   ------------------------------------------------------------------ */
.roots { background: var(--navy); color: var(--white); position: relative; overflow: hidden; }
.roots::after {
	content: ""; position: absolute; left: -150px; bottom: -290px; width: 420px; height: 420px; border-radius: 50%;
	background: var(--gold); opacity: .95; pointer-events: none;
}
.roots__inner { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2.2fr); gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.roots .section__title { color: var(--white); }
.roots__head p { color: rgba(255,255,255,.78); margin-top: .8rem; }
.timeline { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; position: relative; }
.timeline::before { content: ""; position: absolute; left: 0; right: 0; top: 1.15rem; height: 2px; background: repeating-linear-gradient(90deg, rgba(255,255,255,.55) 0 6px, transparent 6px 14px); }
.timeline__item { position: relative; padding-top: 3.2rem; }
.timeline__item::before { content: ""; position: absolute; top: .6rem; left: 0; width: 18px; height: 18px; border-radius: 50%; background: var(--navy); border: 3px solid var(--gold); }
.timeline__item:nth-child(1)::before { border-color: var(--green); background: var(--green); }
.timeline__item:nth-child(2)::before { border-color: var(--white); background: var(--white); }
.timeline__item:nth-child(3)::before { border-color: var(--red); background: var(--red); }
.timeline__year { display: block; font-family: var(--display); font-weight: 700; font-size: clamp(1.5rem, 2.4vw, 2rem); color: var(--gold); margin-bottom: .4rem; }
.timeline__item p { color: rgba(255,255,255,.88); margin: 0; font-size: 1rem; }

/* ------------------------------------------------------------------
   Directorio
   ------------------------------------------------------------------ */
.section--directory { background: var(--stone); }
.dir-filter { display: flex; gap: .75rem; align-items: flex-end; flex-wrap: wrap; background: var(--white); padding: 1rem; border-radius: var(--radius); border: 1px solid var(--line); margin-bottom: 1.5rem; }
.dir-filter .field { margin: 0; min-width: 180px; }
.dir-filter .field--grow { flex: 1 1 260px; }
.countries { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 2rem; }
.country {
	display: inline-flex; align-items: center; gap: .45rem; padding: .45rem .85rem .4rem; border-radius: 999px; background: var(--white);
	border: 1.5px solid var(--line); font-family: var(--display); font-weight: 600; font-size: .95rem; color: var(--navy); text-decoration: none;
}
.country:hover { border-color: var(--green); color: var(--green-dark); }
.country__n { font-size: .78rem; color: var(--muted); }
.flag { font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif; font-size: 1.15em; line-height: 1; }

.grid-entities { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }
.card-entity { position: relative; background: var(--white); border-radius: var(--radius); padding: 1.5rem 1.5rem 1.3rem; border: 1px solid var(--line); border-top: 4px solid var(--green); display: flex; flex-direction: column; }
.card-entity:nth-child(3n+2) { border-top-color: var(--navy); }
.card-entity:nth-child(3n) { border-top-color: var(--red); }
.card-entity__place { display: flex; align-items: center; gap: .45rem; font-family: var(--display); font-weight: 600; font-size: .9rem; color: var(--muted); margin-bottom: .5rem; }
.card-entity__title { font-family: var(--text); font-weight: 600; font-size: 1.25rem; line-height: 1.25; margin: 0 0 .25rem; }
.card-entity__title a { color: var(--ink); text-decoration: none; }
.card-entity__title a::after { content: ""; position: absolute; inset: 0; }
.card-entity__title a:hover { color: var(--red); }
.card-entity__type { font-family: var(--display); font-weight: 700; font-size: .88rem; color: var(--red); margin-bottom: .7rem; }
.card-entity__excerpt { color: var(--muted); font-size: .98rem; flex: 1; }
.card-entity .link { position: relative; align-self: flex-start; font-size: .95rem; }

/* Ficha */
.crumbs { font-family: var(--display); font-weight: 600; font-size: .92rem; margin-bottom: .6rem; color: var(--muted); }
.crumbs a { color: var(--green-dark); text-decoration: none; }
.entity { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr); gap: clamp(1.5rem, 4vw, 3.5rem); padding-top: 2.5rem; padding-bottom: var(--section); }
.entity__map { margin-top: 2rem; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); aspect-ratio: 16 / 9; }
.entity__map iframe { width: 100%; height: 100%; border: 0; }
.entity__card { align-self: start; position: sticky; top: 100px; }
.entity__data { margin: 0 0 1.25rem; background: var(--stone); border-radius: var(--radius); padding: 1.25rem 1.4rem; }
.entity__data div + div { border-top: 1px solid var(--line); margin-top: .8rem; padding-top: .8rem; }
.entity__data dt { font-family: var(--display); font-weight: 700; font-size: .85rem; color: var(--muted); }
.entity__data dd { margin: 0; overflow-wrap: anywhere; }
.entity__actions { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1.5rem; }

/* ------------------------------------------------------------------
   Sumate
   ------------------------------------------------------------------ */
.join { background: var(--red); color: var(--white); padding: clamp(40px, 5vw, 64px) 0; }
.join__inner { display: flex; align-items: center; justify-content: space-between; gap: 2rem; flex-wrap: wrap; }
.join__title { font-family: var(--display); font-weight: 700; font-size: clamp(1.5rem, 2.6vw, 2.2rem); margin-bottom: .35rem; padding-top: .1em; }
.join p { margin: 0; color: rgba(255,255,255,.9); font-size: 1.1rem; max-width: 52ch; }

/* ------------------------------------------------------------------
   Publicidad
   ------------------------------------------------------------------ */
.ad { position: relative; margin: 2rem auto; }
.ad--wide { max-width: 1280px; aspect-ratio: 1280 / 200; }
.ad--square { width: 300px; max-width: 100%; aspect-ratio: 1; margin: 0 0 2rem; }
.ad img { width: 100%; height: 100%; object-fit: cover; border-radius: 4px; }
.ad__tag { position: absolute; top: 6px; right: 8px; font-family: var(--display); font-size: .7rem; color: var(--white); background: rgba(7,24,36,.55); padding: .15rem .45rem; border-radius: 3px; z-index: 1; }
.ad--wide.ad--empty { aspect-ratio: auto; height: 112px; }
.ad--empty a {
	display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .25rem; height: 100%; text-align: center; padding: 1rem;
	border: 2px dashed var(--line); border-radius: 4px; color: var(--muted); text-decoration: none; font-family: var(--display); background: var(--white);
}
.ad--empty strong { font-size: clamp(1rem, 2vw, 1.4rem); color: var(--navy); }
.ad--empty span { font-size: .92rem; }
.ad--empty a:hover { border-color: var(--green); }
.ad--empty a:hover strong { color: var(--green-dark); }

/* ------------------------------------------------------------------
   Páginas internas
   ------------------------------------------------------------------ */
.page-head { background: var(--stone); padding: clamp(32px, 5vw, 56px) 0 clamp(28px, 4vw, 44px); border-bottom: 1px solid var(--line); }
.page-head__title { font-family: var(--display); font-weight: 700; font-size: clamp(2rem, 4.2vw, 3.2rem); color: var(--navy); margin: 0; padding-top: .1em; text-wrap: balance; }
.page-head__intro { color: var(--muted); font-size: 1.15rem; margin: .7rem 0 0; max-width: 62ch; }
.page-head__intro a { color: var(--red); font-family: var(--display); font-weight: 700; text-decoration: none; }
.page-head .chips { margin-top: 1.5rem; }
.page-head .search-form { margin-top: 1.5rem; max-width: 720px; }
.page-head--dir .dir-filter { margin: 1.75rem 0 0; }
.page-head__service { display: flex; gap: 1.75rem; align-items: flex-start; }

.layout-sidebar { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: clamp(2rem, 4vw, 4rem); padding-top: 2.5rem; padding-bottom: var(--section); }
.layout-sidebar__aside { align-self: start; }
.side-box { margin-bottom: 2rem; }
.side-box__title { font-family: var(--display); font-weight: 700; font-size: 1.15rem; color: var(--navy); padding: .1em 0 .6rem; border-bottom: 3px solid var(--navy); margin-bottom: .9rem; }
.side-list { list-style: none; margin: 0; padding: 0; }
.side-list li { padding: .7rem 0; border-bottom: 1px solid var(--line); }
.side-list li a { display: block; color: var(--ink); text-decoration: none; font-weight: 600; line-height: 1.3; font-size: 1rem; }
.side-list li a:hover { color: var(--red); }
.side-list time { display: block; font-family: var(--display); font-size: .82rem; color: var(--muted); margin-top: .2rem; }
.side-list--plain li a { display: flex; gap: .7rem; align-items: center; font-family: var(--display); font-weight: 600; font-size: .98rem; }
.side-list--plain .icon { color: var(--red); width: 22px; height: 22px; flex-shrink: 0; }

.article__head { margin-bottom: 1.5rem; }
.article__title { font-family: var(--text); font-weight: 600; font-size: clamp(2rem, 4vw, 3rem); line-height: 1.12; letter-spacing: -.01em; margin: 0 0 .9rem; text-wrap: balance; }
.article__dek { font-size: 1.25rem; color: var(--muted); line-height: 1.5; margin-bottom: 1rem; }
.article__figure { margin: 0 0 2rem; }
.article__figure img { width: 100%; border-radius: var(--radius); }
.article__figure figcaption { font-family: var(--display); font-size: .88rem; color: var(--muted); margin-top: .5rem; }

.prose { font-size: 1.125rem; line-height: 1.78; max-width: 72ch; }
.lang-zh .prose { line-height: 1.95; }
.prose h2 { font-family: var(--display); font-weight: 700; font-size: 1.6rem; margin: 2em 0 .6em; color: var(--navy); }
.prose h3 { font-family: var(--text); font-weight: 600; font-size: 1.3rem; margin: 1.8em 0 .5em; }
.prose blockquote { margin: 2em 0; padding: .2em 0 .2em 1.4em; border-left: 4px solid var(--green); font-style: italic; color: var(--navy); font-size: 1.2rem; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: .4em; }
.prose img { border-radius: var(--radius); }
.prose a { color: var(--green-dark); }
.page-body { padding-top: 2.5rem; padding-bottom: var(--section); }
.page-body--form .prose { max-width: 820px; }

.notice-tr { font-family: var(--display); font-size: .95rem; background: #FFF6E0; border-left: 4px solid var(--gold); padding: .8rem 1rem .7rem; border-radius: 0 4px 4px 0; margin-bottom: 1.5rem; color: var(--navy); }

.share { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.share__label { font-family: var(--display); font-weight: 700; margin-right: .5rem; }
.share__btn { font-family: var(--display); font-weight: 600; font-size: .92rem; padding: .5rem .85rem .4rem; border-radius: 999px; border: 1.5px solid var(--line); color: var(--navy); text-decoration: none; }
.share__btn:hover { border-color: var(--navy); background: var(--navy); color: var(--white); }

.section--related { background: var(--stone); }
.section--related .grid-services { background: var(--white); }

.results { list-style: none; margin: 0; padding: 0; }
.result { padding: 1.4rem 0; border-bottom: 1px solid var(--line); }
.result__title { font-family: var(--text); font-weight: 600; font-size: 1.35rem; margin: 0 0 .4rem; }
.result__title a { color: var(--ink); text-decoration: none; }
.result__title a:hover { color: var(--red); }
.result p { color: var(--muted); margin: 0; }
.empty { font-size: 1.15rem; color: var(--muted); padding: 2rem 0; }

.notfound { text-align: center; }
.notfound__code { font-family: var(--display); font-weight: 700; font-size: clamp(6rem, 18vw, 12rem); line-height: 1; margin: 0; background: linear-gradient(90deg, var(--green) 0 33.3%, var(--navy) 33.3% 66.6%, var(--red) 66.6%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.notfound .search-form { margin: 1.5rem auto; max-width: 560px; }

.pagination { margin-top: 3rem; }
.pagination ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.pagination a, .pagination span { display: block; min-width: 44px; padding: .65rem .9rem .5rem; text-align: center; border-radius: 4px; border: 1.5px solid var(--line); font-family: var(--display); font-weight: 700; color: var(--navy); text-decoration: none; }
.pagination .current { background: var(--navy); border-color: var(--navy); color: var(--white); }
.pagination a:hover { border-color: var(--navy); }

/* ------------------------------------------------------------------
   Formularios
   ------------------------------------------------------------------ */
.form { display: block; }
.form__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1rem; }
.field { margin: 0 0 1rem; display: flex; flex-direction: column; gap: .35rem; }
.field label { font-family: var(--display); font-weight: 700; font-size: .92rem; color: var(--navy); }
.field .req { color: var(--red); }
.field input, .field select, .field textarea, .dir-filter input, .dir-filter select {
	font: inherit; font-size: 1rem; width: 100%; padding: .8rem .9rem; border: 1.5px solid var(--line); border-radius: 4px; background: var(--white); color: var(--ink);
}
.field select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%230E2A3F' stroke-width='2'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .9rem center; padding-right: 2.4rem; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--green); outline: 2px solid rgba(0,135,62,.2); outline-offset: 0; }
.field textarea { resize: vertical; min-height: 130px; }
.field input:user-invalid, .field textarea:user-invalid, .field select:user-invalid { border-color: var(--red); }
.form__foot { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; margin-top: .5rem; }
.form__msg { margin: 1rem 0 0; font-family: var(--display); font-weight: 600; min-height: 1.5em; }
.form__msg.is-ok { color: var(--green-dark); }
.form__msg.is-err { color: var(--red); }
.form__msg .btn { margin-top: .8rem; }

.contact-band { background: var(--stone); }
.contact-band__inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: clamp(2rem, 5vw, 4rem); }
.contact-band header p { color: var(--muted); margin-top: .8rem; }
.service { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(320px, 1fr); gap: clamp(2rem, 5vw, 4rem); padding-top: 2.5rem; padding-bottom: var(--section); }
.service__form { background: var(--stone); border-radius: var(--radius); padding: 1.6rem; align-self: start; border-top: 5px solid var(--green); }
.service__form .form__grid { grid-template-columns: 1fr; }

/* ------------------------------------------------------------------
   Pie
   ------------------------------------------------------------------ */
.site-footer { background: var(--navy-deep); color: rgba(255,255,255,.78); font-size: .98rem; }
.site-footer__grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 2.5rem; padding-top: 3.5rem; padding-bottom: 2.5rem; }
.site-footer .brand { color: var(--white); margin-bottom: 1rem; }
.site-footer__brand p { max-width: 36ch; }
.site-footer .motto { font-style: italic; color: var(--gold); }
.site-footer__title { font-family: var(--display); font-weight: 700; font-size: 1rem; color: var(--white); margin: 0 0 .8rem; padding-top: .1em; }
.site-footer__title + .langs, .site-footer__list + .site-footer__title { margin-top: 1.6rem; }
.site-footer__list { list-style: none; margin: 0; padding: 0; }
.site-footer__list li { margin-bottom: .45rem; }
.site-footer a { color: rgba(255,255,255,.85); text-decoration: none; }
.site-footer a:hover { color: var(--gold); }
.socials { list-style: none; margin: 1rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.socials a { display: block; padding: .4rem .8rem .3rem; border: 1px solid rgba(255,255,255,.25); border-radius: 999px; font-family: var(--display); font-size: .9rem; }
.langs--footer ul { flex-wrap: wrap; }
.site-footer__legal { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding-top: 1.4rem; padding-bottom: 1.6rem; border-top: 1px solid rgba(255,255,255,.12); font-size: .88rem; color: rgba(255,255,255,.6); }
.site-footer__legal p { margin: 0; }

.wa-float { position: fixed; right: 18px; bottom: 18px; z-index: 40; width: 58px; height: 58px; border-radius: 50%; background: #25D366; color: var(--white); display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 18px rgba(7,24,36,.28); }
.wa-float:hover { color: var(--white); background: #1EBE5A; }

.lang-hint { position: fixed; left: 18px; bottom: 18px; z-index: 45; max-width: min(380px, calc(100vw - 100px)); background: var(--navy); color: var(--white); border-radius: var(--radius); padding: 1rem 1.1rem; box-shadow: 0 10px 30px rgba(7,24,36,.3); font-family: var(--display); }
.lang-hint p { margin: 0 0 .7rem; font-weight: 600; }
.lang-hint .btn { padding: .6rem 1rem .5rem; font-size: .92rem; }
.lang-hint__no { background: none; border: 0; color: rgba(255,255,255,.8); font: inherit; cursor: pointer; margin-left: .6rem; text-decoration: underline; }

/* ------------------------------------------------------------------
   Responsive
   ------------------------------------------------------------------ */
@media (max-width: 1100px) {
	.nav .menu a { padding-left: .55rem; padding-right: .55rem; font-size: .96rem; }
	.site-footer__grid { grid-template-columns: 1fr 1fr; }
	.roots__inner { grid-template-columns: 1fr; }
	.roots::after { display: none; }
}
@media (max-width: 980px) {
	.nav-toggle { display: inline-flex; }
	.langs--desktop { display: none; }
	.nav { position: fixed; inset: 77px 0 auto 0; background: var(--navy); padding: .5rem var(--gutter) 1.5rem; display: none; max-height: calc(100vh - 77px); overflow-y: auto; border-top: 1px solid rgba(255,255,255,.1); }
	.nav.is-open { display: block; }
	.admin-bar .nav { inset-block-start: 123px; }
	.nav .menu { flex-direction: column; }
	.nav .menu a { padding: .9rem 0 .75rem; border-bottom: 1px solid rgba(255,255,255,.1); font-size: 1.1rem; }
	.nav .sub-menu { position: static; display: block; background: none; padding-left: 1rem; }
	.langs--mobile { display: block; margin-top: 1.2rem; }
	.langs--mobile ul { flex-wrap: wrap; gap: .4rem; }
	.langs--mobile a { padding: .6rem .8rem .5rem; border: 1px solid rgba(255,255,255,.2); }
	.news-layout { grid-template-columns: 1fr; }
	.grid-services, .grid-entities, .grid-news--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.layout-sidebar, .entity, .service, .contact-band__inner { grid-template-columns: 1fr; }
	.entity__card { position: static; }
	.layout-sidebar__aside { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 0 2rem; }
	.quickbar__row { flex-direction: column; align-items: stretch; }
	.quickbar__links .btn { flex: 1; }
}
@media (max-width: 760px) {
	.hero { height: auto; display: flex; flex-direction: column-reverse; }
	.hero__art-wrap { position: relative; aspect-ratio: 16 / 9; height: auto; }
	.hero__copy { position: static; transform: none; width: auto; padding: 2rem var(--gutter) 1.6rem; }
	.hero__title { font-size: clamp(2.3rem, 10vw, 3.2rem); }
	.hero__tag { max-width: 36ch; }
	.timeline { grid-template-columns: 1fr; gap: 1.5rem; }
	.timeline::before { left: 8px; right: auto; top: 0; bottom: 0; width: 2px; height: auto; background: repeating-linear-gradient(180deg, rgba(255,255,255,.55) 0 6px, transparent 6px 14px); }
	.timeline__item { padding: 0 0 0 2.4rem; }
	.timeline__item::before { top: .45rem; }
}
@media (max-width: 640px) {
	body { font-size: 1rem; }
	.brand__name { font-size: 1.02rem; }
	.brand__mark { width: 36px; height: 36px; }
	.site-header__row { gap: .75rem; min-height: 64px; }
	.nav { inset-block-start: 69px; max-height: calc(100vh - 69px); }
	.grid-services, .grid-entities, .grid-news, .grid-news--3, .form__grid { grid-template-columns: 1fr; }
	.quickbar__links { flex-direction: column; }
	.search-form { flex-direction: column; }
	.search-form .btn { width: 100%; }
	.site-footer__grid { grid-template-columns: 1fr; gap: 2rem; }
	.page-head__service { flex-direction: column; gap: 1rem; }
	.dir-filter { flex-direction: column; align-items: stretch; }
	.dir-filter .field { min-width: 0; }
	.ad--wide { aspect-ratio: 1280 / 260; }
	.join__inner .btn { width: 100%; white-space: normal; }
}
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ------------------------------------------------------------------
   Portada realista: puerto, bandera flameando, ayer y hoy
   ------------------------------------------------------------------ */
.hero-photo { position: relative; overflow: hidden; color: var(--white); background: var(--navy-deep); isolation: isolate; }
.hero-photo__bg { position: absolute; inset: 0; background-size: cover; background-position: center 60%; z-index: -2; transform: scale(1.04); }
.hero-photo::before {
	content: ""; position: absolute; inset: 0; z-index: -1;
	background:
		linear-gradient(180deg, rgba(7,24,36,.55) 0%, rgba(7,24,36,.35) 40%, rgba(7,24,36,.88) 100%),
		radial-gradient(ellipse at 50% 35%, rgba(7,24,36,.05), rgba(7,24,36,.55) 75%);
}
.hero-photo__grid {
	display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr) minmax(0, 1fr);
	gap: clamp(1.5rem, 3vw, 3.5rem); align-items: center;
	min-height: clamp(600px, 52vw, 820px); padding-top: clamp(40px, 5vw, 72px); padding-bottom: clamp(56px, 6vw, 88px);
}
.hero-photo__year {
	display: block; font-family: var(--display); font-weight: 700; font-size: clamp(1.3rem, 2vw, 1.9rem);
	color: var(--gold); margin-bottom: .6rem; letter-spacing: .02em; text-shadow: 0 2px 10px rgba(0,0,0,.5);
}
.hero-photo__then { align-self: end; }
.prints { position: relative; aspect-ratio: 4 / 4.6; }
.print { position: absolute; display: block; margin: 0; background: #F3EFE6; padding: 6px; box-shadow: 0 22px 44px rgba(0,0,0,.55); }
.print img, img.print { object-fit: cover; }
.print--back { width: 58%; aspect-ratio: 837 / 1024; top: 0; left: 0; transform: rotate(-6deg); }
.print--mid { width: 74%; aspect-ratio: 1000 / 730; top: 22%; right: -2%; transform: rotate(5deg); }
.print--front { width: 92%; left: 2%; bottom: 0; padding-bottom: 30px; transform: rotate(-1.5deg); }
.print--front img { display: block; width: 100%; aspect-ratio: 1000 / 717; filter: sepia(.25) contrast(1.05); }
.print--back, .print--front img { filter: sepia(.3) contrast(1.05); }
.print--front figcaption { position: absolute; left: 10px; right: 10px; bottom: 5px; font-family: var(--text); font-style: italic; font-size: .78rem; color: #3b3b3b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hero-photo__now { position: relative; align-self: end; display: grid; grid-template-columns: 1fr 1fr; gap: .9rem; }
.hero-photo__now .hero-photo__year { grid-column: 1 / -1; text-align: right; }
.hero-photo__p { margin: 0; }
.hero-photo__p img { width: 100%; aspect-ratio: 3 / 4.4; object-fit: cover; border-radius: 3px; box-shadow: 0 24px 50px rgba(0,0,0,.55); }
.hero-photo__p--b { transform: translateY(2.2rem); }
.hero-photo__center { text-align: center; align-self: center; }
.hero-photo__motto { font-family: var(--text); font-style: italic; font-size: clamp(1rem, 1.3vw, 1.25rem); color: #F3EFE6; margin: 1.2rem 0 .4rem; text-shadow: 0 2px 8px rgba(0,0,0,.6); }
.hero-photo__title {
	font-family: var(--display); font-weight: 700; font-size: clamp(2.6rem, 5vw, 5.4rem); line-height: .98; letter-spacing: -.01em;
	color: var(--white); margin: 0 0 .4em; text-shadow: 0 4px 24px rgba(0,0,0,.55); text-wrap: balance;
}
.lang-zh .hero-photo__title { line-height: 1.15; }
.hero-photo__tag { font-size: clamp(1rem, 1.2vw, 1.18rem); color: rgba(255,255,255,.9); max-width: 34ch; margin: 0 auto; text-shadow: 0 2px 10px rgba(0,0,0,.6); text-wrap: balance; }
.hero-photo__credits { position: absolute; right: 12px; bottom: 8px; margin: 0; font-family: var(--display); font-size: .68rem; color: rgba(255,255,255,.6); max-width: 70%; text-align: right; }

/* Bandera */
.waving-flag { position: relative; display: inline-block; width: min(100%, 360px); padding-left: 14px; filter: drop-shadow(0 18px 24px rgba(0,0,0,.45)); }
.waving-flag__pole {
	position: absolute; left: 0; top: -10px; bottom: -80px; width: 9px; border-radius: 5px;
	background: linear-gradient(90deg, #8a8f94 0%, #f4f6f7 35%, #b9bec2 60%, #6d7277 100%);
}
.waving-flag__pole::before { content: ""; position: absolute; left: 50%; top: -12px; width: 18px; height: 18px; transform: translateX(-50%); border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff3c4, var(--gold) 45%, #8c6510 100%); }
.waving-flag__cloth { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; }

/* Consulados */
.consul-index { display: flex; flex-wrap: wrap; gap: .4rem; margin: 1.5rem 0 2.5rem; }
.consul-index a { display: inline-flex; align-items: center; gap: .35rem; padding: .4rem .75rem .32rem; border: 1.5px solid var(--line); border-radius: 999px; font-family: var(--display); font-weight: 600; font-size: .9rem; color: var(--navy); text-decoration: none; }
.consul-index a:hover { border-color: var(--green); color: var(--green-dark); }
.consul-country { padding-top: 1.2rem; margin-bottom: 1.5rem; scroll-margin-top: 90px; }
.consul-country h2 { font-family: var(--display); font-weight: 700; font-size: 1.5rem; color: var(--navy); padding-bottom: .5rem; border-bottom: 3px solid var(--navy); margin-bottom: .2rem; }
.consul-list, .prose .consul-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 2rem; }
.consul { padding: 1rem 0; border-bottom: 1px solid var(--line); }
.consul h3 { font-family: var(--text); font-size: 1.08rem; font-weight: 600; margin: 0 0 .3rem; }
.consul h3 a { color: var(--ink); text-decoration: none; }
.consul h3 a:hover { color: var(--red); }
.consul__addr { color: var(--muted); font-size: .95rem; margin: 0 0 .35rem; }
.consul__links { display: flex; flex-wrap: wrap; gap: .3rem 1rem; margin: 0; font-family: var(--display); font-size: .9rem; }
.consul__links a { color: var(--green-dark); text-decoration: none; overflow-wrap: anywhere; }
.consul__links a:hover { color: var(--red); text-decoration: underline; }
.prose .consul-country h2 { margin-top: 0; }
p.source, .prose p.source { font-family: var(--display); font-size: .9rem; color: var(--muted); border-top: 1px solid var(--line); padding-top: .8rem; margin-top: 2rem; }
.page-body--wide .prose { max-width: none; }

@media (max-width: 1100px) {
	.hero-photo__grid { grid-template-columns: minmax(0, .8fr) minmax(0, 1.3fr) minmax(0, .8fr); }
}
@media (max-width: 900px) {
	.hero-photo__grid { grid-template-columns: 1fr 1fr; min-height: 0; }
	.hero-photo__center { grid-column: 1 / -1; order: -1; padding-top: 1rem; }
	.hero-photo__then, .hero-photo__now { align-self: start; }
	.hero-photo__p--b { transform: translateY(1.2rem); }
	.consul-list { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
	.hero-photo__grid { gap: 1rem; padding-bottom: 64px; }
	.print { padding: 4px; }
	.print--front { padding-bottom: 4px; }
	.print--front figcaption { display: none; }
	.hero-photo__now { gap: .5rem; }
	.hero-photo__year { font-size: 1.1rem; }
	.hero-photo__credits { left: 12px; max-width: none; text-align: left; }
	.waving-flag { width: min(78%, 300px); }
}
.langs a { white-space: nowrap; }
.waving-flag__pole { bottom: -26px; }
@media (max-width: 1280px) and (min-width: 981px) {
	.site-header__row { gap: 1rem; }
	.nav .menu a { padding-left: .45rem; padding-right: .45rem; font-size: .95rem; }
	.brand__name { font-size: 1.05rem; }
}
.consul-index a { white-space: nowrap; line-height: 1.2; }
.prose .consul-index { line-height: 1.2; }

/* Memoria de la gran emigración */
.roots:has(.memory)::after { display: none; }
.memory { position: relative; z-index: 1; margin-top: clamp(2.5rem, 5vw, 4rem); padding-top: 2rem; border-top: 1px solid rgba(255,255,255,.15); }
.memory__title { font-family: var(--display); font-weight: 700; font-size: clamp(1.3rem, 2vw, 1.7rem); color: var(--white); margin: 0 0 1.5rem; }
.memory__grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.6rem 1.25rem; }
.memory__item--4, .memory__item--7, .memory__item--5, .memory__item--2, .memory__item--3 { grid-column: span 2; }
.memory__btn { display: block; width: 100%; padding: 6px 6px 6px; border: 0; background: #F3EFE6; cursor: zoom-in; box-shadow: 0 14px 30px rgba(0,0,0,.4); transition: transform .2s; }
.memory__item:nth-child(odd) .memory__btn { transform: rotate(-.8deg); }
.memory__item:nth-child(even) .memory__btn { transform: rotate(.9deg); }
.memory__btn:hover, .memory__btn:focus-visible { transform: rotate(0) scale(1.02); }
.memory__btn img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; filter: sepia(.25) contrast(1.05); }
.memory__item--1 .memory__btn img, .memory__item--6 .memory__btn img { aspect-ratio: 8 / 9; }
.memory__item--4 .memory__btn img, .memory__item--7 .memory__btn img, .memory__item--5 .memory__btn img, .memory__item--2 .memory__btn img, .memory__item--3 .memory__btn img { aspect-ratio: 16 / 9; }
.memory__cap { margin: .6rem 0 0; font-family: var(--text); font-style: italic; font-size: .92rem; color: rgba(255,255,255,.82); }
.zoom { border: 0; padding: 10px 10px 0; background: #F3EFE6; max-width: min(1000px, 94vw); box-shadow: 0 30px 80px rgba(0,0,0,.6); }
.zoom::backdrop { background: rgba(7,24,36,.85); }
.zoom__img { display: block; max-width: 100%; max-height: 78vh; margin: 0 auto; filter: sepia(.2); }
.zoom__cap { margin: 0; padding: .7rem .2rem .8rem; font-family: var(--text); font-style: italic; color: #333; }
.zoom__close { position: absolute; top: 4px; right: 8px; width: 40px; height: 40px; border: 0; border-radius: 50%; background: rgba(7,24,36,.75); color: #fff; font-size: 1.6rem; line-height: 1; cursor: pointer; }
@media (max-width: 900px) {
	.memory__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.memory__item--1 .memory__btn img, .memory__item--6 .memory__btn img { aspect-ratio: 3 / 4; height: auto; }
}
@media (max-width: 480px) {
	.memory__grid { gap: 1.2rem .8rem; }
	.memory__cap { font-size: .82rem; }
}

/* Reproductor de música italiana */
.music { position: fixed; left: 18px; bottom: 18px; z-index: 46; font-family: var(--display); }
.music__bar { display: flex; align-items: center; gap: 2px; background: var(--navy); color: var(--white); border-radius: 999px; padding: 5px; box-shadow: 0 10px 28px rgba(7,24,36,.35); border: 1px solid rgba(255,255,255,.12); }
.music__toggle, .music__next { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border: 0; border-radius: 50%; cursor: pointer; }
.music__toggle { background: var(--gold); color: var(--navy); }
.music__next { background: transparent; color: rgba(255,255,255,.85); }
.music__next:hover { color: var(--gold); }
.music .ic-pause, .music.is-playing .ic-play { display: none; }
.music.is-playing .ic-pause { display: block; }
.music__now { display: flex; align-items: center; gap: .55rem; background: none; border: 0; color: inherit; cursor: pointer; padding: 0 .5rem; text-align: left; max-width: 230px; }
.music__label { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.music__label strong { font-size: .86rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.music__label span { font-size: .74rem; color: rgba(255,255,255,.7); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.music__eq { display: inline-flex; align-items: flex-end; gap: 2px; height: 16px; width: 14px; flex-shrink: 0; }
.music__eq i { width: 3px; height: 4px; background: var(--gold); border-radius: 1px; }
.music.is-playing .music__eq i { animation: iem-eq .9s ease-in-out infinite alternate; }
.music.is-playing .music__eq i:nth-child(2) { animation-delay: .2s; }
.music.is-playing .music__eq i:nth-child(3) { animation-delay: .45s; }
@keyframes iem-eq { from { height: 3px; } to { height: 16px; } }
.music__panel { position: absolute; left: 0; bottom: calc(100% + 10px); width: min(320px, calc(100vw - 36px)); max-height: 60vh; overflow-y: auto; background: var(--white); color: var(--ink); border-radius: 10px; box-shadow: 0 18px 50px rgba(7,24,36,.35); padding: .8rem; }
.music__head { margin: .3rem .4rem .4rem; font-weight: 700; font-size: .82rem; color: var(--red); }
.music__list { list-style: none; margin: 0 0 .6rem; padding: 0; }
.music__list button, .music__list a { display: flex; flex-direction: column; width: 100%; text-align: left; background: none; border: 0; border-radius: 6px; padding: .55rem .6rem; color: var(--ink); text-decoration: none; cursor: pointer; font: inherit; }
.music__list button:hover, .music__list a:hover { background: var(--stone); }
.music__list strong { font-size: .95rem; }
.music__list span { font-size: .78rem; color: var(--muted); }
.music__note { margin: .2rem .4rem 0; font-size: .72rem; color: var(--muted); }
.lang-hint { bottom: 86px; }
@media (max-width: 560px) {
	.music { left: 10px; bottom: 12px; }
	.music__now { max-width: 150px; }
	.lang-hint { left: 10px; bottom: 78px; }
}
@media (prefers-reduced-motion: reduce) { .music.is-playing .music__eq i { animation: none; height: 12px; } }

/* Historias */
.grid-stories { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.5rem 2rem; }
.card-story { position: relative; }
.card-story__media { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; background: #2b2620; border: 6px solid #F3EFE6; box-shadow: 0 10px 26px rgba(7,24,36,.18); margin-bottom: 1rem; text-decoration: none; }
.card-story__media img { width: 100%; height: 100%; object-fit: cover; filter: sepia(.35) contrast(1.05); transition: filter .3s; }
.card-story:hover .card-story__media img { filter: sepia(.1) contrast(1.05); }
.card-story__poster { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; background: radial-gradient(circle at 50% 40%, #4a3f33, #1f1a15); color: #E9DCC3; font-family: var(--display); font-weight: 700; font-size: clamp(2.2rem, 4vw, 3.4rem); letter-spacing: .04em; }
.card-story__year { position: absolute; left: 10px; bottom: 10px; background: rgba(15,12,9,.78); color: #F3EFE6; font-family: var(--display); font-weight: 700; padding: .25rem .6rem .15rem; font-size: .9rem; }
.card-story__title { font-family: var(--text); font-weight: 600; font-size: 1.28rem; line-height: 1.25; margin: 0 0 .5rem; }
.card-story__title a { color: var(--ink); text-decoration: none; }
.card-story__title a:hover { color: var(--red); }
.card-story__excerpt { color: var(--muted); font-size: 1rem; }
.section--stories { background: #F6F2EA; }
.page-head--stories { background: #F6F2EA; }

.story__head { background: #1f1a15; color: #F3EFE6; padding: clamp(40px, 6vw, 80px) 0 clamp(40px, 5vw, 64px); }
.story__head-inner { max-width: 900px; }
.story__head .crumbs a { color: var(--gold); }
.story__year { font-family: var(--display); font-weight: 700; font-size: clamp(2.6rem, 6vw, 4.6rem); color: var(--gold); line-height: 1; margin: .2rem 0 .6rem; }
.story__title { font-family: var(--text); font-weight: 600; font-size: clamp(2rem, 4.2vw, 3.2rem); line-height: 1.12; margin: 0 0 1rem; text-wrap: balance; }
.story__dek { font-size: 1.25rem; color: rgba(243,239,230,.85); line-height: 1.5; max-width: 60ch; }
.story__head .meta { color: rgba(243,239,230,.7); }
.story__figure { margin: -1px auto 0; max-width: 1100px; padding-top: 2rem; }
.story__figure img { width: 100%; border: 8px solid #F3EFE6; box-shadow: 0 18px 40px rgba(7,24,36,.25); filter: sepia(.25); }
.story__figure figcaption { font-family: var(--display); font-size: .85rem; color: var(--muted); margin-top: .5rem; }
.story__body { max-width: 800px; padding-top: 2.5rem; padding-bottom: var(--section); }
.prose--story { font-size: 1.2rem; line-height: 1.85; }
.prose--story > p:first-child::first-letter { float: left; font-family: var(--display); font-weight: 700; font-size: 3.6em; line-height: .85; padding: .08em .1em 0 0; color: var(--red); }

.tell { background: #1f1a15; color: #F3EFE6; padding: clamp(40px, 5vw, 64px) 0; }
.tell__inner { display: flex; align-items: center; justify-content: space-between; gap: 2rem; flex-wrap: wrap; }
.tell__title { font-family: var(--display); font-weight: 700; font-size: clamp(1.5rem, 2.6vw, 2.2rem); margin-bottom: .35rem; padding-top: .1em; }
.tell p { margin: 0; color: rgba(243,239,230,.85); max-width: 60ch; }
.btn--gold { background: var(--gold); color: var(--navy); }
.btn--gold:hover { background: #F3EFE6; color: var(--navy); }
.field--check label { display: flex; gap: .6rem; align-items: flex-start; font-family: var(--text); font-weight: 400; font-size: .98rem; }
.field--check input { width: auto; margin-top: .3rem; }
input[type="file"] { padding: .6rem; }
@media (max-width: 980px) { .grid-stories { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .grid-stories { grid-template-columns: 1fr; } .tell__inner .btn { width: 100%; } }
