/*
Theme Name: Swiss City Breaks
Theme URI: https://swisscitybreaks.co.uk
Description: Alpine travel portal theme for Swiss City Breaks. Child of Twenty Twenty-Five.
Author: Swiss City Breaks
Template: twentytwentyfive
Version: 1.1.0
Text Domain: swisscitybreaks
*/

/* Fonts are a deliberate system stack: no Google Fonts hotlinking, which keeps the
   site clear of the EU/UK rulings on leaking visitor IPs to Google. */

/* ============================================================
   Cards
   ============================================================ */

.scb-card-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr));
	gap: var(--wp--preset--spacing--40);
}

/* The post-template block is a flow layout, so core applies
   `li + li { margin-block-start }`. We lay the same list out as a CSS grid, where that
   margin only hits items 2..n and drops the first card of each row 20px out of line.
   The grid's own `gap` already provides the spacing. */
.scb-card-grid > * {
	margin-block-start: 0;
}

.scb-card {
	position: relative;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	background: var(--wp--preset--color--base);
	border: 1px solid #e2e8ee;
	border-radius: 12px;
	box-shadow: 0 1px 2px rgba(22, 35, 47, .05);
	transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.scb-card:hover,
.scb-card:focus-within {
	transform: translateY(-4px);
	border-color: #cdd9e3;
	box-shadow: 0 16px 34px rgba(22, 35, 47, .14);
}

.scb-card figure {
	margin: 0;
	overflow: hidden;
}

.scb-card img {
	display: block;
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	transition: transform .5s ease;
}

.scb-card:hover img {
	transform: scale(1.04);
}

.scb-card__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: .45rem;
	padding: var(--wp--preset--spacing--30);
}

.scb-card__body h3,
.scb-card__body .wp-block-post-title {
	margin: 0;
	font-size: 1.1875rem;
	line-height: 1.3;
}

.scb-card__body .wp-block-post-title a {
	color: var(--wp--preset--color--contrast);
	text-decoration: none;
}

.scb-card:hover .wp-block-post-title a {
	color: var(--wp--preset--color--glacier);
}

.scb-card__body .wp-block-post-excerpt {
	margin: 0;
	color: var(--wp--preset--color--stone);
}

.scb-card__body .wp-block-post-excerpt__excerpt {
	font-size: .9375rem;
	line-height: 1.55;
}

/* Stretch the title link across the whole card so the entire tile is clickable, while
   keeping a real focusable link for keyboard and screen-reader users. */
.scb-card__body .wp-block-post-title a::after {
	content: "";
	position: absolute;
	inset: 0;
}

/* The fallback illustration is decorative; its link must not be a second tab stop. */
.scb-fallback a {
	pointer-events: none;
}

/* Category cards on the front page */
.wp-block-column > h3 a {
	color: var(--wp--preset--color--contrast);
	text-decoration: none;
}

.wp-block-column > h3 a:hover {
	color: var(--wp--preset--color--swiss-red);
	text-decoration: underline;
	text-underline-offset: 4px;
}

/* ============================================================
   Meta strip, badges, prices
   ============================================================ */

.scb-metastrip {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: .35rem;
	margin: auto 0 0;
	padding-top: .35rem;
	font-size: .8125rem;
	color: var(--wp--preset--color--stone);
}

.scb-stars {
	color: #d9a406;
	letter-spacing: .06em;
}

.scb-price {
	font-weight: 600;
	color: var(--wp--preset--color--contrast);
}

.scb-eyebrow,
.scb-card__body .wp-block-post-terms {
	font-size: .75rem;
	font-weight: 600;
	letter-spacing: .09em;
	text-transform: uppercase;
	color: var(--wp--preset--color--swiss-red);
}

.scb-card__body .wp-block-post-terms a {
	color: inherit;
	text-decoration: none;
}

.scb-meta {
	font-size: .8125rem;
	color: var(--wp--preset--color--stone);
}

.scb-badge {
	display: inline-block;
	padding: .18rem .6rem;
	font-size: .8125rem;
	font-weight: 600;
	border-radius: 999px;
	background: var(--wp--preset--color--mist);
	color: var(--wp--preset--color--contrast);
}

