/**
 * base.css — Reset, kiểu chữ nền, khả năng truy cập, tiện ích bố cục.
 */

/* ---------------------------------------------------------------- Reset */

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

html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
	/* Chừa chỗ cho header dính khi nhảy tới #booking */
	scroll-padding-top: 7rem;
}

body {
	margin: 0;
	background-color: var(--c-sand);
	color: var(--c-text);
	font-family: var(--font-body);
	font-size: var(--fs-base);
	font-weight: 400;
	line-height: var(--lh-body);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	overflow-x: hidden;
}

img,
picture,
video,
canvas,
svg {
	display: block;
	max-width: 100%;
}

img {
	height: auto;
}

figure {
	margin: 0;
}

/* ------------------------------------------------------------- Typography */

h1,
h2,
h3,
h4,
h5,
h6 {
	margin: 0 0 0.6em;
	color: var(--c-text);
	font-family: var(--font-display);
	font-weight: 400;
	line-height: var(--lh-snug);
	letter-spacing: var(--ls-display);
	text-wrap: balance;
}

h1 {
	font-size: var(--fs-3xl);
	line-height: var(--lh-tight);
}

h2 {
	font-size: var(--fs-2xl);
	line-height: var(--lh-tight);
}

h3 {
	font-size: var(--fs-lg);
}

h4 {
	font-family: var(--font-body);
	font-size: var(--fs-base);
	font-weight: 500;
	letter-spacing: 0;
}

p {
	margin: 0 0 1.1em;
}

p:last-child,
ul:last-child,
ol:last-child {
	margin-bottom: 0;
}

a {
	color: inherit;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.18em;
	transition: color var(--dur-fast) var(--ease);
}

a:hover {
	color: var(--c-accent-text);
}

strong {
	font-weight: 600;
}

blockquote {
	margin: 0;
}

ul,
ol {
	margin: 0 0 1.1em;
	padding: 0;
	list-style: none;
}

.entry-content ul,
.entry-content ol {
	padding-left: 1.35em;
	list-style: disc;
}

.entry-content ol {
	list-style: decimal;
}

.entry-content li {
	margin-bottom: 0.4em;
}

.entry-content > * + * {
	margin-top: 1.1em;
}

/*
 * Giới hạn độ dài dòng cho phần chữ.
 *
 * Khung đọc của theme rộng 46rem, ở cỡ chữ 17px là khoảng 85–100 ký tự một
 * dòng — dài hơn khoảng đọc thoải mái (45–75) khá nhiều, mắt dễ nhảy sai
 * dòng khi xuống hàng. Token --measure khai sẵn trong tokens.css đúng cho
 * việc này nhưng chưa từng được dùng.
 *
 * Chỉ áp cho đoạn văn và danh sách là những khối chữ thuần. Ảnh, cột, bảng
 * vẫn được trải hết bề rộng khung.
 */
.entry-content > p,
.entry-content > ul,
.entry-content > ol,
.entry-content > blockquote {
	max-width: var(--measure);
}

.entry-content h2 {
	margin-top: 2em;
	font-size: var(--fs-xl);
}

.entry-content h3 {
	margin-top: 1.6em;
}

.entry-content a {
	text-decoration: underline;
	text-decoration-color: var(--c-accent-line);
	text-decoration-thickness: 1px;
	text-underline-offset: 0.2em;
}

.entry-content a:hover {
	text-decoration-color: currentColor;
}

.entry-content blockquote {
	margin: 2.2em 0;
	padding-left: 1.75rem;
	border-left: 1px solid var(--c-accent);
	font-family: var(--font-display);
	font-size: var(--fs-lg);
	font-style: italic;
	line-height: 1.4;
}

.entry-content table {
	width: 100%;
	border-collapse: collapse;
	font-size: var(--fs-sm);
}

.entry-content th,
.entry-content td {
	padding: 0.75rem 0.9rem;
	border-bottom: var(--hairline);
	text-align: left;
}

.entry-content th {
	font-weight: 500;
	border-bottom-color: var(--c-line-strong);
}

hr {
	height: 1px;
	margin: 2.5rem 0;
	border: 0;
	background: var(--c-line);
}

code,
pre {
	font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
	font-size: 0.9em;
}

/* --------------------------------------------------------- Accessibility */

:focus-visible {
	outline: 2px solid var(--c-accent);
	outline-offset: 3px;
	border-radius: var(--radius);
}

/* Bỏ outline mặc định khi đã có :focus-visible */
:focus:not(:focus-visible) {
	outline: none;
}

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

.skip-link {
	position: fixed;
	top: 1rem;
	left: 1rem;
	z-index: 999;
	padding: 0.8rem 1.4rem;
	background: var(--c-ink);
	color: var(--c-sand);
	font-size: var(--fs-sm);
	text-decoration: none;
	transform: translateY(-200%);
	transition: transform var(--dur) var(--ease);
}

