/*
 * Hacienda Selva Alta — оформление контента страниц (вместо Elementor).
 * Действует только на страницах с разметкой плагина: класс .hsa-page у <body>.
 * Иконки — Feather Icons (MIT), шрифт заголовков — Merriweather (SIL OFL 1.1, см. fonts/OFL.txt).
 */

@font-face {
	font-family: "HSA Merriweather";
	src: url("fonts/merriweather-700.woff2") format("woff2");
	font-weight: 700;
	font-style: normal;
	font-display: swap;
}

.hsa-page {
	--hsa-green: #1f7a45;
	--hsa-green-dark: #155c33;
	--hsa-green-bright: #3fae63;
	--hsa-leaf: #eef5ec;
	--hsa-leaf-line: #d5e7d3;
	--hsa-text: #1f1e1c;
	--hsa-muted: #57534d;
	--hsa-radius: 14px;
	--hsa-serif: "HSA Merriweather", Georgia, "Times New Roman", serif;
}

/* ---------- Типографика ---------- */

.hsa-page .entry-content {
	color: var(--hsa-text);
	font-size: 17px;
	line-height: 1.7;
}

.hsa-page .entry-content p {
	margin-top: 0;
	margin-bottom: 1.1em;
}

/* Классическая тема оборачивает содержимое группы в .wp-block-group__inner-container — для сеток он прозрачен. */
.hsa-page .entry-content :is(.hsa-facts, .hsa-fact, .hsa-cta) > .wp-block-group__inner-container {
	display: contents;
}

/* Текст — колонкой удобной ширины, фото, карта и линии под заголовками — на всю ширину контента. */
@media (min-width: 992px) {
	.hsa-page .entry-content > :is(p, ul, .wp-block-buttons, .hsa-facts) {
		max-width: 800px;
		margin-left: auto;
		margin-right: auto;
	}
}

.hsa-page .entry-content h2.wp-block-heading,
.hsa-page .entry-content h3.wp-block-heading {
	font-family: var(--hsa-serif);
	font-weight: 700;
	color: var(--hsa-green);
	line-height: 1.25;
	letter-spacing: -0.005em;
}

.hsa-page .entry-content h2.wp-block-heading {
	font-size: clamp(1.5rem, 1.05rem + 1.5vw, 2.05rem);
	margin-top: clamp(2.2rem, 1.4rem + 3vw, 3.6rem);
	margin-bottom: 0.8em;
	scroll-margin-top: 72px;
}

/* Заголовки разделов делят страницу: одна линия на всю ширину контента. */
.hsa-page .entry-content > h2.wp-block-heading {
	padding-bottom: 0.5em;
	border-bottom: 1px solid var(--hsa-leaf-line);
}

@media (min-width: 992px) {
	.hsa-page .entry-content > h2.wp-block-heading {
		padding-right: calc((100% - 800px) / 2);
		padding-left: calc((100% - 800px) / 2);
	}
}

.hsa-page .entry-content h3.wp-block-heading {
	font-size: 1.2rem;
	margin: 0 0 0.35em;
}

.hsa-page .entry-content a:where(:not(.wp-block-button__link):not(.hsa-slideshow__thumb)) {
	color: var(--hsa-green);
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.18em;
}

.hsa-page .entry-content a:where(:not(.wp-block-button__link):not(.hsa-slideshow__thumb)):hover {
	color: var(--hsa-green-dark);
	text-decoration-thickness: 2px;
}

.hsa-page .entry-content p.hsa-lead {
	font-size: clamp(1.13rem, 1rem + 0.45vw, 1.32rem);
	line-height: 1.6;
	color: #22201d;
	margin-bottom: 1.2em;
}

/* Заголовок поверх hero и заголовок страницы без hero — тем же шрифтом, что и заголовки разделов. */
.hsa-page .entry-image__title h1,
.hsa-page .entry-header .entry-title {
	font-family: var(--hsa-serif);
	font-weight: 700;
	letter-spacing: -0.005em;
	line-height: 1.25;
}

