/* Drink With Us — Local guides
   Card grid with an author avatar overlapping the image.

   Every text rule carries three classes: .fl-page p and
   .fl-builder-content * in the Customizer CSS print last and will
   otherwise win on font-size, line-height and colour. */

.dwu-guides {
	--dwu-g-ink: var(--color-inky-green, #0f2e26);
	--dwu-g-soft: rgba(15, 46, 38, 0.66);
	--dwu-g-rule: rgba(15, 46, 38, 0.1);
	--dwu-g-card: #ffffff;
	--dwu-g-accent: var(--color-dusty-mauve, #ba7157);
	--dwu-g-shadow: 0 2px 4px rgba(15, 46, 38, 0.05), 0 8px 20px rgba(15, 46, 38, 0.07);
	--dwu-g-shadow-hover: 0 4px 8px rgba(15, 46, 38, 0.07), 0 16px 34px rgba(15, 46, 38, 0.13);
	background-color: var(--dwu-g-bg, transparent);
	padding: var(--space-16, 4rem) var(--space-5, 1.25rem);
}

.dwu-guides--dark {
	--dwu-g-ink: var(--color-soft-white, #f9f9f6);
	--dwu-g-soft: rgba(249, 249, 246, 0.72);
	--dwu-g-rule: rgba(249, 249, 246, 0.18);
	--dwu-g-card: rgba(249, 249, 246, 0.07);
	--dwu-g-shadow: none;
	--dwu-g-shadow-hover: 0 16px 34px rgba(0, 0, 0, 0.28);
}

/* Heading */

.dwu-guides__head {
	max-width: 640px;
	margin: 0 0 var(--space-10, 2.5rem);
}

.fl-page .dwu-guides .dwu-guides__eyebrow {
	margin: 0 0 var(--space-3, 0.75rem);
	max-width: none;
	color: var(--dwu-g-accent);
	font-family: var(--font-body, sans-serif);
	font-size: var(--text-2xs, 0.8125rem);
	line-height: var(--line-height-tight, 1.2);
	letter-spacing: var(--tracking-label, 0.12em);
	text-transform: uppercase;
}

.fl-page .dwu-guides .dwu-guides__headline {
	margin: 0;
	color: var(--dwu-g-ink);
	font-family: var(--font-heading, sans-serif);
	font-size: clamp(1.9rem, 3.6vw, 2.75rem);
	font-weight: 400;
	line-height: 1.1;
	letter-spacing: -0.015em;
	text-wrap: balance;
}

.fl-page .dwu-guides .dwu-guides__intro {
	margin: var(--space-3, 0.75rem) 0 0;
	max-width: 52ch;
	color: var(--dwu-g-soft);
	font-size: var(--text-base, 1.125rem);
	line-height: 1.55;
}

/* Grid */

.dwu-guides__grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
	gap: var(--space-8, 2rem);
	list-style: none;
	margin: 0;
	padding: 0;
}

.dwu-guides__card {
	display: flex;
	flex-direction: column;
	background: var(--dwu-g-card);
	border: 1px solid var(--dwu-g-rule);
	border-radius: var(--border-radius-lg, 8px);
	box-shadow: var(--dwu-g-shadow);
	transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.dwu-guides__card:hover {
	transform: translateY(-4px);
	box-shadow: var(--dwu-g-shadow-hover);
}

/* Media + avatar */

.dwu-guides__media-wrap {
	position: relative;
}

.dwu-guides__media {
	display: block;
	aspect-ratio: 3 / 2;
	overflow: hidden;
	border-radius: var(--border-radius-lg, 8px) var(--border-radius-lg, 8px) 0 0;
	background: rgba(15, 46, 38, 0.08);
}

.dwu-guides__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.4s ease;
}

.dwu-guides__card:hover .dwu-guides__media img {
	transform: scale(1.03);
}

.dwu-guides__media-empty {
	display: block;
	width: 100%;
	height: 100%;
}

/* Author portrait, overlapping the image edge. The ring is the card
   colour, so the avatar reads as sitting on the card rather than
   floating on the photo. */

.dwu-guides__avatar {
	position: absolute;
	left: var(--space-5, 1.25rem);
	bottom: -22px;
	width: 56px;
	height: 56px;
	border-radius: 50%;
	overflow: hidden;
	background: var(--dwu-g-card);
	box-shadow: 0 0 0 3px var(--dwu-g-card), 0 1px 6px rgba(15, 46, 38, 0.22);
	z-index: 1;
}

.dwu-guides__avatar img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* Body */

.dwu-guides__body {
	display: flex;
	flex-direction: column;
	flex: 1;
	gap: 0;
	padding: var(--space-5, 1.25rem);
}

.dwu-guides__card--author .dwu-guides__body {
	padding-top: calc(22px + var(--space-3, 0.75rem));
}

/* Title leads. Byline and route follow as h6-weight labels — the inner
   spans each need three classes, since .fl-builder-content * sets colour
   at the same weight and prints after this file. */

.fl-page .dwu-guides .dwu-guides__title {
	margin: 0;
	font-family: var(--font-heading, sans-serif);
	font-size: var(--text-xl, 1.5rem);
	font-weight: 400;
	line-height: 1.15;
	letter-spacing: -0.01em;
	text-wrap: balance;
}

.fl-page .dwu-guides .dwu-guides__title a {
	color: var(--dwu-g-ink);
	text-decoration: none;
}

.fl-page .dwu-guides .dwu-guides__title a:hover {
	color: var(--dwu-g-accent);
}

.fl-page .dwu-guides .dwu-guides__byline {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0 8px;
	margin: 6px 0 0;
	max-width: none;
	font-family: var(--font-body, sans-serif);
	font-size: 0.8125rem !important;
	line-height: var(--line-height-tight, 1.2) !important;
	letter-spacing: 0.06em !important;
	text-transform: uppercase;
}

/* Inner spans inherit, but some themes size spans directly. */

.fl-page .dwu-guides .dwu-guides__byline > span,
.fl-page .dwu-guides .dwu-guides__meta > span {
	font-size: inherit !important;
	letter-spacing: inherit !important;
	line-height: inherit !important;
}

.fl-page .dwu-guides .dwu-guides__byline .dwu-guides__byline-name {
	color: var(--dwu-g-accent);
}

.fl-page .dwu-guides .dwu-guides__byline .dwu-guides__byline-role {
	color: var(--dwu-g-soft);
	letter-spacing: 0.04em;
	text-transform: none;
}

/* Route line — h6 metrics, italic, forest green. */

.fl-page .dwu-guides .dwu-guides__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 0 8px;
	margin: 5px 0 0;
	max-width: none;
	font-family: var(--font-body, sans-serif);
	font-size: 0.8125rem !important;
	line-height: var(--line-height-tight, 1.2) !important;
	letter-spacing: 0.06em !important;
	text-transform: uppercase;
	font-style: italic;
}

.fl-page .dwu-guides .dwu-guides__meta .dwu-guides__places,
.fl-page .dwu-guides .dwu-guides__meta .dwu-guides__stops {
	color: var(--color-forest-green, #0f5a38);
}

.dwu-guides--dark .dwu-guides__meta .dwu-guides__places,
.dwu-guides--dark .dwu-guides__meta .dwu-guides__stops {
	color: var(--color-sage-green, #64a090);
}

.fl-page .dwu-guides .dwu-guides__blurb {
	margin: var(--space-4, 1rem) 0 0;
	max-width: none;
	color: var(--dwu-g-soft);
	font-size: var(--text-xs, 0.875rem);
	line-height: 1.5;
	font-style: normal;
}

/* Card actions — two equal buttons on one row. nowrap keeps them side
   by side in a narrow card; both shrink rather than stacking. */

.dwu-guides__actions {
	display: flex;
	flex-wrap: nowrap;
	align-items: stretch;
	gap: var(--space-2, 0.5rem);
	margin-top: auto;
	padding-top: var(--space-5, 1.25rem);
}

.fl-page .dwu-guides .dwu-guides__link,
.fl-page .dwu-guides .dwu-guides__add {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	flex: 1 1 0;
	min-width: 0;
	min-height: 42px;
	padding: 0 12px;
	border-radius: 999px;
	font-family: var(--font-body, sans-serif);
	font-size: var(--text-2xs, 0.8125rem);
	line-height: 1.1;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	text-align: center;
	text-decoration: none;
	white-space: nowrap;
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

/* Primary — read the guide */

.fl-page .dwu-guides .dwu-guides__link {
	background: var(--dwu-g-ink);
	border: 1px solid var(--dwu-g-ink);
	color: var(--dwu-g-card);
}

.fl-page .dwu-guides .dwu-guides__link:hover,
.fl-page .dwu-guides .dwu-guides__link:focus-visible {
	background: var(--dwu-g-accent);
	border-color: var(--dwu-g-accent);
	color: #fff;
}

/* Secondary — add to trip */

.fl-page .dwu-guides .dwu-guides__add {
	background: transparent;
	border: 1px solid var(--dwu-g-ink);
	color: var(--dwu-g-ink);
}

.fl-page .dwu-guides .dwu-guides__add::before {
	content: "";
	width: 13px;
	height: 13px;
	flex: none;
	background-repeat: no-repeat;
	background-position: center;
	background-size: contain;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230f2e26' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E");
}

.dwu-guides--dark .dwu-guides__add::before {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f9f9f6' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E");
}

.fl-page .dwu-guides .dwu-guides__add:hover {
	background: var(--dwu-g-ink);
	color: var(--dwu-g-card);
}

.fl-page .dwu-guides .dwu-guides__add:hover::before {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E");
}

.fl-page .dwu-guides .dwu-guides__add.is-added {
	background: #d71f37;
	border-color: #d71f37;
	color: #fff;
}

.fl-page .dwu-guides .dwu-guides__add.is-added::before {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E");
}

/* Narrow cards: byline, route and buttons scale together so they never
   drift out of step. Previously only the buttons shrank here, which made
   the labels above them look oversized. */

@media (max-width: 420px) {
	.fl-page .dwu-guides .dwu-guides__byline,
	.fl-page .dwu-guides .dwu-guides__meta,
	.fl-page .dwu-guides .dwu-guides__link,
	.fl-page .dwu-guides .dwu-guides__add {
		font-size: 11.5px !important;
	}

	.fl-page .dwu-guides .dwu-guides__link,
	.fl-page .dwu-guides .dwu-guides__add {
		padding: 0 8px;
		letter-spacing: 0.04em;
	}
}

/* See all */

.dwu-guides__footer {
	margin-top: var(--space-10, 2.5rem);
	text-align: center;
}

.fl-page .dwu-guides .dwu-guides__see-all {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	min-height: 48px;
	padding: 0 var(--space-8, 2rem);
	border: 1px solid var(--dwu-g-ink);
	border-radius: 999px;
	color: var(--dwu-g-ink);
	font-family: var(--font-body, sans-serif);
	font-size: var(--text-2xs, 0.8125rem);
	letter-spacing: var(--tracking-label, 0.12em);
	text-transform: uppercase;
	text-decoration: none;
	transition: background-color 0.2s ease, color 0.2s ease, gap 0.2s ease;
}

.fl-page .dwu-guides .dwu-guides__see-all::after {
	content: "";
	width: 18px;
	height: 6px;
	border-bottom: 1px solid currentColor;
	position: relative;
}

.fl-page .dwu-guides .dwu-guides__see-all:hover {
	background: var(--dwu-g-ink);
	color: var(--dwu-g-card);
	gap: 14px;
}

.dwu-guides__empty {
	padding: var(--space-4, 1rem);
	border: 1px dashed var(--dwu-g-rule);
	color: var(--dwu-g-soft);
	font-size: var(--text-xs, 0.875rem);
}

@media (max-width: 767px) {
	.dwu-guides {
		padding: var(--space-10, 2.5rem) 0;
	}

	.dwu-guides__grid {
		grid-template-columns: 1fr;
		gap: var(--space-6, 1.5rem);
	}
}

@media (prefers-reduced-motion: reduce) {
	.dwu-guides__card,
	.dwu-guides__media img,
	.fl-page .dwu-guides .dwu-guides__see-all {
		transition: none;
	}

	.dwu-guides__card:hover {
		transform: none;
	}
}

/* Builder-only diagnostic — never rendered for visitors */

.dwu-guides__debug {
	margin: 0;
	padding: 8px 10px;
	background: rgba(215, 31, 55, 0.08);
	border: 1px dashed rgba(215, 31, 55, 0.4);
	border-radius: 4px;
	color: #7b2d35;
	font-size: 12px;
	line-height: 1.4;
	word-break: break-word;
}

.dwu-guides__debug code {
	font-size: 11px;
	background: none;
	padding: 0;
}
