/* ==========================================================================
   Upcoming Dates page — "Choose Your Room" cards and the photo gallery
   (template-parts/calendar/rooms.php + gallery.php, inc/stay-gallery.php).
   Hover: room cards lift, their photo zooms and the feature ticks fill
   with the room's colour (green = shared, saffron = private); gallery
   photos zoom and show their caption and a full-screen icon.
   The full-screen viewer is driven by assets/js/stay-gallery.js.
   ========================================================================== */
.stay-rooms, .stay-gallery-section { --stay-ease: cubic-bezier(.2, .7, .2, 1); }

/* ---- Room cards ---- */
.stay-room-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
.stay-room {
	--room: var(--color-primary);
	--room-dark: var(--color-primary-dark);
	--room-tint: rgba(47, 93, 80, 0.1);
	position: relative;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	background: var(--color-surface);
	border: 1px solid var(--color-border);
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow-sm);
	transition: opacity 700ms ease, transform 450ms var(--stay-ease), box-shadow 450ms ease, border-color 450ms ease;
}
.stay-room--private {
	--room: var(--color-secondary);
	--room-dark: var(--color-secondary-dark);
	--room-tint: rgba(217, 138, 61, 0.13);
}
.stay-room-media { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--room-tint); }
.stay-room-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 700ms var(--stay-ease); }
.stay-room-art {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 12px;
	color: #fff;
	background:
		radial-gradient(circle, rgba(255, 255, 255, 0.22) 1.4px, transparent 2px) 0 0 / 22px 22px,
		linear-gradient(135deg, var(--room), var(--room-dark));
}
.stay-room-art-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 96px;
	height: 96px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.14);
	border: 1px solid rgba(255, 255, 255, 0.35);
	transition: transform 600ms var(--stay-ease);
}
.stay-room-art-icon svg { width: 48px; height: 48px; }
.stay-room-admin { max-width: 80%; padding: 4px 10px; border-radius: 999px; background: rgba(0, 0, 0, 0.25); font-size: 0.72rem; text-align: center; }
.stay-room-price {
	position: absolute;
	left: 20px;
	bottom: 20px;
	z-index: 1;
	display: inline-flex;
	align-items: baseline;
	gap: 6px;
	padding: 8px 16px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.95);
	color: var(--room-dark);
	box-shadow: var(--shadow-md);
	font-size: 0.8rem;
}
.stay-room-price strong { font-family: var(--font-heading); font-size: 1.25rem; }
.stay-room-body { display: flex; flex-direction: column; flex: 1; padding: 28px 30px 30px; }
.stay-room-tag { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--room-dark); }
.stay-room h3 { margin: 4px 0 10px; font-size: 1.5rem; }
.stay-room-body > p { margin-bottom: 18px; color: var(--color-text-light); }
.stay-room-features { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; margin: 0 0 24px; padding: 0; list-style: none; }
.stay-room-features li { display: flex; align-items: center; gap: 10px; font-size: 0.9rem; }
.stay-room-features svg {
	flex-shrink: 0;
	width: 26px;
	height: 26px;
	padding: 5px;
	border-radius: 50%;
	background: var(--room-tint);
	color: var(--room-dark);
	transition: background 350ms ease, color 350ms ease;
}
.stay-room .btn { margin-top: auto; align-self: flex-start; }
.stay-room:hover { transform: translateY(-8px); border-color: var(--room); box-shadow: 0 26px 54px rgba(43, 38, 32, 0.15); }
.stay-room:hover .stay-room-media img { transform: scale(1.06); }
.stay-room:hover .stay-room-art-icon { transform: scale(1.08) rotate(-6deg); }
.stay-room:hover .stay-room-features svg { background: var(--room); color: #fff; }
.stay-rooms-note { max-width: 700px; margin: 28px auto 0; text-align: center; font-size: 0.9rem; color: var(--color-text-light); }

/* ---- Gallery ---- */
.stay-gallery { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; margin: 0; padding: 0; list-style: none; }
.stay-shot {
	position: relative;
	display: block;
	aspect-ratio: 1;
	overflow: hidden;
	border-radius: var(--radius-md);
	background: var(--color-bg-alt);
	box-shadow: var(--shadow-sm);
}
.stay-shot img { width: 100%; height: 100%; object-fit: cover; transition: transform 700ms var(--stay-ease); }
.stay-shot::after {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, transparent 45%, rgba(20, 36, 30, 0.8));
	opacity: 0;
	transition: opacity 400ms ease;
}
.stay-shot-caption {
	position: absolute;
	left: 12px;
	right: 12px;
	bottom: 10px;
	z-index: 1;
	color: #fff;
	font-size: 0.8rem;
	font-weight: 500;
	line-height: 1.3;
	opacity: 0;
	transform: translateY(8px);
	transition: opacity 400ms ease, transform 400ms var(--stay-ease);
}
.stay-shot-zoom {
	position: absolute;
	top: 10px;
	right: 10px;
	z-index: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.92);
	color: var(--color-primary-dark);
	opacity: 0;
	transform: scale(0.7);
	transition: opacity 350ms ease, transform 350ms var(--stay-ease);
}
.stay-shot-zoom svg { width: 16px; height: 16px; }
.stay-shot:hover img,
.stay-shot:focus-visible img { transform: scale(1.08); }
.stay-shot:hover::after,
.stay-shot:focus-visible::after,
.stay-shot:hover .stay-shot-caption,
.stay-shot:focus-visible .stay-shot-caption { opacity: 1; transform: none; }
.stay-shot:hover .stay-shot-zoom,
.stay-shot:focus-visible .stay-shot-zoom { opacity: 1; transform: scale(1); }
.stay-shot:focus-visible { outline: 3px solid var(--color-secondary); outline-offset: 3px; }
@media (hover: none) {
	/* Touch screens have no hover: show captions all the time. */
	.stay-shot::after, .stay-shot-caption { opacity: 1; transform: none; }
}