.hsa-page .entry-image--big img {
	width: 100%;
}

/* ---------- Ключевые факты ---------- */

.hsa-page .entry-content .hsa-facts {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 12px;
	margin-top: 1.6em;
	margin-bottom: 1.4em;
}

.hsa-page .entry-content .hsa-fact {
	padding: 16px 18px 15px;
	border: 1px solid var(--hsa-leaf-line);
	border-radius: var(--hsa-radius);
	background: var(--hsa-leaf);
	text-align: center;
}

.hsa-page .entry-content .hsa-fact p {
	margin: 0;
}

.hsa-page .entry-content p.hsa-fact__value {
	font-family: var(--hsa-serif);
	font-weight: 700;
	font-size: clamp(1.5rem, 1.1rem + 1.2vw, 2rem);
	line-height: 1.15;
	color: var(--hsa-green);
	white-space: nowrap;
}

.hsa-page .entry-content p.hsa-fact__label {
	margin-top: 6px;
	font-size: 15px;
	line-height: 1.4;
	color: var(--hsa-muted);
}

/* ---------- Кнопки ---------- */

.hsa-page .entry-content .wp-block-buttons.hsa-buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-top: 1.4em;
	margin-bottom: 1.8em;
}

.hsa-page .entry-content .wp-block-buttons.hsa-buttons.is-content-justification-center,
.hsa-page .entry-content .hsa-facts + .wp-block-buttons {
	justify-content: center;
}

.hsa-page .entry-content .hsa-btn .wp-block-button__link {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	min-height: 48px;
	padding: 12px 24px;
	border: 2px solid var(--hsa-green);
	border-radius: 999px;
	background: var(--hsa-green);
	color: #fff;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.2;
	text-decoration: none;
	box-shadow: 0 1px 2px rgb(0 0 0 / 0.12);
	transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}

.hsa-page .entry-content .hsa-btn .wp-block-button__link:hover,
.hsa-page .entry-content .hsa-btn .wp-block-button__link:focus-visible {
	border-color: var(--hsa-green-dark);
	background: var(--hsa-green-dark);
	color: #fff;
}

.hsa-page .entry-content .hsa-btn-outline .wp-block-button__link {
	background: #fff;
	color: var(--hsa-green);
	box-shadow: none;
}

.hsa-page .entry-content .hsa-btn-outline .wp-block-button__link:hover,
.hsa-page .entry-content .hsa-btn-outline .wp-block-button__link:focus-visible {
	background: var(--hsa-leaf);
	color: var(--hsa-green-dark);
}

.hsa-page .entry-content .hsa-btn .wp-block-button__link:focus-visible {
	outline: 3px solid #f2b705;
	outline-offset: 2px;
}

.hsa-page .entry-content .hsa-btn[class*="hsa-icon-"] .wp-block-button__link::before {
	content: "";
	flex: 0 0 auto;
	width: 20px;
	height: 20px;
	background: currentColor;
	-webkit-mask: var(--hsa-icon) center / contain no-repeat;
	mask: var(--hsa-icon) center / contain no-repeat;
}

/* ---------- Иконки (Feather Icons, MIT) ---------- */

.hsa-page {
	--hsa-i-instagram: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2.5' y='2.5' width='19' height='19' rx='5.5'/%3E%3Ccircle cx='12' cy='12' r='4.2'/%3E%3Ccircle cx='17.6' cy='6.4' r='.6' fill='%23000'/%3E%3C/svg%3E");
	--hsa-i-chat: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 11.5a8.4 8.4 0 0 1-.9 3.8 8.5 8.5 0 0 1-7.6 4.7 8.4 8.4 0 0 1-3.8-.9L3 21l1.9-5.7a8.4 8.4 0 0 1-.9-3.8 8.5 8.5 0 0 1 4.7-7.6 8.4 8.4 0 0 1 3.8-.9h.5a8.5 8.5 0 0 1 8 8z'/%3E%3C/svg%3E");
	--hsa-check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='12' fill='%23e1f0df'/%3E%3Cpath d='m10.1 15.8-3.7-3.7 1.4-1.4 2.3 2.3 5.9-5.9 1.4 1.4z' fill='%231f7a45'/%3E%3C/svg%3E");
}

