/**
 * Home Spectra — griglie territorio/recensioni (stesso look delle classi legacy).
 */

/*
 * Colore testo Spectra Text: il tema Blocksy imposta globalmente
 * `h2 { color: var(--theme-heading-color, …) }` (main.min.css).
 * I figli in container con testo colorato ereditano anche
 * `color: inherit` (Spectra content/style-index.css), annullando il pannello.
 */
.entry-content :is(h1, h2, h3, h4, h5, h6).wp-block-spectra-content.spectra-text-color,
.entry-content .wp-block-spectra-content.spectra-text-color {
	color: var(--spectra-text-color);
}

/* Territorio — stessa griglia e card del vecchio sito (.bb-territory-*) */
.home .bb-home-destinations-grid,
.home .bb-territory-section .bb-home-destinations-grid {
	display: grid;
	gap: 1.25rem;
	grid-template-columns: 1fr;
}

@media (min-width: 768px) {
	.home .bb-home-destinations-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (min-width: 1024px) {
	.home .bb-home-destinations-grid {
		grid-template-columns: repeat(6, 1fr);
	}

	.home .bb-home-destinations-grid > .wp-block-spectra-container:nth-child(-n + 3) {
		grid-column: span 2;
	}

	.home .bb-home-destinations-grid > .wp-block-spectra-container:nth-child(4) {
		grid-column: 2 / span 2;
	}

	.home .bb-home-destinations-grid > .wp-block-spectra-container:nth-child(5) {
		grid-column: 4 / span 2;
	}
}

.home .bb-home-destination-card.wp-block-spectra-container {
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	aspect-ratio: 4 / 3;
	min-height: 0 !important;
	padding: 0 !important;
	border: 1px solid rgba(37, 39, 37, 0.12);
	border-radius: 20px;
	overflow: hidden;
	box-sizing: border-box;
}

.home .bb-home-destination-card.wp-block-spectra-container:is(:hover, :focus-within) {
	border-color: rgba(37, 39, 37, 0.12);
}

/* Niente velo piatto su tutta la foto: solo gradiente in basso come .bb-territory-caption */
.home .bb-home-destination-card.wp-block-spectra-container::before {
	opacity: 0 !important;
}

.home .bb-home-destination-card::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	pointer-events: none;
	border-radius: inherit;
	background: linear-gradient(0deg, rgba(37, 39, 37, 0.75) 0%, transparent 55%);
}

.home .bb-home-destination-card > .wp-block-spectra-container {
	position: relative;
	z-index: 2;
	width: 100%;
	margin: 0;
	padding: 1.25rem !important;
}

.home .bb-home-destination-card .wp-block-spectra-content {
	margin: 0;
}

.home .bb-home-destination-card h3.wp-block-spectra-content {
	font-size: 1.125rem;
	font-weight: 700;
	line-height: 1.2;
}

.home .bb-home-destination-card p.wp-block-spectra-content {
	margin-top: 0.35rem;
	font-size: 0.95rem;
	line-height: 1.35;
	opacity: 0.95;
}

