/* Viaggi – Italy by you: riquadri e pagina del viaggio. Misure riprese dai template Elementor del sito. */

:root {
	--iby-gold: #E4BC1C;
	--iby-blue: #74B4D4;
	--iby-ink: #000;
	--iby-text: #1e293b;
	--iby-muted: #5b6472;
	--iby-line: #e6e2d6;
	--iby-font: "Playfair Display", Georgia, "Times New Roman", serif;
}

/* ---------- Riquadri ---------- */

.iby-cards {
	--iby-cols: 3;
	display: grid;
	grid-template-columns: repeat(var(--iby-cols), minmax(0, 1fr));
	gap: 40px 32px;
	margin: 0;
	padding: 0;
}
@media (max-width: 1024px) { .iby-cards { grid-template-columns: repeat(min(var(--iby-cols), 2), minmax(0, 1fr)); gap: 28px 24px; } }
@media (max-width: 640px)  { .iby-cards { grid-template-columns: minmax(0, 1fr); gap: 24px; } }

.iby-card { margin: 0; min-width: 0; }

.iby-card__link {
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	min-height: 300px;
	height: 100%;
	padding: 10px;
	box-sizing: border-box;
	overflow: hidden;
	border: 2px solid var(--iby-gold);
	background: #fff;
	color: var(--iby-ink);
	text-decoration: none !important;
	isolation: isolate;
}

