/*
 * Home page, matched to the Lovable prototype (discover-ua.lovable.app).
 * Tokens (--ds-*) and the .ds base come from design.css.
 */

.hp-head {
	display: flex;
	flex-direction: column;
	gap: 1.25rem;
	margin-bottom: 2.5rem;
}

.hp-head__text {
	max-width: 42rem;
}

.hp-more {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	flex-shrink: 0;
	font-size: 0.9375em;
	font-weight: 600;
	color: var(--ds-primary);
}

@media (min-width: 768px) {
	.hp-head {
		flex-direction: row;
		align-items: flex-end;
		justify-content: space-between;
	}
}

/* Icons from assets/img, tinted via mask with currentColor */
.hp-ico {
	display: inline-block;
	flex-shrink: 0;
	width: 16px;
	height: 16px;
	background-color: currentColor;
	-webkit-mask: center / contain no-repeat;
	mask: center / contain no-repeat;
}

.hp-ico--arrow {
	width: 14px;
	height: 14px;
	-webkit-mask-image: url(../img/lucide/arrow-right.svg);
	mask-image: url(../img/lucide/arrow-right.svg);
}

.hp-ico--link {
	width: 18px;
	height: 18px;
	-webkit-mask-image: url(../img/lucide/arrow-up-right.svg);
	mask-image: url(../img/lucide/arrow-up-right.svg);
}

.hp-ico--search {
	width: 18px;
	height: 18px;
	-webkit-mask-image: url(../img/lucide/search.svg);
	mask-image: url(../img/lucide/search.svg);
}

.hp-ico--date {
	width: 14px;
	height: 14px;
	-webkit-mask-image: url(../img/lucide/calendar-days.svg);
	mask-image: url(../img/lucide/calendar-days.svg);
}

.hp-ico--compass {
	width: 24px;
	height: 24px;
	-webkit-mask-image: url(../img/lucide/compass.svg);
	mask-image: url(../img/lucide/compass.svg);
}

.hp-ico--map {
	width: 24px;
	height: 24px;
	-webkit-mask-image: url(../img/lucide/map.svg);
	mask-image: url(../img/lucide/map.svg);
}


.hp-ico--chevron {
	width: 12px;
	height: 12px;
	-webkit-mask-image: url(../img/lucide/chevron-down.svg);
	mask-image: url(../img/lucide/chevron-down.svg);
	transition: transform 0.25s;
}

/* Buttons */
.hp-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	padding: calc(0.875rem + 1px) 1.75rem calc(0.875rem - 1px);
	border: 0;
	border-radius: var(--ds-radius-md);
	background-color: var(--ds-primary);
	color: var(--ds-primary-foreground);
	font-family: var(--ds-font-sans);
	font-size: 1em;
	font-weight: 600;
	line-height: 1.5;
	cursor: pointer;
	transition: background-color var(--ds-transition);
}

.hp a.hp-btn {
	color: var(--ds-primary-foreground);
}

.hp-btn:hover {
	background-color: var(--ds-primary-hover);
}

.hp-btn--sm {
	padding: calc(0.75rem + 1px) 1.25rem calc(0.75rem - 1px);
	font-size: 0.875em;
}

/* Cards */
.hp-card {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	border-radius: var(--ds-radius);
	background-color: var(--ds-card);
	box-shadow: var(--ds-shadow-card);
	color: var(--ds-foreground);
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hp-card img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.5s ease;
}

/* ---------- Hero ---------- */

.hp-hero {
	position: relative;
	isolation: isolate;
	display: flex;
	align-items: center;
	min-height: 39rem;
	overflow: hidden;
	text-align: center;
	color: #fff;
}

.hp-hero__bg,
.hp-hero__bg img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
}

.hp-hero__bg img {
	object-fit: cover;
}

.hp-hero::before {
	content: '';
	position: absolute;
	inset: 0;
	z-index: 1;
	background: linear-gradient(180deg, rgba(18, 32, 70, 0.65) 0%, rgba(18, 32, 70, 0.3) 50%, rgba(18, 32, 70, 0.7) 100%);
}

.hp-hero__content {
	z-index: 2;
	display: flex;
	flex-direction: column;
	align-items: center;
	padding-top: 7rem;
	padding-bottom: 5rem;
}

.hp-hero .hp-eyebrow--light {
	margin-bottom: 1.25rem;
	color: rgba(255, 255, 255, 0.75);
	font-size: 0.875em;
	letter-spacing: 0.14em;
}

.hp .hp-hero__title {
	max-width: 56rem;
	font-family: var(--ds-font-display);
	letter-spacing: var(--ds-heading-tracking);
	font-size: 2.25em;
	font-weight: 600;
	line-height: 1.11;
	color: #fff;
}