.skip-link:focus {
	transform: translateY(0);
	color: var(--c-sand);
}

/*
 * Người dùng bật "giảm chuyển động" trong hệ điều hành: tắt mọi hiệu ứng
 * không thiết yếu, giữ lại thay đổi trạng thái tức thời.
 */
@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}

/* ------------------------------------------------------------- Structure */

.container {
	width: 100%;
	max-width: var(--container);
	margin-inline: auto;
	padding-inline: var(--gutter);
}

.container--narrow {
	max-width: calc(var(--container-text) + var(--gutter) * 2);
}

.section {
	position: relative;
	padding-block: var(--section-y);
}

.section + .section {
	padding-top: 0;
}

.section--tight {
	padding-block: var(--section-y-tight);
}

.section__head {
	max-width: 46rem;
	margin-bottom: var(--sp-7);
}

.section__title {
	margin-bottom: 0.5rem;
}

.section__lede {
	max-width: 42rem;
	margin: 0;
	color: var(--c-text-muted);
	font-size: var(--fs-md);
	line-height: 1.6;
}

.section__bar {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: var(--sp-5);
	margin-bottom: var(--sp-7);
}

.section__bar .section__head {
	margin-bottom: 0;
}

.section__foot {
	margin-top: var(--sp-6);
}

/* ------------------------------------------------------------- Utilities */

.link-more {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	font-size: var(--fs-sm);
	font-weight: 500;
	text-decoration: none;
	border-bottom: 1px solid var(--c-accent-line);
	padding-bottom: 0.15em;
	transition: gap var(--dur) var(--ease), border-color var(--dur) var(--ease);
}

.link-more:hover {
	gap: 0.85rem;
	border-bottom-color: var(--c-text);
}

.link-quiet {
	color: var(--c-text-muted);
	font-size: var(--fs-sm);
	text-decoration: underline;
	text-decoration-color: var(--c-line-strong);
}

.link-quiet:hover {
	color: var(--c-text);
}

.plain-list {
	display: grid;
	gap: var(--sp-3);
	margin: 0;
}

.plain-list li {
	display: flex;
	align-items: center;
	gap: 0.7rem;
	color: var(--c-text-muted);
}

.plain-list svg {
	flex: none;
	color: var(--c-accent);
}

.empty-state {
	max-width: 34rem;
	padding-block: var(--sp-9);
}

.empty-state__title {
	font-size: var(--fs-xl);
}

.empty-state__text {
	color: var(--c-text-muted);
}

.empty-state__actions {
	margin-top: var(--sp-5);
}

/* — Phân trang — */
.pagination {
	margin-top: var(--sp-8);
	border-top: var(--hairline);
	padding-top: var(--sp-5);
}

.pagination .nav-links {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.35rem;
}

.pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.5rem;
	height: 2.5rem;
	padding-inline: 0.6rem;
	font-size: var(--fs-sm);
	text-decoration: none;
	border: 1px solid transparent;
	transition: border-color var(--dur) var(--ease), background-color var(--dur) var(--ease);
}

.pagination .page-numbers:hover {
	border-color: var(--c-line-strong);
}

.pagination .page-numbers.current {
	background: var(--c-ink);
	color: var(--c-sand);
}

/* — Breadcrumb — */
.breadcrumb {
	margin-bottom: var(--sp-5);
}

.breadcrumb__list {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem;
	margin: 0;
	font-size: var(--fs-sm);
	color: var(--c-text-muted);
}

.breadcrumb__item + .breadcrumb__item::before {
	content: "/";
	margin-right: 0.5rem;
	opacity: 0.5;
}

.breadcrumb__link {
	text-decoration: none;
}

.breadcrumb__link:hover {
	text-decoration: underline;
}

/* — Icon — */
.icon {
	flex: none;
}

.icon--flip {
	transform: rotate(180deg);
}

/* — Ảnh — */
.media__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/*
 * Ảnh mẫu SVG: giữ tỷ lệ khung và thêm nền để không lộ khoảng trắng khi
 * resort chưa kịp gửi ảnh thật.
 */
.media__img--placeholder {
	background-color: var(--c-ink-deep);
}

/* — Hiệu ứng xuất hiện: chỉ chạy khi có JS và người dùng không tắt — */
[data-reveal] {
	opacity: 1;
}

.js [data-reveal] {
	opacity: 0;
	transform: translateY(18px);
	transition: opacity var(--dur-slow) var(--ease), transform var(--dur-slow) var(--ease);
}

.js [data-reveal].is-visible {
	opacity: 1;
	transform: none;
}

.no-reveal [data-reveal],
.js .no-reveal [data-reveal] {
	opacity: 1;
	transform: none;
	transition: none;
}

@media (prefers-reduced-motion: reduce) {
	.js [data-reveal] {
		opacity: 1;
		transform: none;
	}
}
