/* Peru Huayhuash Travel Guide
   Typography and colours follow peruhuayhuash.com:
   Outfit (text), DM Sans (card titles), Roboto (headings / buttons),
   amber #FFB300, brand brown #682D2B, text #555 / #333. */

.phtg {
	--phtg-accent: #ffb300;
	--phtg-accent-dark: #e6a100;
	--phtg-brand: #682d2b;
	--phtg-brand-dark: #4f2120;
	--phtg-heading: #333;
	--phtg-text: #555;
	--phtg-muted: #666;
	--phtg-border: #dcdcdc;
	--phtg-panel: #f6f4f2;
	--phtg-radius: 3px;

	box-sizing: border-box;
	width: 100%;
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 16px;
	font-family: Outfit, sans-serif;
	font-size: 16px;
	line-height: 1.5;
	color: var(--phtg-text);
}

.phtg *,
.phtg *::before,
.phtg *::after {
	box-sizing: border-box;
}

.phtg [hidden] {
	display: none !important;
}

.phtg__title {
	margin: 0 0 24px;
	font-family: Roboto, sans-serif;
	font-size: 32px;
	font-weight: 600;
	line-height: 1.25;
	color: var(--phtg-heading);
}

/* ---------- Buttons / links ---------- */

.phtg .phtg-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin: 0;
	padding: 12px 22px;
	border: 0;
	border-radius: var(--phtg-radius);
	background: var(--phtg-brand);
	color: #fff;
	font-family: Roboto, sans-serif;
	font-size: 15px;
	font-weight: 500;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	cursor: pointer;
	transition: background-color 0.2s ease;
}

.phtg .phtg-btn:hover,
.phtg .phtg-btn:focus-visible {
	background: var(--phtg-brand-dark);
	color: #fff;
}

.phtg .phtg-btn--accent {
	background: var(--phtg-accent);
	font-size: 18px;
	text-transform: none;
	letter-spacing: 0;
}

.phtg .phtg-btn--accent:hover,
.phtg .phtg-btn--accent:focus-visible {
	background: var(--phtg-accent-dark);
}

.phtg .phtg-btn[disabled] {
	opacity: 0.6;
	cursor: progress;
}

.phtg .phtg-link {
	color: var(--phtg-brand);
	font-family: Roboto, sans-serif;
	font-size: 15px;
	font-weight: 500;
	text-decoration: none;
	text-transform: uppercase;
	letter-spacing: 0.03em;
}

.phtg .phtg-link:hover,
.phtg .phtg-link:focus-visible {
	color: var(--phtg-accent-dark);
}

.phtg a:focus-visible,
.phtg button:focus-visible,
.phtg select:focus-visible {
	outline: 2px solid var(--phtg-accent);
	outline-offset: 2px;
}

/* ---------- Filters ---------- */

.phtg-filters {
	display: grid;
	grid-template-columns: 170px 1fr;
	gap: 16px 24px;
	align-items: center;
	margin: 0 0 32px;
	padding: 24px;
	border-radius: var(--phtg-radius);
	background: var(--phtg-panel);
}

.phtg-filters__heading {
	font-family: Roboto, sans-serif;
	font-size: 24px;
	font-weight: 700;
	line-height: 1.2;
	text-transform: uppercase;
	color: var(--phtg-heading);
}

.phtg-filters__fields {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 16px;
}

.phtg-field__label {
	display: block;
	margin: 0 0 6px;
	font-family: Roboto, sans-serif;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--phtg-heading);
}

.phtg .phtg-field__select {
	display: block;
	width: 100%;
	height: 48px;
	margin: 0;
	padding: 0 40px 0 14px;
	border: 1px solid var(--phtg-border);
	border-radius: var(--phtg-radius);
	background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23682d2b' stroke-width='2'/%3E%3C/svg%3E") no-repeat right 14px center;
	background-size: 12px 8px;
	color: var(--phtg-heading);
	font-family: Outfit, sans-serif;
	font-size: 16px;
	line-height: 1.2;
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
	cursor: pointer;
	text-overflow: ellipsis;
}

.phtg-filters__submit {
	grid-column: 2;
	justify-self: start;
}

.phtg--js .phtg-filters__submit {
	display: none;
}

/* ---------- Results ---------- */

.phtg-results {
	position: relative;
	scroll-margin-top: 120px;
	transition: opacity 0.2s ease;
}

.phtg[aria-busy="true"] .phtg-results {
	opacity: 0.5;
}

.phtg-summary {
	margin: 0 0 16px;
	font-size: 15px;
	color: var(--phtg-muted);
}

.phtg-empty,
.phtg-error {
	padding: 32px 16px;
	text-align: center;
	font-size: 18px;
}

.phtg-error {
	color: #b32d2e;
}

