/*
 * Pages CSS
 *
 * Styles for non-module page templates: the 404 error page, search results,
 * and the bare-content fallback used when a page has post_content instead of
 * flexible-content modules. These are loaded conditionally (only on the
 * relevant template) — see inc/enqueue.php.
 *
 * Design tokens from variables.css apply throughout.
 *
 * @package Hanalei_Day_Spa
 */

/* ====================================================================
   SHARED PAGE-CONTENT WRAPPER
   Used by bare content pages (no modules), search, and 404.
   ==================================================================== */

.page-content-wrap {
	max-width: 820px;
	margin: 0 auto;
	padding: var(--space-2xl) var(--space-lg);
}

.page-content-wrap h1,
.page-content-wrap h2,
.page-content-wrap h3 {
	font-family: var(--font-display);
	color: var(--charcoal);
}

.page-content-wrap p,
.page-content-wrap li {
	font-family: var(--font-body);
	font-size: 1.0625rem;
	line-height: 1.75;
	color: var(--charcoal);
}

.page-content-wrap ul,
.page-content-wrap ol {
	padding-left: 1.5em;
}

.page-content-wrap a {
	color: var(--plum);
	text-decoration: underline;
	text-underline-offset: 3px;
}

.page-content-wrap a:hover {
	color: var(--plum-dark, color-mix(in srgb, var(--plum) 80%, black));
}

/* ====================================================================
   404 PAGE
   ==================================================================== */

.page-404 {
	min-height: 70vh;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	padding: var(--space-2xl) var(--space-lg);
}

.page-404__kicker {
	font-family: var(--font-utility);
	font-size: 0.8125rem;
	font-weight: 500;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--sage-dark, color-mix(in srgb, var(--sage) 70%, black));
	margin-bottom: var(--space-sm);
}

.page-404__number {
	font-family: var(--font-display);
	font-size: clamp(5rem, 18vw, 11rem);
	font-weight: 700;
	line-height: 1;
	color: var(--plum);
	opacity: 0.18;
	margin: 0 0 var(--space-md);
	letter-spacing: -0.02em;
}

.page-404__heading {
	font-family: var(--font-display);
	font-size: clamp(1.6rem, 4vw, 2.5rem);
	font-weight: 500;
	color: var(--charcoal);
	margin: 0 0 var(--space-sm);
	max-width: 600px;
}

.page-404__body {
	font-family: var(--font-body);
	font-size: 1.0625rem;
	line-height: 1.7;
	color: var(--charcoal);
	opacity: 0.75;
	max-width: 480px;
	margin: 0 auto var(--space-xl);
}

.page-404__actions {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-sm);
	justify-content: center;
}

.page-404__link-list {
	list-style: none;
	padding: 0;
	margin: var(--space-xl) 0 0;
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-xs) var(--space-lg);
	justify-content: center;
}

.page-404__link-list li {
	font-family: var(--font-utility);
	font-size: 0.875rem;
}

.page-404__link-list a {
	color: var(--plum);
	text-decoration: none;
	border-bottom: 1px solid transparent;
	transition: border-color 0.2s;
}

.page-404__link-list a:hover {
	border-color: var(--plum);
}

/* ====================================================================
   SEARCH RESULTS PAGE
   ==================================================================== */

.search-header {
	background-color: var(--sand, #f5f0e8);
	padding: var(--space-xl) var(--space-lg);
	text-align: center;
}

.search-header__title {
	font-family: var(--font-display);
	font-size: clamp(1.5rem, 4vw, 2.25rem);
	color: var(--charcoal);
	margin: 0 0 var(--space-sm);
}

.search-header__count {
	font-family: var(--font-utility);
	font-size: 0.875rem;
	color: var(--charcoal);
	opacity: 0.65;
	letter-spacing: 0.04em;
}

.search-form-wrap {
	max-width: 560px;
	margin: var(--space-lg) auto 0;
}

.search-form-wrap form {
	display: flex;
	gap: var(--space-xs);
}

.search-form-wrap input[type="search"] {
	flex: 1;
	padding: 0.625rem 1rem;
	font-family: var(--font-body);
	font-size: 1rem;
	border: 1.5px solid color-mix(in srgb, var(--charcoal) 25%, transparent);
	border-radius: 4px;
	background: #fff;
	color: var(--charcoal);
	outline: none;
	transition: border-color 0.2s;
}

.search-form-wrap input[type="search"]:focus {
	border-color: var(--plum);
}

.search-form-wrap button {
	padding: 0.625rem 1.25rem;
	font-family: var(--font-utility);
	font-size: 0.875rem;
	font-weight: 500;
	background: var(--plum);
	color: #fff;
	border: none;
	border-radius: 4px;
	cursor: pointer;
	transition: opacity 0.2s;
}

.search-form-wrap button:hover {
	opacity: 0.88;
}

/* Results list */

.search-results {
	max-width: 820px;
	margin: 0 auto;
	padding: var(--space-xl) var(--space-lg);
}

.search-result {
	padding: var(--space-lg) 0;
	border-bottom: 1px solid color-mix(in srgb, var(--charcoal) 10%, transparent);
}

.search-result:last-child {
	border-bottom: none;
}

.search-result__type {
	font-family: var(--font-utility);
	font-size: 0.75rem;
	font-weight: 500;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--sage-dark, color-mix(in srgb, var(--sage) 60%, black));
	margin-bottom: 0.4rem;
}