.hp-hero__text {
	max-width: 36rem;
	margin-top: 1.5rem;
	font-size: 1em;
	line-height: 1.625;
	color: rgba(255, 255, 255, 0.85);
}

/* Search: translucent frame with a white field and the primary button */
.hp-search {
	display: flex;
	flex-direction: column;
	gap: 0.625rem;
	width: 100%;
	max-width: 42rem;
	margin-top: 2.25rem;
	padding: 0.5rem;
	border-radius: var(--ds-radius);
	background-color: rgba(255, 255, 255, 0.15);
	-webkit-backdrop-filter: blur(12px);
	backdrop-filter: blur(12px);
}

.hp-search__field {
	flex: 1;
	display: flex;
	align-items: center;
	gap: 0.75rem;
	margin: 0;
	padding: 0.875rem 1.25rem;
	border-radius: var(--ds-radius-md);
	background-color: var(--ds-card);
	box-shadow: var(--ds-shadow-card);
	color: var(--ds-muted-foreground);
}

.hp-search__field input {
	flex: 1;
	width: 100%;
	min-width: 0;
	padding: 0;
	border: 0;
	outline: none;
	background: transparent;
	font-family: inherit;
	font-size: 1em;
	line-height: 1.5;
	color: var(--ds-ink);
}

.hp-search__field input::placeholder {
	color: var(--ds-muted-foreground);
}

.hp-hero__caption {
	position: absolute;
	right: 1.25rem;
	bottom: 1.25rem;
	z-index: 2;
	display: none;
	font-size: 0.875em;
	color: rgba(255, 255, 255, 0.7);
	transition: color var(--ds-transition);
}

.hp-hero__caption:hover {
	color: #fff;
}

@media (min-width: 640px) {
	.hp .hp-hero__title {
		font-size: 3em;
		line-height: 1;
	}

	.hp-search {
		flex-direction: row;
	}
}

@media (min-width: 768px) {
	.hp-hero {
		min-height: 43rem;
	}

	.hp-hero__content {
		padding-top: 8rem;
	}

	.hp .hp-hero__title {
		font-size: 3.75em;
	}

	.hp-hero__text {
		font-size: 1.125em;
	}

	.hp-hero__caption {
		display: block;
	}
}

/* ---------- Popular destinations ---------- */

.hp-destinations {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.75rem;
}

.hp-dest:not(.hp-dest--all):hover {
	transform: translateY(-4px);
	box-shadow: var(--ds-shadow-card-hover);
}

.hp-dest:hover img {
	transform: scale(1.04);
}

/* Lovable: leading-relaxed here, the other sections use 1.7 */
.hp-section--dest .hp-lead {
	line-height: 1.625;
}

.hp-dest__img {
	aspect-ratio: 4 / 3;
	overflow: hidden;
}

.hp-dest__name {
	padding: 1rem;
	font-family: var(--ds-font-display);
	letter-spacing: var(--ds-heading-tracking);
	font-size: 1em;
	font-weight: 600;
	line-height: 1.5;
	color: var(--ds-ink);
}

.hp .hp-dest--all {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 1rem;
	aspect-ratio: 4 / 3;
	padding: 1.25rem;
	border-radius: var(--ds-radius);
	background-color: var(--ds-primary);
	box-shadow: var(--ds-shadow-card);
	color: var(--ds-primary-foreground);
	font-family: var(--ds-font-display);
	letter-spacing: var(--ds-heading-tracking);
	font-size: 1.125em;
	font-weight: 600;
	line-height: 1.2;
	transition: background-color var(--ds-transition);
}

.hp .hp-dest--all:hover {
	background-color: var(--ds-primary-hover);
}

.hp-dest--all .hp-ico--arrow {
	width: 18px;
	height: 18px;
	margin-bottom: 2px;
	transition: transform var(--ds-transition);
}

.hp-dest--all:hover .hp-ico--arrow {
	transform: translateX(4px);
}

@media (min-width: 768px) {
	.hp-destinations {
		grid-template-columns: repeat(4, minmax(0, 1fr));
		gap: 1.25rem;
	}

	.hp-dest__name {
		font-size: 1.125em;
		line-height: 1.5556;
	}

	.hp .hp-dest--all {
		aspect-ratio: auto;
		height: 100%;
		font-size: 1.25em;
	}
}

/* ---------- About project ("Мандруй!") ---------- */

.hp-about {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	padding-block: var(--ds-section);
	color: #fff;
}

.hp-about__bg {
	position: absolute;
	inset: 0;
	z-index: -1;
}

.hp-about__bg img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.hp-about::before {
	content: '';
	position: absolute;
	inset: 0;
	z-index: 0;
	background-color: rgba(18, 32, 70, 0.78);
}

.hp-about__inner {
	z-index: 1;
}

