/* Stili aggiuntivi per le tre residenze. */
.residenza-breadcrumb { margin-bottom: 28px; font-size: 14px; }
.residenza-breadcrumb a { text-decoration: underline; }
.residenza-hero-img { width: 100%; height: 520px; object-fit: cover; border-radius: 32px; box-shadow: var(--studentato-shadow); }
.residenza-code { display: inline-block; padding: 12px 18px; background: white; border-radius: 14px; font-size: 16px !important; }
.residenza-gallery { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 24px; }
.residenza-gallery-link:only-child { grid-column: 1/-1; max-width: 850px; }
.residenza-gallery img { width: 100%; height: 340px; object-fit: cover; border-radius: 24px; transition: transform .3s; }
.residenza-gallery a:hover img { transform: translateY(-5px); }
.residenza-features { grid-template-columns: repeat(3,minmax(0,1fr)); }
.residenza-contacts { display: flex; flex-direction: column; gap: 20px; overflow-wrap: anywhere; }
.residenza-contacts .studentato-link { color: white; }
.residenza-placeholder { min-height: 440px; border-radius: 32px; background: linear-gradient(135deg,#1f63ff,#13233f); color: white; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; }
.residenza-placeholder span { font: 160px "Space Grotesk",sans-serif; color: #d8ff73; }
.residenza-placeholder strong { font-size: 30px; }
.residenza-beneficiario { display: flex; flex-direction: column; text-align: center; color: white; }
.residenza-beneficiario small { font-size: 10px; }
.residenza-beneficiario strong { font-size: clamp(15px,2vw,22px); }
.residenza-lightbox { border: 0; padding: 0; background: transparent; max-width: 94vw; max-height: 94vh; overflow: visible; }
.residenza-lightbox::backdrop { background: rgba(0,0,0,.9); }
.residenza-lightbox img { max-width: 90vw; max-height: 84vh; object-fit: contain; }
.residenza-lightbox button { position: absolute; right: 0; top: -44px; border: 0; background: white; border-radius: 50%; width: 38px; height: 38px; font-size: 28px; cursor: pointer; }
@media(max-width:767px) {
	.residenza-hero-img { height: 340px; }
	.residenza-gallery,.residenza-features { grid-template-columns: 1fr; }
	.residenza-gallery img { height: 280px; }
	.residenza-placeholder { min-height: 320px; }
	.residenza-placeholder span { font-size: 110px; }
}
@media(prefers-reduced-motion:reduce) { .residenza-gallery img { transition: none; } }

/* Galleria Marittima e ingrandimento con navigazione. */
.residenza-hero-link { display: block; }
.residenza-gallery-marittima { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.residenza-gallery-marittima img { height: 250px; }
.residenza-gallery-link:focus-visible { outline: 3px solid var(--studentato-blue); outline-offset: 5px; border-radius: 24px; }
.residenza-lightbox { width: 96vw; max-width: 1400px; height: 92vh; max-height: 92dvh; overflow: hidden; }
.residenza-lightbox img { position: absolute; inset: 50% auto auto 50%; transform: translate(-50%, -50%); max-width: calc(100% - 120px); max-height: calc(100% - 110px); width: auto; height: auto; }
.residenza-lightbox button { z-index: 2; width: 48px; height: 48px; color: #13233f; box-shadow: 0 3px 15px rgba(0,0,0,.25); }
.residenza-lightbox button.residenza-lightbox-close { top: 8px; right: 8px; font-size: 34px; }
.residenza-lightbox button.residenza-lightbox-prev { top: 50%; left: 8px; right: auto; transform: translateY(-50%); font-size: 40px; }
.residenza-lightbox button.residenza-lightbox-next { top: 50%; right: 8px; transform: translateY(-50%); font-size: 40px; }
.residenza-lightbox button:focus-visible { outline: 3px solid #d8ff73; outline-offset: 3px; }
.residenza-lightbox-counter { position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%); color: white; font-weight: 700; background: rgba(0,0,0,.6); padding: 8px 16px; border-radius: 20px; }
@media (max-width: 991px) {
	.residenza-gallery-marittima { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 767px) {
	.residenza-gallery-marittima { grid-template-columns: 1fr; gap: 18px; }
	.residenza-gallery-marittima img { height: auto; aspect-ratio: 4/3; object-fit: cover; }
	.residenza-lightbox { width: 100vw; max-width: 100vw; height: 96vh; max-height: 96dvh; }
	.residenza-lightbox img { max-width: calc(100% - 16px); max-height: calc(100% - 150px); }
	.residenza-lightbox button.residenza-lightbox-prev { top: auto; bottom: 12px; left: 16px; transform: none; }
	.residenza-lightbox button.residenza-lightbox-next { top: auto; bottom: 12px; right: 16px; transform: none; }
	.residenza-lightbox-counter { bottom: 24px; }
}

/* Telefono grande come nella homepage Mirò. */
.studentato-contact-phone {
	align-self: center;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 12px;
	min-width: 0;
	padding: 30px 16px;
	border: 1px solid rgba(255, 255, 255, .3);
	border-radius: 24px;
	background: rgba(255, 255, 255, .1);
	color: #fff;
	text-align: center;
	text-decoration: none;
	transition: background .2s ease, border-color .2s ease;
}
.studentato-contact-phone span {
	font-size: 13px;
	font-weight: 700;
	letter-spacing: .07em;
	text-transform: uppercase;
}
.studentato-contact-phone strong {
	color: var(--studentato-lime);
	font-family: "Space Grotesk", sans-serif;
	font-size: clamp(25px, 3.2vw, 46px);
	font-weight: 700;
	line-height: 1.2;
	white-space: nowrap;
}
.studentato-contact-phone small { font-size: 15px; font-weight: 600; }
.studentato-contact-phone:hover { background: rgba(255, 255, 255, .18); border-color: var(--studentato-lime); }
.studentato-contact-phone:focus-visible { outline: 3px solid var(--studentato-lime); outline-offset: 5px; }
@media (max-width: 767px) {
	.studentato-contact-phone { padding: 26px 10px; }
	.studentato-contact-phone strong { font-size: clamp(22px, 6.8vw, 38px); }
}
@media (prefers-reduced-motion: reduce) {
	.studentato-contact-phone { transition: none; }
}

.residenza-contacts .studentato-contact-phone { width: 100%; box-sizing: border-box; }