.search-result__title {
	font-family: var(--font-display);
	font-size: 1.35rem;
	font-weight: 500;
	margin: 0 0 0.5rem;
}

.search-result__title a {
	color: var(--charcoal);
	text-decoration: none;
	transition: color 0.2s;
}

.search-result__title a:hover {
	color: var(--plum);
}

.search-result__excerpt {
	font-family: var(--font-body);
	font-size: 0.9375rem;
	line-height: 1.65;
	color: var(--charcoal);
	opacity: 0.75;
	margin: 0 0 0.6rem;
}

.search-result__url {
	font-family: var(--font-utility);
	font-size: 0.8125rem;
	color: var(--plum);
	opacity: 0.7;
}

/* No results state */

.search-no-results {
	text-align: center;
	padding: var(--space-2xl) var(--space-lg);
}

.search-no-results__heading {
	font-family: var(--font-display);
	font-size: 1.75rem;
	color: var(--charcoal);
	margin-bottom: var(--space-sm);
}

.search-no-results__body {
	font-family: var(--font-body);
	font-size: 1rem;
	color: var(--charcoal);
	opacity: 0.7;
	max-width: 400px;
	margin: 0 auto var(--space-xl);
}

/* Search pagination */

.search-pagination {
	display: flex;
	justify-content: center;
	gap: var(--space-sm);
	padding: var(--space-xl) var(--space-lg);
}

.search-pagination a,
.search-pagination span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	height: 40px;
	padding: 0 0.75rem;
	font-family: var(--font-utility);
	font-size: 0.875rem;
	border-radius: 4px;
	transition: background 0.2s, color 0.2s;
}

.search-pagination a {
	background: color-mix(in srgb, var(--plum) 8%, transparent);
	color: var(--plum);
	text-decoration: none;
}

.search-pagination a:hover {
	background: color-mix(in srgb, var(--plum) 15%, transparent);
}

.search-pagination .current {
	background: var(--plum);
	color: #fff;
}

/* ====================================================================
   BARE CONTENT FALLBACK
   For pages that have standard post_content instead of modules.
   ==================================================================== */

.bare-content {
	max-width: 820px;
	margin: 0 auto;
	padding: var(--space-2xl) var(--space-lg);
}

.bare-content h1 {
	font-family: var(--font-display);
	font-size: clamp(2rem, 5vw, 3.25rem);
	font-weight: 500;
	margin-bottom: var(--space-lg);
}

.bare-content h2 {
	font-family: var(--font-display);
	font-size: clamp(1.5rem, 3.5vw, 2.25rem);
	font-weight: 500;
	margin: var(--space-xl) 0 var(--space-sm);
}

.bare-content h3 {
	font-family: var(--font-display);
	font-size: 1.35rem;
	font-weight: 500;
	margin: var(--space-lg) 0 var(--space-xs);
}

.bare-content p,
.bare-content li {
	font-family: var(--font-body);
	font-size: 1.0625rem;
	line-height: 1.78;
	color: var(--charcoal);
}

.bare-content p {
	margin-bottom: var(--space-md);
}

.bare-content ul,
.bare-content ol {
	padding-left: 1.5em;
	margin-bottom: var(--space-md);
}

.bare-content a {
	color: var(--plum);
	text-decoration: underline;
	text-underline-offset: 3px;
}

.bare-content img {
	max-width: 100%;
	height: auto;
	border-radius: 4px;
}

.bare-content figure {
	margin: var(--space-lg) 0;
}

.bare-content figcaption {
	font-family: var(--font-utility);
	font-size: 0.8125rem;
	text-align: center;
	opacity: 0.6;
	margin-top: 0.5rem;
}

/* Responsive */

@media ( max-width: 640px ) {
	.page-404__actions {
		flex-direction: column;
		align-items: center;
	}

	.search-form-wrap form {
		flex-direction: column;
	}
}