.hp-about__head {
	max-width: 42rem;
	margin-inline: auto;
	text-align: center;
}

.hp-about .hp-eyebrow--light {
	color: rgba(255, 255, 255, 0.6);
	font-size: 0.875em;
	letter-spacing: 0.14em;
}

.hp .hp-title--light {
	font-size: 1.875em;
	line-height: 1.2;
	color: #fff;
}

.hp .hp-lead--light {
	margin-inline: auto;
	color: rgba(255, 255, 255, 0.8);
}

.hp-about__list {
	display: grid;
	gap: 1rem;
	margin-top: 3rem;
}

.hp-about__item {
	display: flex;
	flex-direction: column;
	align-items: center;
	height: 100%;
	padding: 1.75rem;
	border-radius: var(--ds-radius);
	background-color: rgba(255, 255, 255, 0.08);
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.15);
	-webkit-backdrop-filter: blur(12px);
	backdrop-filter: blur(12px);
	text-align: center;
	color: #fff;
	transition: background-color 0.3s ease;
}

.hp-about__item:hover {
	background-color: rgba(255, 255, 255, 0.14);
}

.hp-about__icon {
	width: 80px;
	height: 80px;
}

.hp .hp-about__title {
	display: flex;
	align-items: flex-start;
	justify-content: center;
	gap: 0.75rem;
	margin-top: 1.5rem;
	font-family: var(--ds-font-display);
	letter-spacing: var(--ds-heading-tracking);
	font-size: 1.25em;
	font-weight: 600;
	line-height: 1.4;
	color: #fff;
}

.hp-about__title .hp-ico--link {
	width: 18px;
	height: 18px;
	margin-top: 4px;
	color: rgba(255, 255, 255, 0.6);
	transition: transform 0.3s ease;
}

.hp-about__item:hover .hp-ico--link {
	transform: translate(2px, -2px);
}

.hp-about__text {
	margin-top: 0.75rem;
	font-size: 1em;
	line-height: 1.625;
	color: rgba(255, 255, 255, 0.75);
}

@media (min-width: 768px) {
	.hp .hp-title--light {
		font-size: 3em;
		line-height: 1;
	}

	.hp-about__list {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 1.25rem;
		margin-top: 3.5rem;
	}

	.hp-about__item {
		padding: 2rem;
	}
}

/* ---------- Popular trips (card styles: components.css) ---------- */

.hp-trips {
	display: grid;
	gap: 1.25rem;
}