.hsa-page .hsa-icon-instagram { --hsa-icon: var(--hsa-i-instagram); }
.hsa-page .hsa-icon-chat { --hsa-icon: var(--hsa-i-chat); }

/* ---------- Списки с галочками (перекрывают маркеры и отступы темы) ---------- */

.hsa-page .entry-content ul.hsa-checklist {
	margin-top: 0.6em;
	margin-bottom: 1.6em;
	padding: 0;
	list-style: none;
}

.hsa-page .entry-content ul.hsa-checklist > li {
	position: relative;
	margin: 0 0 0.55em;
	padding: 0 0 0 34px;
	break-inside: avoid;
}

.hsa-page .entry-content ul.hsa-checklist > li::before {
	content: "";
	position: absolute;
	top: 0.2em;
	left: 0;
	display: block;
	width: 22px;
	height: 22px;
	margin: 0;
	background: var(--hsa-check) center / contain no-repeat;
}

@media (min-width: 768px) {
	.hsa-page .entry-content ul.hsa-checklist-cols {
		columns: 2;
		column-gap: 40px;
	}
}

/* ---------- Карта ---------- */

.hsa-page .entry-content .hsa-map {
	position: relative;
	height: clamp(280px, 42vw, 440px);
	margin: 1em 0 0.4em;
	overflow: hidden;
	border-radius: var(--hsa-radius);
	background: #e8eee6;
}

.hsa-page .entry-content .hsa-map iframe {
	display: block;
	width: 100%;
	height: 100%;
	border: 0;
}

/* ---------- Финальный блок бронирования ---------- */

.hsa-page .entry-content .hsa-cta {
	margin: clamp(2.4rem, 1.6rem + 3vw, 4rem) 0 0.5rem;
	padding: clamp(26px, 4vw, 44px) clamp(18px, 4vw, 48px);
	border: 1px solid var(--hsa-leaf-line);
	border-radius: 20px;
	background: var(--hsa-leaf);
	text-align: center;
}

.hsa-page .entry-content .hsa-cta h2.wp-block-heading {
	margin-top: 0;
}

.hsa-page .entry-content .hsa-cta h2.wp-block-heading::after {
	content: "";
	display: block;
	width: 56px;
	height: 3px;
	margin: 0.5em auto 0;
	border-radius: 2px;
	background: var(--hsa-green-bright);
}

.hsa-page .entry-content .hsa-cta p {
	max-width: 36em;
	margin-inline: auto;
}

.hsa-page .entry-content .hsa-cta .wp-block-buttons.hsa-buttons {
	margin-bottom: 0;
}