.iby-card__media { position: absolute; inset: 0; z-index: -2; background: #eef2f5; }
.iby-card__img {
	display: block;
	width: 100% !important;
	height: 100% !important;
	max-width: none !important;
	object-fit: cover;
	transition: transform .7s cubic-bezier(.2, .7, .2, 1);
}
/* Sfumatura bianca che regge il titolo, come nel riquadro originale. */
.iby-card__media::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(to bottom, rgba(255, 255, 255, 0) 38%, rgba(255, 255, 255, .92) 60%, #fff 70%);
}

.iby-card__body {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	padding: 0 6px 6px;
	text-align: center;
}
.iby-card .iby-card__title {
	margin: 0;
	font-family: var(--iby-font);
	font-size: 24px;
	font-weight: 600;
	line-height: 1.3;
	color: var(--iby-ink);
	letter-spacing: 0;
	text-transform: none;
	overflow-wrap: anywhere;
}
.iby-card__meta {
	font-family: var(--iby-font);
	font-size: 14px;
	line-height: 1.4;
	color: var(--iby-muted);
	letter-spacing: .04em;
	text-transform: uppercase;
}
.iby-card__more {
	margin-top: 4px;
	font-family: var(--iby-font);
	font-size: 24px;
	font-weight: 600;
	line-height: 1.3;
	color: var(--iby-gold);
	transition: letter-spacing .3s ease;
}

@media (hover: hover) {
	.iby-card__link:hover .iby-card__img { transform: scale(1.05); }
	.iby-card__link:hover .iby-card__more { letter-spacing: .02em; }
}
.iby-card__link:focus-visible { outline: 3px solid var(--iby-blue); outline-offset: 3px; }

@media (max-width: 640px) {
	.iby-card .iby-card__title { font-size: 21px; }
	.iby-card__more { font-size: 21px; }
}

.iby-empty { font-family: var(--iby-font); font-size: 18px; text-align: center; color: var(--iby-muted); }

/* ---------- Pagina del viaggio ---------- */

.iby-single { font-family: var(--iby-font); color: var(--iby-ink); background: #fff; }
.iby-single *, .iby-single *::before, .iby-single *::after { box-sizing: border-box; }
.iby-single svg { display: block; }

.iby-wrap { width: 100%; max-width: 1140px; margin: 0 auto; padding-left: 20px; padding-right: 20px; }

/* Hero */
.iby-hero {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 475px;
	padding: 72px 20px;
	overflow: hidden;
	background: #12324a;
	color: #fff;
	text-align: center;
	isolation: isolate;
}
.iby-hero__img {
	position: absolute; inset: 0; z-index: -2;
	width: 100% !important; height: 100% !important; max-width: none !important;
	object-fit: cover;
}
.iby-hero::after {
	content: "";
	position: absolute; inset: 0; z-index: -1;
	background: linear-gradient(to bottom, rgba(0, 0, 0, .28), rgba(0, 0, 0, .42));
}
.iby-hero__inner { max-width: 1140px; }
.iby-hero__tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin: 0 0 22px; }
.iby-tag {
	display: inline-block;
	padding: 10px 24px;
	border-radius: 999px;
	font-size: 22px;
	font-weight: 600;
	line-height: 1.2;
	text-transform: uppercase;
	color: #fff;
}
.iby-tag--blue { background: var(--iby-blue); }
.iby-tag--gold { background: var(--iby-gold); }
.iby-single .iby-hero__title {
	margin: 0;
	font-family: var(--iby-font);
	font-size: clamp(32px, 5vw, 60px);
	font-weight: 600;
	line-height: 1.25;
	color: #fff;
	text-transform: uppercase;
	text-wrap: balance;
	text-shadow: 0 2px 18px rgba(0, 0, 0, .35);
}

.iby-switch {
	position: absolute;
	top: 18px;
	right: 20px;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 7px 14px 7px 8px;
	border-radius: 999px;
	background: rgba(255, 255, 255, .92);
	color: var(--iby-ink) !important;
	font-size: 14px;
	line-height: 1;
	text-decoration: none !important;
	transition: background .2s;
}
.iby-switch:hover { background: #fff; }
.iby-switch__code {
	padding: 4px 6px;
	border-radius: 999px;
	background: var(--iby-gold);
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .06em;
}

/* Corpo: testo a sinistra, box prezzo a destra */
.iby-body {
	display: grid;
	grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr);
	gap: 56px;
	align-items: start;
	padding-top: 60px;
	padding-bottom: 60px;
}
.iby-single .iby-content__title {
	margin: 0;
	font-family: var(--iby-font);
	font-size: 26px;
	font-weight: 600;
	line-height: 1.3;
	color: var(--iby-ink);
	text-transform: uppercase;
}
.iby-content__sub { margin: 6px 0 0; font-size: 17px; font-weight: 500; text-transform: uppercase; }

.iby-divider {
	display: flex;
	align-items: center;
	gap: 14px;
	margin: 26px 0 30px;
	color: var(--iby-gold);
}
.iby-divider::before,
.iby-divider::after { content: ""; flex: 1; height: 1px; background: var(--iby-line); }
.iby-divider svg { width: 30px; height: 30px; transform: rotate(90deg); }

.iby-block { margin: 0 0 34px; }
.iby-single .iby-block__title {
	margin: 0 0 14px;
	font-family: var(--iby-font);
	font-size: 15px;
	font-weight: 700;
	letter-spacing: .12em;
	color: var(--iby-gold);
	text-transform: uppercase;
}
.iby-dates, .iby-checks { list-style: none; margin: 0; padding: 0; }
.iby-dates li, .iby-checks li {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	margin: 0;
	font-size: 18px;
	line-height: 1.65;
}
.iby-dates li { padding: 12px 0; border-bottom: 1px solid var(--iby-line); }
.iby-dates li:first-child { border-top: 1px solid var(--iby-line); }
.iby-checks li { padding: 5px 0; }
.iby-dates svg, .iby-checks svg { flex: none; width: 20px; height: 20px; margin-top: 5px; }
.iby-dates svg { color: var(--iby-blue); }
.iby-checks svg { color: var(--iby-gold); }

.iby-text { font-size: 18px; line-height: 1.65; color: var(--iby-ink); }
.iby-text p { margin: 0 0 1em; }
.iby-text a { color: inherit; text-decoration-color: var(--iby-gold); text-underline-offset: 3px; }
.iby-text ul, .iby-text ol { margin: 0 0 1em 1.2em; }

/* Box prezzo */
.iby-aside { position: sticky; top: 110px; }
.admin-bar .iby-aside { top: 142px; }
.iby-box {
	padding: 28px 24px 22px;
	background: #fff;
	box-shadow: 0 0 10px rgba(0, 0, 0, .25);
	text-align: center;
}
.iby-box > * + * { margin-top: 16px; }
.iby-box p { margin-bottom: 0; }
.iby-box__price {
	margin: 0;
	font-size: 30px;
	font-weight: 600;
	line-height: 1.25;
	color: var(--iby-gold);
	text-transform: uppercase;
	text-wrap: balance;
}
.iby-box__period {
	padding-top: 16px;
	border-top: 1px solid var(--iby-line);
	font-size: 20px;
	font-weight: 600;
	line-height: 1.3;
	text-transform: uppercase;
}
.iby-box__departure {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	font-size: 20px;
	font-weight: 600;
	line-height: 1.3;
	text-transform: uppercase;
}
.iby-box__plane { color: var(--iby-blue); }
.iby-box__plane svg { width: 44px; height: 44px; transform: rotate(90deg); }
.iby-box__info {
	display: flex;
	gap: 10px;
	align-items: flex-start;
	padding: 12px 14px;
	background: #fbf6e1;
	border-radius: 3px;
	font-size: 16px;
	line-height: 1.45;
	text-align: left;
}
.iby-box__info svg { flex: none; width: 20px; height: 20px; margin-top: 1px; color: var(--iby-gold); }

.iby-btn {
	display: block;
	width: 100%;
	padding: 12px 24px;
	border-radius: 3px;
	background: var(--iby-gold);
	color: #fff !important;
	font-family: var(--iby-font);
	font-size: 20px;
	font-weight: 500;
	line-height: 1;
	text-align: center;
	text-decoration: none !important;
	transition: filter .2s, transform .2s;
}
.iby-btn:hover { filter: brightness(.94); }
.iby-btn:active { transform: translateY(1px); }
.iby-btn:focus-visible { outline: 3px solid var(--iby-blue); outline-offset: 3px; }
.iby-box .iby-box__note { margin-top: 10px; font-size: 14px; text-align: left; }

/* Galleria */
.iby-gallery-section, .iby-more { padding-top: 10px; padding-bottom: 70px; }
.iby-single .iby-section-title {
	display: flex;
	align-items: center;
	gap: 18px;
	margin: 0 0 30px;
	font-family: var(--iby-font);
	font-size: 32px;
	font-weight: 600;
	line-height: 1.2;
	color: var(--iby-ink);
}
.iby-section-title::after { content: ""; flex: 1; height: 2px; background: var(--iby-gold); }

/* 1-4 elementi: una riga di riquadri uguali. Da 5 in su: la prima foto grande e le altre attorno. */
.iby-gallery {
	display: grid;
	grid-template-columns: repeat(var(--iby-gcols, 4), minmax(0, 1fr));
	gap: 12px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.iby-gallery[data-count="1"] { --iby-gcols: 1; }
.iby-gallery[data-count="2"] { --iby-gcols: 2; }
.iby-gallery[data-count="3"] { --iby-gcols: 3; }
.iby-gallery__item { margin: 0; aspect-ratio: 4 / 3; }
.iby-gallery[data-count="1"] .iby-gallery__item { aspect-ratio: 16 / 9; }
.iby-gallery--mosaic .iby-gallery__item:first-child { grid-column: span 2; grid-row: span 2; aspect-ratio: auto; }
.iby-gallery a {
	position: relative;
	display: block;
	height: 100%;
	overflow: hidden;
	background: #12324a;
	cursor: zoom-in;
}
.iby-gallery img, .iby-gallery video {
	position: absolute; inset: 0;
	width: 100% !important; height: 100% !important; max-width: none !important;
	object-fit: cover;
	transition: transform .7s cubic-bezier(.2, .7, .2, 1);
}
.iby-gallery__item--video a, .iby-gallery__item--embed a { cursor: pointer; }
@media (hover: hover) { .iby-gallery a:hover img, .iby-gallery a:hover video { transform: scale(1.04); } }
.iby-gallery a:focus-visible { outline: 3px solid var(--iby-blue); outline-offset: 3px; }
.iby-play {
	position: absolute; top: 50%; left: 50%;
	display: grid; place-items: center;
	width: 64px; height: 64px; margin: -32px 0 0 -32px;
	border-radius: 50%;
	background: rgba(255, 255, 255, .92);
	color: var(--iby-gold);
	box-shadow: 0 4px 20px rgba(0, 0, 0, .25);
}
.iby-play svg { width: 30px; height: 30px; margin-left: 4px; }

/* Lightbox */
.iby-lb {
	position: fixed; inset: 0; z-index: 999999;
	display: flex; align-items: center; justify-content: center;
	padding: 60px 70px;
	background: rgba(8, 14, 20, .94);
	opacity: 0;
	transition: opacity .25s ease;
}
.iby-lb.is-open { opacity: 1; }
.iby-lb[hidden] { display: none; }
.iby-lb__stage { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; }
.iby-lb__stage img, .iby-lb__stage video { max-width: 100%; max-height: 100%; object-fit: contain; box-shadow: 0 10px 40px rgba(0, 0, 0, .4); }
.iby-lb__stage iframe { width: min(100%, 1100px); aspect-ratio: 16 / 9; height: auto; max-height: 100%; border: 0; }
.iby-lb button {
	position: absolute;
	display: grid; place-items: center;
	width: 48px; height: 48px; padding: 0;
	border: 0; border-radius: 50%;
	background: rgba(255, 255, 255, .12);
	color: #fff;
	font: 400 28px/1 Arial, sans-serif;
	cursor: pointer;
	transition: background .2s;
}
.iby-lb button:hover, .iby-lb button:focus-visible { background: var(--iby-gold); outline: none; }
.iby-lb__close { top: 14px; right: 14px; }
.iby-lb__prev { left: 12px; top: 50%; margin-top: -24px; }
.iby-lb__next { right: 12px; top: 50%; margin-top: -24px; }
.iby-lb__count { position: absolute; bottom: 18px; left: 0; right: 0; color: rgba(255, 255, 255, .75); font: 14px/1 Arial, sans-serif; text-align: center; }
.iby-lb--single .iby-lb__prev, .iby-lb--single .iby-lb__next, .iby-lb--single .iby-lb__count { display: none; }
body.iby-lb-open { overflow: hidden; }

/* ---------- Tablet e telefono ---------- */

@media (max-width: 1024px) {
	.iby-body { grid-template-columns: minmax(0, 1fr); gap: 40px; padding-top: 44px; }
	.iby-aside { position: static; max-width: 560px; width: 100%; margin: 0 auto; }
}

@media (max-width: 640px) {
	.iby-hero { min-height: 380px; padding: 70px 16px 48px; }
	.iby-tag { padding: 8px 18px; font-size: 16px; }
	.iby-switch { top: 12px; right: 12px; font-size: 13px; }
	.iby-wrap { padding-left: 16px; padding-right: 16px; }
	.iby-dates li, .iby-checks li, .iby-text { font-size: 17px; }
	.iby-box__price { font-size: 26px; }
	.iby-single .iby-section-title { font-size: 26px; }
	.iby-gallery { --iby-gcols: 2 !important; gap: 8px; }
	.iby-gallery[data-count="1"] { --iby-gcols: 1 !important; }
	.iby-lb { padding: 56px 8px; }
	.iby-lb__prev, .iby-lb__next { top: auto; bottom: 8px; margin-top: 0; }
}

@media (prefers-reduced-motion: reduce) {
	.iby-card__img, .iby-gallery img, .iby-gallery video, .iby-card__more, .iby-lb { transition: none !important; }
}

/* ---------- Offerta ---------- */

.iby-badge-offer {
	position: absolute;
	top: 12px;
	left: 12px;
	z-index: 1;
	padding: 6px 14px;
	border-radius: 999px;
	background: #c62828;
	color: #fff;
	font-family: var(--iby-font);
	font-size: 14px;
	font-weight: 700;
	letter-spacing: .08em;
	line-height: 1;
	text-transform: uppercase;
	box-shadow: 0 2px 10px rgba(0, 0, 0, .2);
}
.iby-card__media .iby-badge-offer { z-index: 2; }

.iby-box { position: relative; }
.iby-box .iby-badge-offer { position: static; display: inline-block; margin-bottom: 4px; box-shadow: none; }

/* Etichette Offerta / In evidenza (nessun prezzo nei riquadri) */
.iby-badges { position: absolute; top: 12px; left: 12px; z-index: 2; display: flex; flex-wrap: wrap; gap: 6px; }
.iby-badges .iby-badge-offer { position: static; }
.iby-badge-featured {
	padding: 6px 14px;
	border-radius: 999px;
	background: var(--iby-gold);
	color: #fff;
	font-family: var(--iby-font);
	font-size: 14px;
	font-weight: 700;
	letter-spacing: .08em;
	line-height: 1;
	text-transform: uppercase;
	box-shadow: 0 2px 10px rgba(0, 0, 0, .2);
}