@media (min-width: 768px) {
	.hp-trips {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

/* ---------- Blog ---------- */

.hp-blog {
	display: grid;
	gap: 1.25rem;
}

.hp-post:hover img {
	transform: scale(1.03);
}

.hp-post__img {
	aspect-ratio: 4 / 3;
	overflow: hidden;
}

.hp-post--featured .hp-post__img {
	aspect-ratio: 16 / 9;
}

.hp-post__body {
	flex: 1;
	display: flex;
	flex-direction: column;
	padding: 1.25rem;
}

.hp-post__date {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	font-size: 0.75em;
	font-weight: 500;
	line-height: 1.3333;
	color: var(--ds-ink-soft);
}

.hp-post__title {
	margin-top: 0.75rem;
	font-family: var(--ds-font-display);
	letter-spacing: var(--ds-heading-tracking);
	font-size: 1.125em;
	font-weight: 600;
	line-height: 1.5556;
	color: var(--ds-ink);
	transition: color var(--ds-transition);
}

.hp-post--featured .hp-post__title {
	font-size: 1.5em;
	line-height: 1.3333;
}

.hp-card:hover .hp-post__title {
	color: var(--ds-primary);
}

.hp-post__more {
	margin-top: auto;
	padding-top: 1.25rem;
	font-size: 0.875em;
	font-weight: 600;
	line-height: 1.4286;
	color: var(--ds-primary);
}

@media (min-width: 768px) {
	.hp-blog {
		grid-template-columns: repeat(12, minmax(0, 1fr));
	}

	.hp-blog .hp-post {
		grid-column: span 3;
	}

	.hp-blog .hp-post--featured {
		grid-column: span 6;
	}
}

/* ---------- SEO text ("Мандруй Україною") ---------- */

.hp-seo__grid {
	display: grid;
	gap: 2.5rem;
	align-items: start;
}

.hp-seo__badge {
	display: grid;
	place-items: center;
	width: 48px;
	height: 48px;
	border-radius: var(--ds-radius);
	background-color: var(--ds-accent);
}

.hp-seo__badge {
	color: var(--ds-primary);
}

.hp-seo__intro .hp-eyebrow {
	margin-top: 1.75rem;
}

.hp-seo__intro .hp-lead {
	margin-top: 1.25rem;
}

.hp-seo__intro .hp-btn {
	margin-top: 1.75rem;
}

/* Target collapsed height for the mobile "read more"; JS adjusts the real cut into --hp-seo-clip */
.hp-seo {
	--hp-seo-collapsed: 280px;
}

.hp-seo__content {
	font-size: 1em;
	line-height: 1.625;
	color: var(--ds-ink-soft);
}

.hp-seo__text {
	position: relative;
	column-count: 2;
	column-gap: 1.75rem;
}

.hp-seo__content p {
	margin: 0 0 1.75rem;
}

.hp-seo__content a {
	color: var(--ds-primary);
}

.hp-seo__content h2,
.hp-seo__content h3 {
	margin: 0 0 0.75rem;
	font-family: var(--ds-font-display);
	letter-spacing: var(--ds-heading-tracking);
	font-size: 1.125em;
	font-weight: 600;
	color: var(--ds-ink);
}

.hp .hp-seo__card {
	display: flex;
	flex-direction: column;
	gap: 1rem;
	padding: 1.5rem;
	border: 1px solid var(--ds-border);
	border-radius: var(--ds-radius);
	background-color: var(--ds-surface);
	color: var(--ds-ink);
	font-weight: 500;
	break-inside: avoid;
}

/* Phones: the copy below the collapsible text, so it stays visible when the text is cut */
.hp .hp-seo__card--below {
	display: none;
	margin-top: 1.75rem;
}

.hp-seo__card .hp-ico {
	color: var(--ds-primary);
}

/* "Read more": collapse only when the text is a single column */
.hp-seo.is-collapsible .hp-seo__text {
	overflow: hidden;
}

.hp-seo.is-collapsible .hp-seo__text::after {
	content: '';
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 80px;
	background: linear-gradient(180deg, rgba(254, 253, 250, 0) 0%, var(--ds-background) 100%);
	pointer-events: none;
	opacity: 1;
	transition: opacity 0.4s ease;
}

.hp-seo.is-open .hp-seo__text::after {
	opacity: 0;
}

.hp-seo.is-collapsible:not(.is-open) .hp-seo__text {
	height: var(--hp-seo-clip, var(--hp-seo-collapsed));
}

.hp-seo__toggle {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	margin-top: 0.25rem;
	padding: 0;
	border: 0;
	background: none;
	font-family: inherit;
	font-size: 0.9375em;
	font-weight: 600;
	color: var(--ds-primary);
	cursor: pointer;
}

.hp-seo__toggle[hidden] {
	display: none;
}

.hp-seo__toggle-less,
.hp-seo.is-open .hp-seo__toggle-more {
	display: none;
}

.hp-seo.is-open .hp-seo__toggle-less {
	display: inline;
}

.hp-seo.is-open .hp-ico--compass {
	width: 24px;
	height: 24px;
	-webkit-mask-image: url(../img/lucide/compass.svg);
	mask-image: url(../img/lucide/compass.svg);
}

.hp-ico--map {
	width: 24px;
	height: 24px;
	-webkit-mask-image: url(../img/lucide/map.svg);
	mask-image: url(../img/lucide/map.svg);
}


.hp-ico--chevron {
	transform: rotate(180deg);
}

@media (min-width: 1024px) {
	.hp-seo__grid {
		grid-template-columns: 0.8fr 1.2fr;
		gap: 5rem;
	}

	.hp-seo__intro {
		position: sticky;
		top: 7rem;
	}
}

/* ---------- Small screens ---------- */

@media (max-width: 767px) {
	/* Two narrow columns: long names (Кропивницький) must fit, unlike Lovable where they overflow */
	.hp-dest__name {
		padding: 0.75rem;
		font-size: 0.9375em;
		overflow-wrap: anywhere;
	}

	/* "All destinations" tile: as tall as the cards next to it, text on two lines */
	.hp .hp-dest--all {
		aspect-ratio: auto;
		padding: 1rem;
		font-size: 1em;
		line-height: 1.3;
	}

	/* Cards: same tight spacing as the trip cards (components.css) */
	.hp-post__body {
		padding: 1rem;
	}

	.hp-post__title {
		margin-top: 0.5rem;
	}

	.hp-post__more {
		padding-top: 0.75rem;
	}

	/* One column: the featured post title is the same size as the rest */
	.hp-post--featured .hp-post__title {
		font-size: 1.125em;
		line-height: 1.5556;
	}

	.hp-about__item {
		padding: 1rem;
	}

	/* SEO text becomes a plain block so the "read more" cut is a simple height */
	.hp-seo__text {
		column-count: auto;
	}

	.hp-seo__content p {
		margin-bottom: 1rem;
	}

	.hp .hp-seo__card--in-text {
		display: none;
	}

	.hp .hp-seo__card--below {
		display: flex;
	}
}