@media (max-width: 767px) {
	.hsa-page .entry-content .hsa-facts {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 479px) {
	.hsa-page .entry-content .hsa-fact {
		padding: 14px 14px 13px;
	}
}

/* ---------- Шапка: переключатель языка ---------- */

/* Языки — пункты «ES» и «EN» верхнего меню темы; полоса главного меню и гамбургер не нужны. */
.hsa-page #site-navigation,
.hsa-page .mob-hamburger {
	display: none;
}

.hsa-page .top-menu {
	display: block;
}

.hsa-page .top-menu ul {
	display: inline-flex;
	gap: 2px;
	padding: 3px;
	border: 1px solid var(--hsa-leaf-line);
	border-radius: 999px;
	background: #fff;
}

.hsa-page .top-menu ul li {
	margin: 0;
}

.hsa-page .top-menu ul li > a,
.hsa-page .top-menu ul li > .removed-link {
	display: block;
	min-width: 44px;
	padding: 8px 12px;
	border: 0;
	border-radius: 999px;
	color: var(--hsa-green);
	font-size: 15px;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: 0.04em;
	text-align: center;
	text-decoration: none;
}

.hsa-page .top-menu ul li > a:hover,
.hsa-page .top-menu ul li > a:focus-visible {
	border: 0;
	background: var(--hsa-leaf);
	color: var(--hsa-green-dark);
}

.hsa-page .top-menu ul li > a:focus-visible {
	outline: 3px solid #f2b705;
	outline-offset: 1px;
}

.hsa-page .top-menu ul li.current-menu-item > :is(a, .removed-link) {
	background: var(--hsa-green);
	color: #fff;
}

/* На телефоне — в одном ряду с логотипом, на месте гамбургера темы; соцкнопки — вторым рядом.
   Логотип занимает остаток ряда при любой ширине экрана (у темы до 376 px он всего 80 px). */
@media (max-width: 991px) {
	.hsa-page .site-header-inner {
		flex-flow: row wrap;
		align-items: center;
	}

	.hsa-page .site-branding {
		flex: 1 1 0;
		min-width: 0;
		padding-right: 16px;
	}

	.hsa-page .site-logotype img {
		max-width: min(276px, 100%);
		vertical-align: top;
	}

	.hsa-page .top-menu {
		flex: none;
	}

	.hsa-page .social-links {
		flex-basis: 100%;
		order: 1;
	}

	.hsa-page .top-menu ul li > a,
	.hsa-page .top-menu ul li > .removed-link {
		min-width: 38px;
		padding: 7px 9px;
		font-size: 14px;
	}
}

/* ---------- Слайдшоу ---------- */

.hsa-slideshow {
	--hsa-ratio: 1200 / 795;
	margin: 1.8em 0 2.2em;
}

.hsa-slideshow__stage {
	position: relative;
	overflow: hidden;
	border-radius: var(--hsa-radius, 14px);
	background: #f1eee8;
}

.hsa-slideshow__track {
	display: flex;
	width: 100%;
	overflow-x: auto;
	overflow-y: hidden;
	aspect-ratio: var(--hsa-ratio);
	max-height: min(690px, 76vh);
	scroll-snap-type: x mandatory;
	overscroll-behavior-x: contain;
	scrollbar-width: none;
	outline: none;
}

.hsa-slideshow__track::-webkit-scrollbar {
	display: none;
}

.hsa-slideshow__track:focus-visible {
	box-shadow: inset 0 0 0 3px #f2b705;
}

.hsa-page .entry-content .hsa-slideshow__slide,
.hsa-slideshow__slide {
	display: flex;
	flex: 0 0 100%;
	align-items: center;
	justify-content: center;
	margin: 0;
	scroll-snap-align: center;
	scroll-snap-stop: always;
}

.hsa-slideshow__slide picture {
	display: block;
	width: 100%;
	height: 100%;
}

.hsa-slideshow__slide img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.hsa-slideshow__btn {
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgb(255 255 255 / 0.92);
	color: #1f1e1c;
	box-shadow: 0 2px 8px rgb(0 0 0 / 0.25);
	cursor: pointer;
	transition: background-color 0.2s, transform 0.2s;
}

.hsa-slideshow__btn svg {
	fill: currentColor;
}

.hsa-slideshow__btn:hover {
	background: #fff;
}

.hsa-slideshow__btn:focus-visible {
	outline: 3px solid #f2b705;
	outline-offset: 2px;
}

.hsa-slideshow__btn--prev,
.hsa-slideshow__btn--next {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
}

.hsa-slideshow__btn--prev {
	left: 12px;
}

.hsa-slideshow__btn--next {
	right: 12px;
}

.hsa-slideshow__bar {
	position: absolute;
	right: 12px;
	bottom: 12px;
	display: flex;
	align-items: center;
	gap: 2px;
	padding: 3px 3px 3px 12px;
	border-radius: 999px;
	background: rgb(20 20 18 / 0.62);
	color: #fff;
	font-size: 14px;
	line-height: 1;
	font-variant-numeric: tabular-nums;
}

.hsa-slideshow__counter {
	margin-right: 4px;
}

.hsa-slideshow__bar .hsa-slideshow__btn {
	width: 34px;
	height: 34px;
	background: transparent;
	color: #fff;
	box-shadow: none;
}

.hsa-slideshow__bar .hsa-slideshow__btn:hover {
	background: rgb(255 255 255 / 0.16);
}

.hsa-slideshow__bar .hsa-slideshow__btn svg {
	width: 20px;
	height: 20px;
}

.hsa-slideshow__btn--toggle .hsa-i-play,
.hsa-slideshow__btn--toggle.is-paused .hsa-i-pause {
	display: none;
}

.hsa-slideshow__btn--toggle.is-paused .hsa-i-play {
	display: block;
}

.hsa-slideshow:not(.is-ready) .hsa-slideshow__btn,
.hsa-slideshow:not(.is-ready) .hsa-slideshow__bar,
.hsa-slideshow.is-single .hsa-slideshow__btn--prev,
.hsa-slideshow.is-single .hsa-slideshow__btn--next,
.hsa-slideshow.is-single .hsa-slideshow__thumbs {
	display: none;
}

.hsa-slideshow__thumbs {
	position: relative;
	display: flex;
	gap: 8px;
	margin-top: 10px;
	padding: 2px 2px 6px;
	overflow-x: auto;
	scroll-snap-type: x proximity;
	scrollbar-width: thin;
	scrollbar-color: #c9c4ba transparent;
}

.hsa-page .entry-content a.hsa-slideshow__thumb,
.hsa-slideshow__thumb {
	position: relative;
	flex: 0 0 auto;
	display: block;
	width: 120px;
	aspect-ratio: 3 / 2;
	overflow: hidden;
	border-radius: 8px;
	background: #e9e5dd;
	opacity: 0.62;
	scroll-snap-align: start;
	text-decoration: none;
	box-shadow: none;
	transition: opacity 0.2s;
}

.hsa-slideshow__thumb picture,
.hsa-slideshow__thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.hsa-slideshow__thumb:hover,
.hsa-slideshow__thumb:focus-visible,
.hsa-slideshow__thumb[aria-current="true"] {
	opacity: 1;
}

.hsa-slideshow__thumb[aria-current="true"]::after {
	content: "";
	position: absolute;
	inset: 0;
	border: 3px solid var(--hsa-green, #1f7a45);
	border-radius: 8px;
}

.hsa-slideshow__thumb:focus-visible {
	outline: 3px solid #f2b705;
	outline-offset: -3px;
}

@media (max-width: 575px) {
	.hsa-slideshow__btn--prev,
	.hsa-slideshow__btn--next {
		width: 38px;
		height: 38px;
	}

	.hsa-slideshow__btn--prev {
		left: 8px;
	}

	.hsa-slideshow__btn--next {
		right: 8px;
	}

	.hsa-slideshow__bar {
		right: 8px;
		bottom: 8px;
		font-size: 13px;
	}

	.hsa-page .entry-content a.hsa-slideshow__thumb,
	.hsa-slideshow__thumb {
		width: 84px;
	}
}

/* Полноэкранный режим */
.hsa-slideshow:fullscreen {
	display: flex;
	flex-direction: column;
	margin: 0;
	padding: 12px;
	background: #111;
}

.hsa-slideshow:fullscreen .hsa-slideshow__stage {
	flex: 1 1 auto;
	min-height: 0;
	border-radius: 0;
	background: #111;
}

.hsa-slideshow:fullscreen .hsa-slideshow__track {
	height: 100%;
	max-height: none;
	aspect-ratio: auto;
}

.hsa-slideshow:fullscreen .hsa-slideshow__thumbs {
	flex: 0 0 auto;
	justify-content: safe center;
	scrollbar-color: #555 transparent;
}

.hsa-slideshow::backdrop {
	background: #111;
}

@media (prefers-reduced-motion: reduce) {
	.hsa-slideshow__btn,
	.hsa-slideshow__thumb,
	.hsa-page .entry-content .hsa-btn .wp-block-button__link {
		transition: none;
	}
}
