/*
 * Home page — [bto_destinations] + [bto_home_promotions].
 * Approved design 2026-07-17: ivory canvas, fairway-green Vietnam map with
 * flag markers, photo destination cards joined by dotted connectors.
 */

/* Full-page course photo under an ivory veil — texture without hurting
   readability. The veil alpha is the tuning knob (higher = calmer). */
body.home,
body.bto-front {
	background:
		linear-gradient(rgba(238, 244, 234, .01), rgba(238, 244, 234, .01)),
		url("../img/home-bg2.jpg") center / cover no-repeat fixed var(--bto-ivory, #eef4ea);
}

/* Fixed attachment repaints badly on mobile — let it scroll there. */
@media (max-width: 900px) {
	body.home,
	body.bto-front {
		background-attachment: scroll, scroll;
	}
}

.bto-home {
	/* GeneratePress renders .site-content as a flex row; without an explicit
	   width the main element shrinks to fit-content instead of filling the
	   container, squeezing the percent-anchored cards. */
	width: 100%;
	flex: 1 1 100%;
	max-width: 1150px;
	margin: 0 auto;
	padding: 28px 24px 64px;
	color: var(--bto-ink, #1c1d1f);
}

/* ------------------------------------------------------------- heading */

.bto-dest-head { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin: 0 0 14px; }
.bto-dest-head h2, .bto-home-promos h2 { margin: 0; } /* size/weight from the theme base heading layer */
/* On-photo text (grass background): white, with a soft shadow for legibility. */
.bto-dest-head h2,
.bto-home-promos h2 { color: #fff; text-shadow: 0 1px 4px rgba(0, 0, 0, .35); }
.bto-dest-sub { color: #fff; text-shadow: 0 1px 3px rgba(0, 0, 0, .35); font-size: 14px; margin: 4px 0 0; }

.bto-search-pill {
	display: flex; align-items: center; gap: 10px; flex: 0 0 auto;
	background: rgba(255, 255, 255, .9); border-radius: 999px;
	padding: 6px 6px 6px 20px; width: min(440px, 40vw);
	box-shadow: 0 12px 34px rgba(2, 74, 48, .16);
}
.bto-search-pill input,
.bto-search-pill input:focus {
	border: 0; outline: 0; box-shadow: none; flex: 1; min-width: 0;
	font-size: 14.5px; background: transparent; color: var(--bto-ink, #1c1d1f); padding: 6px 0;
}
/* Search button styling comes from the theme .bto-btn component. */

/* ------------------------------------------------------------- diagram */

.bto-dest-wrap { position: relative; }
#bto-home-map { width: 100%; display: block; }
#bto-home-map .bto-map-marker.hot circle { stroke: #013322; stroke-width: 2; }

.bto-dcard {
	position: absolute; transform: translateY(-50%); width: 31.5%; min-width: 250px;
	display: flex; align-items: stretch; background: var(--bto-surface, #fff);
	border: 1.5px solid transparent; border-radius: var(--bto-radius-lg, 20px);
	box-shadow: var(--bto-shadow-2, 0 10px 26px rgba(2, 74, 48, .14)); overflow: hidden;
	text-decoration: none; color: inherit;
	transition: border-color .15s, transform .2s, box-shadow .2s;
}
.bto-dcard:hover,
.bto-dcard.hot {
	border-color: var(--bto-green-mid, #01ab6d);
	transform: translateY(-50%) translateY(-2px);
	box-shadow: 0 14px 30px rgba(2, 74, 48, .18);
}
.bto-dcard-img { width: 112px; flex: 0 0 auto; display: block; overflow: hidden; }
.bto-dcard-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bto-dcard-body {
	flex: 1; min-width: 0; padding: 8px 10px;
	display: flex; flex-direction: column; gap: 2px; justify-content: center;
}
.bto-dcard-body b {
	font-size: 18px; font-weight: 700; letter-spacing: -.01em;
	white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.bto-dcard-chips { display: flex; gap: 5px; flex-wrap: wrap; }
.bto-dcard-chips i {
	font-style: normal; font-size: 14px; font-weight: 400;
	color: var(--bto-chip-fg, #027a4e); background: var(--bto-chip-bg, #d4f3e5); border-radius: 999px; padding: 2px 8px;
}
.bto-dcard-count { font-size: 15px; font-weight: 600; color: var(--bto-green, #027a4e); }
.bto-dcard-air { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--bto-muted, #656c70); }
.bto-dcard-air svg { flex: 0 0 auto; }

/* --------------------------------------------------------- promotions */

.bto-home-promos { margin-top: 44px; }
.bto-home-promos-more { text-align: center; margin-top: 22px; }
.bto-home-promo-grid {
	display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 16px; margin-top: 18px;
}
.bto-home-promo {
	background: var(--bto-surface, #fff); border: 1px solid var(--bto-border, #e0e8e4); border-radius: var(--bto-radius, 12px);
	overflow: hidden; display: flex; flex-direction: column;
	text-decoration: none; color: inherit;
	transition: border-color .15s, transform .15s;
}
.bto-home-promo:hover { border-color: var(--bto-green-mid, #01ab6d); transform: translateY(-2px); }
.bto-home-promo-img { position: relative; height: 110px; display: block; overflow: hidden; }
.bto-home-promo-img img { display: block; width: 100%; height: 100%; object-fit: cover; }
/* Corner ribbon with the promotion name — matches the listing/promotions
   ribbons (대표 2026-08-05). */
.bto-home-promo-badge {
	position: absolute; top: 16px; left: -70px;
	width: 190px; transform: rotate(-45deg);
	background: var(--bto-ribbon, #000000);
	color: #fff; text-align: center;
	font-size: 9.5px; font-weight: 700; letter-spacing: .04em;
	padding: 4px 36px;
	white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
	box-shadow: 0 2px 6px rgba(0, 0, 0, .22);
}
.bto-home-promo-body { padding: 11px 14px 13px; display: flex; flex-direction: column; flex: 1; }
.bto-home-promo-name { font-size: 14px; font-weight: 600; line-height: 1.35; }
.bto-home-promo-meta { font-size: 12px; color: var(--bto-ink-2, #4c5254); margin-top: 4px; }
.bto-home-promo-price { margin-top: auto; padding-top: 10px; font-size: 14px; font-weight: 600; color: var(--bto-green, #027a4e); }
.bto-home-promo-price small { font-weight: 400; color: var(--bto-muted, #656c70); font-size: 11.5px; }

/* ------------------------------------------------------------- mobile */

.bto-dest-fallback { display: none; }

@media (max-width: 1000px) {
	.bto-home-promo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
	#bto-home-map, .bto-dest-wrap { display: none; }
	.bto-dest-head { flex-wrap: wrap; }
	.bto-search-pill { width: 100%; }
	.bto-dest-fallback {
		display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px;
	}
	.bto-gf-card {
		background: var(--bto-surface, #fff); border: 1px solid var(--bto-border, #e0e8e4); border-radius: var(--bto-radius, 12px);
		overflow: hidden; text-decoration: none; color: inherit; display: block;
	}
	.bto-gf-img { display: block; height: 76px; overflow: hidden; }
	.bto-gf-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
	.bto-gf-body { display: block; padding: 9px 12px; line-height: 1.2; }
	.bto-gf-body b { display: block; font-size: 13.5px; font-weight: 600; margin-bottom: 4px; }
	.bto-gf-body span { font-size: 12px; color: var(--bto-ink-2, #4c5254); }
}

@media (max-width: 560px) {
	.bto-home-promo-grid { grid-template-columns: 1fr; }
}
