/* Galería (page-gallery.php) | Blue Nova */

.gg-hero { position: relative; overflow: hidden; color: #fff; padding: clamp(44px, 6vw, 84px) 0 clamp(44px, 6vw, 76px); background: radial-gradient(80% 120% at 100% 0%, rgba(0, 177, 201, .5) 0%, transparent 60%), linear-gradient(135deg, var(--violet-700) 0%, var(--violet) 55%, #2f5fa8 100%); }
.gg-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background-image: var(--topo); background-size: 640px 640px; opacity: .55; mix-blend-mode: screen; }
.gg-hero__islands { position: absolute; right: -4%; top: -14%; width: min(600px, 75vw); color: rgba(255, 255, 255, .08); z-index: -1; pointer-events: none; }
.gg-hero__islands svg { width: 100%; height: auto; }
.gg-hero .crumbs, .gg-hero .crumbs a { color: rgba(255, 255, 255, .82); }
.gg-hero .h1 { color: #fff; max-width: 16ch; }
.gg-hero .h1 em { color: #8be6f2; }
.gg-hero__lead { font-size: 1.15rem; color: rgba(255, 255, 255, .9); max-width: 48ch; }
.gg-hero__stats { list-style: none; margin: 1.4rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.gg-hero__stats li { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 16px; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .22); font-weight: 600; backdrop-filter: blur(6px); }
.gg-hero__stats b { font-size: 1.25rem; font-weight: 800; }
.gg-hero__stats .gi-ico { color: #8be6f2; width: 22px; height: 22px; }

/* Barra de filtros fija bajo la cabecera */
.gg { padding-bottom: clamp(48px, 7vw, 90px); background: linear-gradient(180deg, var(--violet-50) 0, #fff 420px); }
.gg-bar { position: sticky; top: var(--head-h); z-index: 20; background: rgba(255, 255, 255, .94); backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid rgba(74, 51, 154, .12); }
.gg-bar__in { display: flex; align-items: center; gap: 14px; padding-top: 12px; padding-bottom: 12px; }
.gg-chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; flex: 1 1 auto; min-width: 0; padding: 2px; }
.gg-chips::-webkit-scrollbar { display: none; }
.gg-chip { display: inline-flex; align-items: center; gap: 7px; flex: none; padding: 9px 14px; border-radius: 999px; border: 1.5px solid rgba(74, 51, 154, .2); background: #fff; color: var(--ink); font-weight: 700; font-size: .92rem; transition: background .2s ease, color .2s ease, border-color .2s ease; }
.gg-chip .gi-ico { color: var(--violet); width: 18px; height: 18px; }
.gg-chip span { display: inline-grid; place-items: center; min-width: 24px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--violet-50); color: var(--violet); font-size: .78rem; }
.gg-chip:hover { border-color: var(--violet); }
.gg-chip.is-on { background: var(--violet); border-color: var(--violet); color: #fff; }
.gg-chip.is-on .gi-ico { color: #8be6f2; }
.gg-chip.is-on span { background: rgba(255, 255, 255, .2); color: #fff; }
.gg-select { position: relative; display: flex; align-items: center; flex: 0 0 auto; }
.gg-select .gi-ico { position: absolute; left: 12px; color: var(--teal-700); pointer-events: none; }
.gg-select select { appearance: none; -webkit-appearance: none; font: inherit; font-weight: 700; font-size: .92rem; color: var(--ink); max-width: 260px; padding: 10px 36px 10px 38px; border-radius: 999px; border: 1.5px solid rgba(0, 148, 168, .35); background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6' fill='none' stroke='%234a339a' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 12px center / 16px; cursor: pointer; text-overflow: ellipsis; }
.gg-select select:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 4px rgba(0, 177, 201, .18); }
.gg-select .screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.gg-count { margin: 22px 0 14px; color: var(--muted); font-weight: 600; }

/* Rejilla tipo masonry: las filas las calcula gallery.js; sin JS queda una rejilla pareja */
.gg-grid { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 8px; column-gap: 14px; }
.gg-item { margin: 0 0 14px; grid-row-end: span 26; }
.gg-item[hidden] { display: none; }
.gg-item__btn { position: relative; display: block; width: 100%; height: 100%; padding: 0; border: 0; border-radius: 18px; overflow: hidden; background: linear-gradient(135deg, var(--violet-50), var(--teal-50)); cursor: zoom-in; }
.gg-ready .gg-item__btn { height: 100%; }
.gg-item__btn img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.gg-item__btn:hover img, .gg-item__btn:focus-visible img { transform: scale(1.05); }
.gg-item__cap { position: absolute; left: 0; right: 0; bottom: 0; display: grid; gap: 2px; padding: 34px 14px 12px; text-align: left; color: #fff; background: linear-gradient(180deg, transparent, rgba(44, 29, 99, .6) 45%, rgba(44, 29, 99, .92)); opacity: 0; transform: translateY(8px); transition: opacity .25s ease, transform .25s ease; }
.gg-item__btn:hover .gg-item__cap, .gg-item__btn:focus-visible .gg-item__cap { opacity: 1; transform: none; }
.gg-item__place { display: inline-flex; align-items: center; gap: 5px; max-width: 100%; min-width: 0; font-size: .78rem; font-weight: 700; color: #fff; text-shadow: 0 1px 2px rgba(20, 12, 50, .55); }
.gg-item__place .gi-ico { color: #8be6f2; }
.gg-item__place span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gg-item__tour { font-weight: 700; font-size: .92rem; line-height: 1.25; }
.gg-item__zoom { position: absolute; top: 10px; right: 10px; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: rgba(255, 255, 255, .9); color: var(--violet); opacity: 0; transition: opacity .25s ease; }
.gg-item__btn:hover .gg-item__zoom, .gg-item__btn:focus-visible .gg-item__zoom { opacity: 1; }
@media (hover: none) {
	.gg-item__cap { opacity: 1; transform: none; padding: 16px 10px 7px; }
	.gg-item__cap--noplace { display: none; }
	.gg-item__place { font-size: .72rem; }
	.gg-item__tour { display: none; }
}
.gg-empty { text-align: center; padding: 40px 0; color: var(--muted); }
.gg-reset { border: 0; background: none; color: var(--violet); font-weight: 700; text-decoration: underline; }

/* Visor a pantalla completa */
.gg-box { position: fixed; inset: 0; z-index: 200; display: grid; grid-template-columns: 64px 1fr 64px; align-items: center; padding: 20px; background: radial-gradient(120% 100% at 50% 0%, rgba(74, 51, 154, .55), transparent 70%), #0e0826; }
.gg-box[hidden] { display: none; }
.gg-box__stage { grid-column: 2; margin: 0; display: grid; grid-template-columns: minmax(0, 100%); justify-items: center; gap: 14px; min-width: 0; }
.gg-box__stage img { max-width: 100%; max-height: calc(100vh - 150px); max-height: calc(100dvh - 150px); width: auto; height: auto; border-radius: 14px; box-shadow: 0 30px 70px -20px rgba(0, 0, 0, .8); background: rgba(255, 255, 255, .04); }
.gg-box__cap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; width: min(100%, 760px); max-width: 100%; color: #fff; }
.gg-box__meta { display: grid; min-width: 0; }
.gg-box__place { color: #8be6f2; font-weight: 700; font-size: .85rem; }
.gg-box__meta strong { font-size: 1.05rem; }
.gg-box__right { display: flex; align-items: center; gap: 14px; margin-left: auto; }
.gg-box__num { font-weight: 700; color: rgba(255, 255, 255, .75); font-variant-numeric: tabular-nums; white-space: nowrap; }
.gg-box__go { padding: .65em 1.1em; }
.gg-box__btn { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .25); background: rgba(255, 255, 255, .1); color: #fff; transition: background .2s ease; }
.gg-box__btn:hover { background: var(--violet); border-color: var(--violet); }
.gg-box__btn .gi-ico { width: 24px; height: 24px; }
.gg-box__close { position: absolute; top: 16px; right: 16px; z-index: 2; }
.gg-box__prev { grid-column: 1; }
.gg-box__next { grid-column: 3; }
.gg-lock { overflow: hidden; }
/* Con el visor abierto no se ven el selector de idioma ni los botones flotantes encima de la foto. */
.gg-lock #gt_float_wrapper, .gg-lock .wa-float, .gg-lock .mail-float { display: none !important; }

.gg-cta .h2 em { color: #bff3fa; }

@media (max-width: 1100px) { .gg-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 820px) {
	.gg-bar__in { flex-wrap: wrap; gap: 10px; }
	.gg-chips { flex-basis: 100%; }
}
@media (max-width: 760px) {
	.gg-select, .gg-select select { width: 100%; max-width: none; }
}
@media (max-width: 700px) {
	.gg-grid { grid-template-columns: repeat(2, 1fr); column-gap: 10px; }
	.gg-item { margin-bottom: 10px; }
	.gg-item__btn { border-radius: 14px; }
	.gg-box { grid-template-columns: 1fr; padding: 64px 10px 16px; }
	.gg-box__stage { grid-column: 1; }
	.gg-box__stage img { max-height: calc(100dvh - 210px); }
	.gg-box__prev, .gg-box__next { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; background: rgba(14, 8, 38, .6); }
	.gg-box__prev { left: 8px; }
	.gg-box__next { right: 8px; }
	.gg-box__cap { flex-direction: column; align-items: flex-start; }
	.gg-box__right { width: 100%; justify-content: space-between; }
}

/* Pulido 21-oct (tarde) | se carga antes que zz-fixes y zz-sobrio: por eso los selectores llevan .gg delante. */

/* Pestañas de isla: el contador en la misma línea base que la etiqueta y 44 px de alto para el dedo. */
.gg .gg-chip { align-items: baseline !important; min-height: 44px; padding: 10px 0 !important; }
.gg .gg-chip span { display: inline !important; }

/* Selector de tours con el mismo estilo de las pestañas: línea abajo, sin píldora ni ícono. */
.gg .gg-select .gi-ico { display: none; }
.gg .gg-select select { min-height: 44px; padding: 10px 30px 10px 2px; border: 0; border-bottom: 2px solid rgba(74, 51, 154, .2); border-radius: 0; background-color: transparent; background-position: right 4px center; font-weight: 600; }
.gg .gg-select select:hover { border-bottom-color: rgba(74, 51, 154, .45); }
.gg .gg-select select:focus { box-shadow: none; border-bottom-color: var(--violet); }
.gg .gg-select select:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; }

/* En compu la barra fija va en una sola franja: islas a la izquierda y tours a la derecha. */
@media (min-width: 1100px) {
	.gg .gg-bar__in { flex-wrap: nowrap; align-items: center; padding-top: 6px; padding-bottom: 6px; }
	.gg .gg-chips { flex: 1 1 auto; order: 0; row-gap: 0 !important; }
	.gg .gg-select { order: 1; align-self: center; }
}
/* Con mouse las pestañas pueden ser más bajas: la barra fija tapa menos fotos. */
@media (min-width: 1100px) and (hover: hover) and (pointer: fine) {
	.gg .gg-chip { min-height: 38px; padding: 7px 0 !important; }
	.gg .gg-select select { min-height: 38px; padding-top: 7px; padding-bottom: 7px; }
}
@media (min-width: 761px) and (max-width: 1099px) {
	.gg .gg-bar__in { padding-top: 6px; padding-bottom: 6px; row-gap: 2px; }
	.gg .gg-chips { row-gap: 0 !important; }
	.gg .gg-select, .gg .gg-select select { width: auto; max-width: 340px; }
}
@media (max-width: 760px) {
	.gg .gg-bar__in { padding-top: 6px; padding-bottom: 8px; gap: 2px; }
	.gg .gg-select select { min-height: 42px; padding-top: 8px; padding-bottom: 8px; }
}

/* Carril de filtros en celular: el desvanecido de zz-fixes (borde derecho) sigue al desplazamiento.
   Con filtros escondidos a la izquierda se desvanece también ese borde; al llegar al final, solo el izquierdo. */
@media (max-width: 760px) {
	.gg .gg-chips.is-scrolled {
		-webkit-mask-image: linear-gradient(90deg, transparent, #000 14%, #000 82%, transparent);
		mask-image: linear-gradient(90deg, transparent, #000 14%, #000 82%, transparent);
	}
	.gg .gg-chips.is-end {
		-webkit-mask-image: linear-gradient(90deg, transparent, #000 14%);
		mask-image: linear-gradient(90deg, transparent, #000 14%);
	}
}

/* Cifras del héroe en una sola línea en celular. */
@media (max-width: 480px) {
	.gg-hero .gg-hero__stats { gap: 6px 14px !important; }
	.gg-hero__stats li { font-size: .92rem; gap: 6px; }
	.gg-hero__stats b { font-size: 1.1rem; }
	.gg-hero__stats .gi-ico { width: 18px; height: 18px; }
}

/* Videos: todas las tarjetas en 16:9 sin recortar el cuadro; las verticales y las 4:3 enteras sobre su póster desenfocado. */
.gg .gv-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.gv-item__media { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--ink); }
.gg .gv-item video { position: relative; z-index: 1; width: 100%; height: 100%; aspect-ratio: auto; object-fit: cover; }
.gv-item--fit .gv-item__media::before { content: ""; position: absolute; inset: -24px; background: var(--ink) var(--poster) center / cover no-repeat; filter: blur(18px) brightness(.55) saturate(1.1); }
.gg .gv-item--fit video { object-fit: contain; background: transparent; }
.gv-play { position: absolute; inset: 0; z-index: 2; display: grid; place-items: center; width: 100%; height: 100%; padding: 0; border: 0; background: linear-gradient(180deg, transparent 55%, rgba(14, 8, 38, .28)); cursor: pointer; }
.gv-play__dot { display: grid; place-items: center; width: 62px; height: 62px; border-radius: 50%; background: rgba(255, 255, 255, .94); color: var(--violet); box-shadow: 0 12px 26px -10px rgba(14, 8, 38, .7); transition: transform .2s ease, background .2s ease, color .2s ease; }
.gv-play__dot .gi-ico { width: 26px; height: 26px; margin-left: 3px; }
.gv-play:hover .gv-play__dot, .gv-play:focus-visible .gv-play__dot { transform: scale(1.07); background: var(--violet); color: #fff; }
.gv-play:focus-visible { outline: 3px solid #8be6f2; outline-offset: -3px; }
@media (max-width: 1000px) { .gg .gv-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) {
	.gg .gv-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-flow: dense; gap: 10px; }
	.gg .gv-item { grid-column: span 2; border-radius: 14px; }
	.gg .gv-item--v:not(.gv-item--solo) { grid-column: span 1; }
	.gv-item--v:not(.gv-item--solo) .gv-item__media { aspect-ratio: 9 / 16; }
	.gg .gv-item--v:not(.gv-item--solo) video { object-fit: cover; }
	.gv-play__dot { width: 52px; height: 52px; }
	.gv-play__dot .gi-ico { width: 22px; height: 22px; }
}

/* Al final de la galería en compu, la línea legal del pie queda por encima del selector de idioma flotante. */
@media (min-width: 1100px) {
	body:has([data-gg]) .site-foot__legal { padding-bottom: 84px; }
}
