/*
Theme Name: Spiers Travels
Description: Child theme of Twenty Twenty-Five for The Spiers' Travels – trips first, journal-style.
Template: twentytwentyfive
Version: 1.0.0
Requires at least: 6.7
Text Domain: spiers-travels
*/

/* ---------- Trip cards (home page) ---------- */
.st-trips {
	display: grid;
	gap: clamp(16px, 2vw, 28px);
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
	margin: 0;
	padding: 0;
	list-style: none;
}
.st-card {
	position: relative;
	display: block;
	aspect-ratio: 4 / 3;
	border-radius: 18px;
	overflow: hidden;
	color: #fff;
	text-decoration: none;
	background: linear-gradient(135deg, #2f6f62, #1f3d4a);
	box-shadow: 0 6px 24px rgba(0, 0, 0, .12);
	transition: transform .25s ease, box-shadow .25s ease;
}
.st-card:hover,
.st-card:focus-visible { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(0, 0, 0, .2); }
.st-card img {
	position: absolute; inset: 0;
	width: 100%; height: 100%;
	object-fit: cover;
	transition: transform .6s ease;
}
.st-card:hover img { transform: scale(1.04); }
.st-card__body {
	position: absolute; left: 0; right: 0; bottom: 0;
	padding: 60px 22px 20px;
	background: linear-gradient(transparent, rgba(0, 0, 0, .72));
}
.st-card__name {
	margin: 0;
	font-size: clamp(1.4rem, 2.2vw, 1.9rem);
	line-height: 1.15;
	color: #fff;
}
.st-card__meta { margin: 6px 0 0; font-size: .95rem; opacity: .9; }
.st-card--empty .st-card__body { top: 0; display: flex; flex-direction: column; justify-content: flex-end; }

/* ---------- Hero ---------- */
.st-hero {
	position: relative;
	min-height: min(70vh, 640px);
	display: flex;
	align-items: flex-end;
	color: #fff;
	background: #1f3d4a;
	overflow: hidden;
}
.st-hero img {
	position: absolute; inset: 0;
	width: 100%; height: 100%;
	object-fit: cover;
}
.st-hero::after {
	content: ""; position: absolute; inset: 0;
	background: linear-gradient(180deg, rgba(0, 0, 0, .05) 30%, rgba(0, 0, 0, .65));
}
.st-hero__inner {
	position: relative; z-index: 1;
	width: 100%;
	max-width: var(--wp--style--global--wide-size, 1340px);
	margin: 0 auto;
	padding: clamp(24px, 5vw, 64px) var(--wp--style--root--padding-right, 24px);
}
.st-hero h1, .st-hero h2 { color: #fff; margin: 0; font-size: clamp(2.4rem, 6vw, 4.5rem); line-height: 1.05; }
.st-hero p { margin: 12px 0 0; font-size: clamp(1.1rem, 2vw, 1.4rem); max-width: 40ch; opacity: .95; }
.st-hero .st-hero__eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .85rem; opacity: .85; max-width: none; }

/* ---------- Trip page list (oldest first, journal style) ---------- */
.st-day-list .wp-block-post { border-bottom: 1px solid color-mix(in srgb, currentColor 15%, transparent); padding-bottom: 2rem; }
.st-day-list .wp-block-post:last-child { border-bottom: 0; }
.st-day-list .wp-block-post-featured-image img { border-radius: 14px; aspect-ratio: 4 / 3; object-fit: cover; }
.st-day-number { text-transform: uppercase; letter-spacing: .1em; font-size: .8rem; opacity: .7; margin: 0; }

/* ---------- Single post ---------- */
.st-single-cover img { border-radius: 18px; max-height: 75vh; object-fit: cover; }
.st-trip-pill a {
	display: inline-block; padding: 4px 14px; border-radius: 999px;
	background: color-mix(in srgb, var(--wp--preset--color--accent-1, #2f6f62) 25%, transparent);
	text-decoration: none; font-size: .9rem;
}
.st-daynav { border-top: 1px solid color-mix(in srgb, currentColor 15%, transparent); padding-top: 1.5rem; }
.st-daynav a { text-decoration: none; }
.wp-block-gallery.has-nested-images figure.wp-block-image img { border-radius: 10px; }

/* Older (2019-era) galleries saved as <ul class="wp-block-gallery">: tidy grid of square photos. */
ul.wp-block-gallery:not(.has-nested-images) {
	display: grid !important;
	grid-template-columns: repeat(3, 1fr);
	gap: 10px;
	padding: 0;
	list-style: none;
}
ul.wp-block-gallery:not(.has-nested-images) li { margin: 0; width: auto !important; }
ul.wp-block-gallery:not(.has-nested-images) figure { margin: 0; height: 100%; }
ul.wp-block-gallery:not(.has-nested-images) img {
	display: block; width: 100%; height: 100%;
	aspect-ratio: 1; object-fit: cover; border-radius: 10px;
}
@media (max-width: 600px) {
	ul.wp-block-gallery:not(.has-nested-images) { grid-template-columns: repeat(2, 1fr); }
}