/* ---- Full-screen viewer ---- */
.stay-lightbox-open,
.stay-lightbox-open body { overflow: hidden; }
.stay-lightbox {
	position: fixed;
	inset: 0;
	z-index: 10050;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 76px 84px 40px;
	background: rgba(14, 24, 20, 0.94);
}
.stay-lightbox[hidden] { display: none; }
.stay-lightbox-stage { display: flex; flex-direction: column; align-items: center; gap: 14px; max-width: 100%; max-height: 100%; margin: 0; }
.stay-lightbox-stage img {
	width: auto;
	height: auto;
	max-width: min(1100px, 100%);
	max-height: calc(100vh - 180px);
	object-fit: contain;
	border-radius: var(--radius-md);
	box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}
.stay-lightbox-stage figcaption { color: #f1ebdd; font-size: 0.95rem; text-align: center; }
.stay-lightbox-bar { position: absolute; top: 16px; left: 20px; right: 20px; display: flex; align-items: center; gap: 10px; }
.stay-lightbox-count { margin-right: auto; color: rgba(255, 255, 255, 0.8); font-size: 0.85rem; letter-spacing: 0.08em; }
.stay-lightbox-btn,
.stay-lightbox-nav {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-width: 44px;
	height: 44px;
	padding: 0 14px;
	border: 1px solid rgba(255, 255, 255, 0.3);
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.1);
	color: #fff;
	font: inherit;
	font-size: 0.85rem;
	font-weight: 600;
	text-decoration: none;
	cursor: pointer;
	transition: background 250ms ease, border-color 250ms ease, transform 250ms ease;
}
.stay-lightbox-btn svg,
.stay-lightbox-nav svg { width: 18px; height: 18px; }
.stay-lightbox-btn:hover { background: rgba(255, 255, 255, 0.22); color: #fff; }
.stay-lightbox-download:hover { background: var(--color-secondary); border-color: var(--color-secondary); transform: translateY(-2px); }
.stay-lightbox-nav { position: absolute; top: 50%; width: 52px; height: 52px; padding: 0; transform: translateY(-50%); }
.stay-lightbox-nav--prev { left: 16px; }
.stay-lightbox-nav--next { right: 16px; }
.stay-lightbox-nav:hover { background: var(--color-primary); border-color: var(--color-primary); }
.stay-lightbox-btn:focus-visible,
.stay-lightbox-nav:focus-visible { outline: 2px solid #f4d9a8; outline-offset: 3px; }

/* ---- Responsive & reduced motion ---- */
@media (max-width: 900px) {
	.stay-room-grid { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
	.stay-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
	.stay-lightbox { padding: 72px 12px 96px; }
	.stay-lightbox-stage img { max-height: calc(100vh - 220px); }
	.stay-lightbox-nav { top: auto; bottom: 24px; transform: none; }
	.stay-lightbox-nav--prev { left: calc(50% - 64px); }
	.stay-lightbox-nav--next { right: calc(50% - 64px); }
}
@media (max-width: 520px) {
	.stay-room-body { padding: 24px 22px 26px; }
	.stay-room-features { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
	.stay-room, .stay-room-media img, .stay-room-art-icon, .stay-room-features svg,
	.stay-shot img, .stay-shot::after, .stay-shot-caption, .stay-shot-zoom,
	.stay-lightbox-btn, .stay-lightbox-nav { transition: none; }
	.stay-room:hover, .stay-room:hover .stay-room-media img, .stay-room:hover .stay-room-art-icon,
	.stay-shot:hover img, .stay-shot:focus-visible img, .stay-lightbox-download:hover { transform: none; }
}