.phtg-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 28px;
}

/* ---------- Card ---------- */

.phtg-card {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	border-radius: var(--phtg-radius);
	background: #fff;
	box-shadow: 0 4px 18px rgba(0, 0, 0, 0.12);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.phtg-card:hover {
	transform: translateY(-3px);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

.phtg-card__media {
	display: block;
	aspect-ratio: 16 / 10;
	background: #2b2b2b;
	overflow: hidden;
}

.phtg-card__media img,
.phtg-card__placeholder {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.phtg-card__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	padding: 20px 22px 24px;
}

.phtg-card__top {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 16px;
	justify-content: space-between;
	margin: 0 0 10px;
	font-size: 15px;
}

.phtg-card__date {
	font-weight: 600;
	color: var(--phtg-brand);
}

.phtg-card__type {
	color: var(--phtg-muted);
}

.phtg .phtg-card__title {
	margin: 0 0 14px;
	padding: 0 0 14px;
	border-bottom: 1px solid #eee;
	font-family: "DM Sans", Outfit, sans-serif;
	font-size: 22px;
	font-weight: 500;
	line-height: 1.25;
	text-transform: none;
	color: var(--phtg-heading);
}

.phtg .phtg-card__title a {
	color: inherit;
	text-decoration: none;
}

.phtg .phtg-card__title a:hover,
.phtg .phtg-card__title a:focus-visible {
	color: var(--phtg-brand);
}

.phtg-card__meta {
	margin: 0 0 20px;
	padding: 0;
}

.phtg-card__meta > div {
	display: flex;
	flex-wrap: wrap;
	gap: 0 8px;
	margin: 0 0 6px;
	font-size: 15px;
}

.phtg-card__meta dt {
	margin: 0;
	font-family: Roboto, sans-serif;
	font-size: 12px;
	font-weight: 700;
	line-height: 24px;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--phtg-heading);
}

.phtg-card__meta dd {
	margin: 0;
}

.phtg-card__price {
	font-weight: 700;
	color: var(--phtg-brand);
}

.phtg-card__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px 20px;
	align-items: center;
	margin-top: auto;
}

/* ---------- Load more ---------- */

.phtg-more-wrap {
	margin: 36px 0 0;
	text-align: center;
}

/* ---------- Month buttons ---------- */

.phtg-months {
	margin: 56px 0 0;
	padding: 32px 0 0;
	border-top: 1px solid #e5e5e5;
	text-align: center;
}

.phtg .phtg-months__title {
	margin: 0 0 20px;
	font-family: Roboto, sans-serif;
	font-size: 24px;
	font-weight: 700;
	line-height: 1.2;
	text-transform: uppercase;
	color: var(--phtg-heading);
}

.phtg-months__list {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	justify-content: center;
	margin: 0;
	padding: 0;
	list-style: none;
}

.phtg-months__list li {
	margin: 0;
	padding: 0;
}

.phtg .phtg-month {
	display: block;
	min-width: 150px;
	padding: 12px 20px;
	border: 2px solid var(--phtg-brand);
	border-radius: var(--phtg-radius);
	background: #fff;
	color: var(--phtg-brand);
	font-family: Roboto, sans-serif;
	font-size: 15px;
	font-weight: 500;
	text-align: center;
	text-decoration: none;
	transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.phtg .phtg-month:hover,
.phtg .phtg-month:focus-visible {
	border-color: var(--phtg-accent);
	background: var(--phtg-accent);
	color: var(--phtg-heading);
}

.phtg .phtg-month[aria-current="true"] {
	border-color: var(--phtg-brand);
	background: var(--phtg-brand);
	color: #fff;
}

/* ---------- Responsive ---------- */

@media (max-width: 1100px) {
	.phtg-filters {
		grid-template-columns: 1fr;
	}

	.phtg-filters__submit {
		grid-column: 1;
	}

	.phtg-filters__fields {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 991px) {
	.phtg-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 22px;
	}
}

@media (max-width: 600px) {
	.phtg {
		padding: 0 12px;
	}

	.phtg__title {
		font-size: 26px;
	}

	.phtg-filters {
		padding: 18px 16px;
	}

	.phtg-filters__heading {
		font-size: 20px;
	}

	.phtg-filters__fields,
	.phtg-grid {
		grid-template-columns: 1fr;
	}

	.phtg-months__list {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.phtg .phtg-month {
		min-width: 0;
		padding: 12px 8px;
	}

	.phtg .phtg-more {
		width: 100%;
	}
}

@media (prefers-reduced-motion: reduce) {
	.phtg-card,
	.phtg-results,
	.phtg .phtg-btn,
	.phtg .phtg-month {
		transition: none;
	}

	.phtg-card:hover {
		transform: none;
	}
}