.scb-badge.is-good    { background: #dff0e6; color: #1d5738; }
.scb-badge.is-partial { background: #fdf0d5; color: #6b4a06; }
.scb-badge.is-poor    { background: #fbe3e3; color: #8a1f1f; }

/* ============================================================
   Buttons and calls to action
   ============================================================ */

.scb-btn {
	display: inline-block;
	padding: .85rem 1.75rem;
	font-size: .9375rem;
	font-weight: 600;
	line-height: 1.2;
	color: #fff;
	text-decoration: none;
	background: var(--wp--preset--color--swiss-red);
	border: 1px solid transparent;
	border-radius: 6px;
	cursor: pointer;
	transition: background .16s ease, transform .16s ease;
}

.scb-btn:hover {
	background: var(--wp--preset--color--contrast);
	color: #fff;
	transform: translateY(-1px);
}

.scb-cta {
	margin: var(--wp--preset--spacing--40) 0 0;
}

/* ============================================================
   Facts panel on single listings
   ============================================================ */

.scb-facts {
	margin: var(--wp--preset--spacing--50) 0 0;
	padding: var(--wp--preset--spacing--40);
	background: var(--wp--preset--color--mist);
	border-radius: 12px;
}

.scb-facts__title {
	margin: 0 0 1rem;
	font-size: .8125rem;
	font-weight: 700;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: var(--wp--preset--color--stone);
}

.scb-facts dl {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
	gap: 1rem 2rem;
	margin: 0;
}

.scb-facts dt {
	font-size: .75rem;
	font-weight: 600;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: var(--wp--preset--color--stone);
}

.scb-facts dd {
	margin: .2rem 0 0;
	font-size: 1rem;
	font-weight: 500;
	color: var(--wp--preset--color--contrast);
}

.scb-facts dd a {
	color: inherit;
}

/* ============================================================
   Hero
   ============================================================ */

.scb-hero {
	position: relative;
	isolation: isolate;
}

.wp-block-cover h1 {
	text-wrap: balance;
	max-width: 18ch;
	margin-inline: auto;
}

.wp-block-cover .has-large-font-size {
	max-width: 60ch;
	margin-inline: auto;
}

/* ============================================================
   Section headings
   ============================================================ */

.scb-section-head {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: .75rem;
	padding-bottom: .75rem;
	border-bottom: 2px solid var(--wp--preset--color--mist);
}

.scb-section-head a {
	font-size: .9375rem;
	font-weight: 600;
	text-decoration: none;
	white-space: nowrap;
}

.scb-section-head a:hover {
	text-decoration: underline;
}

/* ============================================================
   Affiliate disclosure
   ============================================================ */

/* Kept visually quiet but never hidden: the CMA and ASA both require the disclosure to
   be prominent and not buried behind an interaction. */
.scb-disclosure {
	padding: .9rem 1.1rem;
	font-size: .8125rem;
	line-height: 1.55;
	color: #4a5a68;
	background: var(--wp--preset--color--mist);
	border-left: 3px solid var(--wp--preset--color--swiss-red);
	border-radius: 4px;
}

/* ============================================================
   Footer
   ============================================================ */

.is-style-no-bullets,
footer .wp-block-list {
	padding-left: 0;
	list-style: none;
}

footer a {
	color: #dbe4ea;
	text-decoration: none;
}

footer a:hover {
	color: #fff;
	text-decoration: underline;
}

/* ============================================================
   Archive intro
   ============================================================ */

.wp-block-query-title {
	margin-bottom: .25rem;
}

.scb-archive-intro {
	max-width: 65ch;
	margin: 0 0 var(--wp--preset--spacing--40);
	color: var(--wp--preset--color--stone);
}

/* ============================================================
   Accessibility
   ============================================================ */

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

:where(a:focus-visible, button:focus-visible, input:focus-visible) {
	outline: 2px solid var(--wp--preset--color--swiss-red);
	outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
	.scb-card,
	.scb-card img,
	.scb-btn {
		transition: none;
	}
	.scb-card:hover,
	.scb-card:focus-within,
	.scb-btn:hover {
		transform: none;
	}
	.scb-card:hover img {
		transform: none;
	}
}

/* ============================================================
   Photo credits
   ============================================================ */

/* The Commons photographs are CC BY / CC BY-SA: attribution is a licence condition,
   so this is required output, not decoration. */
.scb-credit {
	margin: .5rem 0 0;
	font-size: .75rem;
	line-height: 1.5;
	color: var(--wp--preset--color--stone);
	text-align: right;
}

.scb-credit a {
	color: inherit;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.scb-credit-list {
	padding-left: 0;
	list-style: none;
}

.scb-credit-list li {
	padding: .55rem 0;
	font-size: .9375rem;
	border-bottom: 1px solid var(--wp--preset--color--mist);
}

/* Featured image on a single listing */
.wp-block-post-featured-image {
	margin-bottom: var(--wp--preset--spacing--40);
}

.wp-block-post-featured-image img {
	width: 100%;
	max-height: 62vh;
	object-fit: cover;
	border-radius: 12px;
}

/* Hero: keep the headline legible over a photograph on every crop */
.wp-block-cover__image-background {
	object-position: center 42%;
}

.scb-cta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: .75rem 1rem;
}

.scb-cta__partner {
	font-size: .8125rem;
	color: var(--wp--preset--color--stone);
}

/* ============================================================
   Video and gallery
   ============================================================ */

.scb-video {
	margin: var(--wp--preset--spacing--50) 0 0;
}

.scb-video video {
	display: block;
	width: 100%;
	aspect-ratio: 16 / 9;
	background: var(--wp--preset--color--contrast);
	border-radius: 12px;
}

.scb-gallery {
	margin: var(--wp--preset--spacing--50) 0 0;
}

.scb-gallery__grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
	gap: var(--wp--preset--spacing--30);
}

.scb-gallery__grid figure {
	margin: 0;
}

.scb-gallery__grid img {
	display: block;
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	border-radius: 8px;
}

.scb-gallery__grid .scb-credit {
	text-align: left;
}