/* Camere teaser — label sotto foto come il vecchio sito */
.home .bb-home-rooms-grid.bb-rooms-teaser-grid > .wp-block-spectra-container,
.home .bb-home-rooms-grid.bb-rooms-teaser-grid > .bb-home-room-card {
	padding: 0 !important;
	background: var(--bb-white, #fff);
	border: 1px solid var(--bb-gray-200, #e8e2d8);
	border-radius: 20px;
	overflow: hidden;
	box-sizing: border-box;
}

.home .bb-home-rooms-grid.bb-rooms-teaser-grid > .bb-home-room-card:is(:hover, :focus-within) {
	border-color: var(--bb-gray-200, #e8e2d8);
}

.home .bb-home-rooms-grid .bb-home-room-card .wp-block-image,
.home .bb-home-room-card .wp-block-image {
	margin: 0;
}

.home .bb-home-room-card .wp-block-image {
	overflow: hidden;
	border-radius: 20px 20px 0 0;
}

.home .bb-home-room-card .wp-block-image img {
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	display: block;
	border-radius: 0 !important;
}

.home .bb-home-room-card > .wp-block-spectra-container > p.wp-block-spectra-content {
	padding: 0.85rem 1rem 1rem;
	font-weight: 600;
	font-size: 0.95rem;
	text-align: left;
}

.home .bb-home-review-card.bb-review-card {
	border: 1px solid var(--bb-gray-200, #e8e2d8);
}

.home .bb-home-reviews-grid {
	display: grid;
	gap: 1.5rem;
}

@media (min-width: 900px) {
	.home .bb-home-reviews-grid {
		grid-template-columns: repeat(3, 1fr);
	}
}

/* Perks — icone SVG come il vecchio sito (senza blocchi HTML) */
.home .bb-perks-minimal .bb-perk-item {
	text-align: center;
	padding: 0.5rem 0.75rem;
}

.home .bb-perks-minimal .bb-perk-item::before {
	content: "";
	display: block;
	width: 2.5rem;
	height: 2.5rem;
	margin: 0 auto 0.85rem;
	background-color: var(--bb-sage, #78866b);
	mask-position: center;
	mask-repeat: no-repeat;
	mask-size: contain;
	-webkit-mask-position: center;
	-webkit-mask-repeat: no-repeat;
	-webkit-mask-size: contain;
}

.home .bb-perks-grid > .wp-block-spectra-container:nth-child(1) .bb-perk-item::before,
.home .bb-perks-grid > .wp-block-spectra-container:nth-child(1).bb-perk-item::before {
	mask-image: url("../icons/perk-wifi.svg");
	-webkit-mask-image: url("../icons/perk-wifi.svg");
}

.home .bb-perks-grid > .wp-block-spectra-container:nth-child(2) .bb-perk-item::before,
.home .bb-perks-grid > .wp-block-spectra-container:nth-child(2).bb-perk-item::before {
	mask-image: url("../icons/perk-breakfast.svg");
	-webkit-mask-image: url("../icons/perk-breakfast.svg");
}

.home .bb-perks-grid > .wp-block-spectra-container:nth-child(3) .bb-perk-item::before,
.home .bb-perks-grid > .wp-block-spectra-container:nth-child(3).bb-perk-item::before {
	mask-image: url("../icons/perk-ac.svg");
	-webkit-mask-image: url("../icons/perk-ac.svg");
}

.home .bb-perks-grid > .wp-block-spectra-container:nth-child(4) .bb-perk-item::before,
.home .bb-perks-grid > .wp-block-spectra-container:nth-child(4).bb-perk-item::before {
	mask-image: url("../icons/perk-bath.svg");
	-webkit-mask-image: url("../icons/perk-bath.svg");
}

.home .bb-perks-minimal h2.bb-perks-title,
.home .bb-perks-minimal .bb-perks-title {
	text-align: center;
	margin-bottom: 0.5rem;
	font-family: "Source Serif 4", serif;
}

.home .bb-perks-minimal .bb-perks-sub {
	text-align: center;
	margin: 0 auto 2.5rem !important;
	max-width: 28rem;
}

.home .bb-home-benefits-grid {
	display: grid;
	gap: 2rem;
}

@media (min-width: 430px) {
	.home .bb-home-benefits-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (min-width: 1024px) {
	.home .bb-home-benefits-grid {
		grid-template-columns: repeat(4, 1fr);
	}
}

.home .bb-home-rooms-grid {
	display: grid;
	gap: 1.25rem;
}

@media (min-width: 600px) {
	.home .bb-home-rooms-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (min-width: 1024px) {
	.home .bb-home-rooms-grid {
		grid-template-columns: repeat(4, 1fr);
	}
}

.home .entry-content > .wp-block-spectra-container.alignfull,
.home .entry-content > section.wp-block-spectra-container.alignfull {
	margin-left: 0;
	margin-right: 0;
	max-width: none;
}

/* Spectra: padding default 10px → come sezioni premium */
.home .bb-premium-section.wp-block-spectra-container.alignfull,
.home section.bb-territory-section.wp-block-spectra-container,
.home section.bb-home-rooms.wp-block-spectra-container,
.home section.bb-home-story.wp-block-spectra-container {
	padding: var(--bb-section-y, clamp(2rem, 3.2vw, 3.5rem)) 1.5rem !important;
}

.home .bb-territory-section .alignwide,
.home .bb-home-rooms .alignwide,
.home .bb-home-story .alignwide {
	width: 100%;
	max-width: var(--bb-container-wide, min(1400px, calc(100% - 2rem)));
	margin-left: auto;
	margin-right: auto;
}

.home .bb-home-story .alignwide {
	max-width: var(--bb-container, min(1280px, calc(100% - 2.5rem)));
}

/* Story — tipografia come vecchio sito */
.home .bb-home-story .wp-block-spectra-content:first-of-type {
	font-size: 0.75rem !important;
	font-weight: 600;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--bb-sage) !important;
	margin-bottom: 0.75rem;
}

.home .bb-home-story h2.wp-block-spectra-content {
	font-family: "Source Serif 4", var(--global-heading-font-family, serif);
	font-size: clamp(1.85rem, 2.5vw + 0.75rem, 2.75rem);
	font-weight: 600;
	line-height: 1.15;
	color: var(--bb-charcoal);
	margin-bottom: 0.5rem;
}

.home .bb-home-story p.wp-block-spectra-content {
	font-size: 1.05rem;
	line-height: 1.65;
	color: var(--bb-charcoal-muted);
	max-width: 42rem;
}

.home .bb-home-story .bb-story-link a,
.home .bb-home-story a.wp-block-spectra-content {
	font-weight: 600;
	text-decoration: none;
	color: var(--bb-olive-dark);
	border-bottom: 1px solid color-mix(in srgb, var(--bb-sage) 40%, transparent);
}

/* Story (testo + foto): bordo/ombra sul figure — img zooma dentro */
.home .bb-home-story .wp-block-image,
.home .bb-home-story figure.wp-block-image,
.home figure.wp-block-image[data-spectra-id="spectra-mui38qdk-c6tavm"] {
	overflow: hidden;
	border-radius: 20px;
	border: 1px solid rgba(37, 39, 37, 0.08);
	box-shadow: 0 12px 32px rgba(37, 39, 37, 0.1);
	box-sizing: border-box;
}

.home .bb-home-story .wp-block-image:is(:hover, :focus-within),
.home .bb-home-story figure.wp-block-image:is(:hover, :focus-within),
.home figure.wp-block-image[data-spectra-id="spectra-mui38qdk-c6tavm"]:is(:hover, :focus-within) {
	border-color: rgba(37, 39, 37, 0.08);
	box-shadow: 0 12px 32px rgba(37, 39, 37, 0.1);
}

.home .bb-home-story .wp-block-image img,
.home .bb-home-story figure.wp-block-image img,
.home figure.wp-block-image[data-spectra-id="spectra-mui38qdk-c6tavm"] img {
	width: 100%;
	height: auto;
	display: block;
	border: 0 !important;
	border-radius: 0 !important;
}

/* Card camere: solo clip in alto (bordo sulla card esterna) */
.home .bb-home-room-card figure.wp-block-image.is-style-rounded {
	overflow: hidden;
	border-radius: 20px 20px 0 0;
	border: none;
	box-shadow: none;
}

.home .bb-home-room-card figure.wp-block-image.is-style-rounded img {
	border-radius: 0 !important;
}

.home .entry-content figure.wp-block-image.is-style-rounded {
	overflow: hidden;
	border-radius: 20px;
}

.home .entry-content figure.wp-block-image.is-style-rounded img {
	border-radius: 0 !important;
}

/* Camere — eyebrow + titolo */
.home .bb-home-rooms .wp-block-spectra-content.has-78866-b-color,
.home .bb-home-rooms p[style*="78866B"] {
	font-size: 0.75rem !important;
	font-weight: 600;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--bb-sage) !important;
	margin-bottom: 0.5rem;
}

.home .bb-home-rooms h2.wp-block-spectra-content {
	font-family: "Source Serif 4", serif;
	font-size: clamp(1.85rem, 2.5vw + 0.75rem, 2.75rem);
	font-weight: 600;
	margin-bottom: 1.25rem;
	color: var(--bb-charcoal);
}

.home .bb-home-room-card p.wp-block-spectra-content {
	text-transform: uppercase;
	letter-spacing: 0.04em;
	font-size: 0.8rem !important;
}

/* Territorio — eyebrow */
.home .bb-territory-section .wp-block-spectra-content.has-78866-b-color {
	font-size: 0.75rem !important;
	letter-spacing: 0.18em;
	text-transform: uppercase;
}

.home .bb-territory-section h2.wp-block-spectra-content {
	font-family: "Source Serif 4", serif;
	font-size: clamp(1.85rem, 2.5vw + 0.75rem, 2.75rem);
	margin-bottom: 1.25rem;
}

/* Hover foto territorio → bb-image-hover.css */
.home .bb-home-destination-card {
	background-size: cover !important;
	background-position: center !important;
}

/* CTA HTML full bleed attaccata al footer */
.home .entry-content > .wp-block-html:last-child .bb-cta-band {
	width: 100%;
}

/* CTA Spectra — stesso overlay del vecchio .bb-cta-band */
.home .bb-home-final-cta.bb-cta-band.wp-block-spectra-container {
	position: relative;
	text-align: center;
	color: #fff;
}

.home .bb-home-final-cta.bb-cta-band.wp-block-spectra-container::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	pointer-events: none;
	background: linear-gradient(135deg, rgba(70, 80, 68, 0.82), rgba(37, 39, 37, 0.55));
}

.home .bb-home-final-cta.bb-cta-band > .wp-block-spectra-container {
	position: relative;
	z-index: 2;
}

.home .bb-home-final-cta .wp-block-spectra-button .wp-block-button__link,
.home .bb-home-final-cta .spectra-button__link {
	background: var(--bb-sand) !important;
	color: var(--bb-charcoal) !important;
	border-radius: 8px !important;
	text-transform: uppercase;
	font-weight: 600;
	letter-spacing: 0.06em;
	padding: 1rem 2rem !important;
}
