/* 0.15.12 redesign: Lake page bottom, Plan your stay, pagination, /guides/ hub. Brand tokens come from theme.json (var(--wp--preset--color--*)). */
/* Loaded after theme.css and blocks.css (functions.php), so these rules win at equal specificity.
   Colours use the brand variables from theme.css (--dl-navy, --dl-lake, --dl-mist, --dl-line, --dl-muted). */

/* ================================================================== */
/* 1. Lake page: "Plan your stay" as image cards (Fadi's request 5)   */
/*    Markup: DL_Related::lake_html() -> section.dl-related--cards     */
/* ================================================================== */

/* A full-width mist band that closes the lake page, with clear room
   above it (after the lake ratings) and before the navy footer. */
.dl-related.dl-related--cards {
	background: var(--dl-mist);
	border-top: 1px solid var(--dl-line);
	margin: 64px 0 0;
	padding: 64px 0 88px;
}
.dl-related--cards .dl-related__h2 { font-size: 36px; margin: 0 0 8px; }
.dl-related--cards .dl-related__group { margin-top: 36px; }
.dl-related--cards .dl-related__group--place { margin-top: 28px; }
.dl-related__h3 {
	font-family: var(--dl-sans); font-weight: 600; font-size: 18px; line-height: 1.3;
	color: var(--dl-navy); margin: 0 0 14px;
}

/* Card grid. Guides: 3 across; lakes: 6 small tiles across; place: one wide card. */
.dl-rcards { list-style: none; margin: 0; padding: 0; display: grid; gap: 20px; }
.dl-rcards--guide { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.dl-rcards--lake { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; }
.dl-rcards--place { grid-template-columns: 1fr; }

/* One card: photo on top, text below. The title link is stretched over the
   whole card (one tab stop, one link per card); the photo credit sits above
   that cover so its own links still work. */
.dl-rcard {
	position: relative; display: flex; flex-direction: column; margin: 0;
	background: #fff; border: 1px solid var(--dl-line); border-radius: 16px; overflow: hidden;
	transition: border-color .15s ease, box-shadow .15s ease;
}
.dl-rcard:hover { border-color: var(--dl-navy); box-shadow: 0 8px 24px rgba(28, 43, 69, .12); }
.dl-rcard:focus-within { outline: 3px solid var(--dl-lake); outline-offset: 3px; }
.dl-rcard__media { position: relative; aspect-ratio: 3 / 2; overflow: hidden; background: var(--dl-navy); }
.dl-rcard__media picture, .dl-rcard__media .dl-lakebg__pic { display: block; width: 100%; height: 100%; }
.dl-rcard__media img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 0 !important; margin: 0; }
/* No photo: the brand water texture under a navy fade (same as Know Your Lake cards). */
.dl-rcard__media--empty {
	background-image: linear-gradient(180deg, rgba(28, 43, 69, .35) 0%, rgba(28, 43, 69, .85) 100%), url('../images/pro-band-1600.jpg');
	background-size: cover; background-position: center;
}
.dl-rcard__body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 4px; flex: 1 1 auto; }
.dl-rcard__title { margin: 0; font-size: 16px; font-weight: 600; line-height: 1.35; }
.dl-rcard__link { color: var(--dl-navy) !important; text-decoration: none !important; }
.dl-rcard__link::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.dl-rcard__link:focus-visible { outline: none; } /* The card shows the focus ring. */
.dl-rcard:hover .dl-rcard__link { text-decoration: underline !important; text-underline-offset: 3px; }
.dl-rcard__line {
	margin: 0; font-size: 14px; line-height: 1.4; color: var(--dl-muted);
	display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.dl-rcard__credit {
	position: relative; z-index: 2; margin: 0; padding: 0 16px 12px;
	font-size: 12px; line-height: 1.4; color: var(--dl-muted);
}
.dl-rcard__credit a { color: var(--dl-muted); text-decoration: underline; text-underline-offset: 2px; }
.dl-rcard__credit a:hover { color: var(--dl-navy); }

/* Lake tiles: smaller text. */
.dl-rcard--lake .dl-rcard__body { padding: 12px 12px 10px; }
.dl-rcard--lake .dl-rcard__title { font-size: 15px; }
.dl-rcard--lake .dl-rcard__line { font-size: 13px; -webkit-line-clamp: 1; }
.dl-rcard--lake .dl-rcard__credit { padding: 0 12px 10px; font-size: 11px; }

/* The rental card: one wide photo with the text on it (the one big
   moment of the section; everything else stays quiet). */
.dl-rcard--place { border: 0; min-height: 240px; justify-content: flex-end; background: var(--dl-navy); }
.dl-rcard--place .dl-rcard__media { position: absolute; inset: 0; aspect-ratio: auto; }
.dl-rcard--place .dl-rcard__media::after {
	content: ""; position: absolute; inset: 0;
	background: linear-gradient(90deg, rgba(28, 43, 69, .92) 0%, rgba(28, 43, 69, .65) 45%, rgba(28, 43, 69, .15) 100%);
}
.dl-rcard--place .dl-rcard__body { position: relative; padding: 32px 36px; max-width: 640px; gap: 6px; }
.dl-rcard--place .dl-rcard__title { font-family: var(--dl-serif); font-weight: 400; font-size: 32px; line-height: 1.15; }
.dl-rcard--place .dl-rcard__link { color: #fff !important; }
.dl-rcard--place .dl-rcard__line { color: rgba(255, 255, 255, .88); font-size: 15px; }
/* "See cottages" button look, drawn by CSS so the card keeps one link. */
.dl-rcard--place .dl-rcard__body::after {
	content: "See cottages"; align-self: flex-start; margin-top: 14px;
	background: #fff; color: var(--dl-navy); font-weight: 600; font-size: 15px;
	border-radius: 999px; padding: 10px 20px; line-height: 1.2;
}
.dl-rcard--place:hover { box-shadow: 0 12px 32px rgba(28, 43, 69, .28); }
.dl-rcard--place:hover .dl-rcard__body::after { background: var(--dl-mist); }

@media (max-width: 1100px) {
	.dl-rcards--lake { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
	.dl-rcards--guide { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
	.dl-related.dl-related--cards { margin-top: 48px; padding: 44px 0 64px; }
	.dl-related--cards .dl-related__h2 { font-size: 28px; }
	.dl-related--cards .dl-related__group { margin-top: 28px; }
	.dl-rcards { gap: 14px; }
	.dl-rcards--guide { grid-template-columns: 1fr; }
	.dl-rcards--lake { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
	/* Guides on phones: photo left, text right (a compact, scannable list). */
	.dl-rcard--guide { flex-direction: row; align-items: stretch; min-height: 96px; }
	.dl-rcard--guide .dl-rcard__media { flex: 0 0 112px; aspect-ratio: auto; }
	.dl-rcard--guide .dl-rcard__body { padding: 12px 14px; justify-content: center; }
	.dl-rcard--place { min-height: 220px; }
	.dl-rcard--place .dl-rcard__media::after { background: linear-gradient(180deg, rgba(28, 43, 69, .25) 0%, rgba(28, 43, 69, .92) 100%); }
	.dl-rcard--place .dl-rcard__body { padding: 22px 20px; }
	.dl-rcard--place .dl-rcard__title { font-size: 26px; }
}
@media (prefers-reduced-motion: reduce) {
	.dl-rcard { transition: none; }
}

/* ================================================================== */
/* 2. Pagination (Fadi's request 6): every core query pagination block */
/*    (guides archive, blog index) and the region page pager.          */
/*    Prev/next buttons, numbered pills, navy current page, ellipsis.  */
/* ================================================================== */
.wp-block-query-pagination,
.dl-pager {
	display: flex !important; flex-wrap: wrap; align-items: center; justify-content: center;
	gap: 12px 16px; margin: 48px 0 0 !important; padding: 0; font-size: 15px;
}
.wp-block-query-pagination-numbers,
.dl-pager ul { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px; margin: 0; padding: 0; list-style: none; }
.dl-pager li { margin: 0; }
/* Number pills: 44 px targets. */
.wp-block-query-pagination .page-numbers,
.dl-pager .page-numbers {
	display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box;
	min-width: 44px; height: 44px; padding: 0 12px; border-radius: 999px;
	border: 1px solid var(--dl-line); background: #fff;
	color: var(--dl-navy); font-weight: 600; text-decoration: none; line-height: 1;
}
.wp-block-query-pagination a.page-numbers:hover,
.dl-pager a.page-numbers:hover { border-color: var(--dl-navy); background: var(--dl-mist); }
.wp-block-query-pagination .page-numbers.current,
.dl-pager .page-numbers.current { background: var(--dl-navy); border-color: var(--dl-navy); color: #fff; }
/* Ellipsis: no pill. */
.wp-block-query-pagination .page-numbers.dots,
.dl-pager .page-numbers.dots { border: 0; background: none; min-width: 24px; padding: 0; color: var(--dl-muted); }
/* Previous / Next as outlined buttons. */
.wp-block-query-pagination-previous,
.wp-block-query-pagination-next,
.dl-pager .prev.page-numbers,
.dl-pager .next.page-numbers {
	display: inline-flex; align-items: center; gap: 6px; box-sizing: border-box;
	min-height: 44px; padding: 0 20px !important; border-radius: 999px;
	border: 1px solid var(--dl-navy); background: #fff;
	color: var(--dl-navy) !important; font-weight: 600; text-decoration: none !important; margin: 0 !important;
}
.wp-block-query-pagination-previous:hover,
.wp-block-query-pagination-next:hover { background: var(--dl-navy); color: #fff !important; }
.wp-block-query-pagination-previous-arrow, .wp-block-query-pagination-next-arrow { margin: 0 !important; display: inline-block; }
.wp-block-query-pagination a:focus-visible,
.dl-pager a:focus-visible { outline: 3px solid var(--dl-lake); outline-offset: 2px; }
/* Every page number stays in the HTML (midSize 20 in the template), so
   /guides/ links all its pages for crawlers (0.15.10 SEO item 13). On
   screen the list collapses to  1 … 4 [5] 6 … 10  on phones always, and on
   wider screens once there are 13 or more numbers. The "…" is drawn by CSS
   next to the first and last number when pages are skipped. */
.wp-block-query-pagination-numbers:has(> .page-numbers:nth-child(13)) > .page-numbers { display: none; }
.wp-block-query-pagination-numbers:has(> .page-numbers:nth-child(13)) > .page-numbers:is(:first-child, :last-child, .current, .current + .page-numbers),
.wp-block-query-pagination-numbers:has(> .page-numbers:nth-child(13)) > .page-numbers:has(+ .current) { display: inline-flex; }
.wp-block-query-pagination-numbers:has(> .page-numbers:nth-child(13)) > .page-numbers:first-child,
.wp-block-query-pagination-numbers:has(> .page-numbers:nth-child(13)) > .page-numbers:last-child { position: relative; }
.wp-block-query-pagination-numbers:has(> .page-numbers:nth-child(13)):not(:has(> .current:nth-child(-n+3))) > .page-numbers:first-child { margin-right: 26px; }
.wp-block-query-pagination-numbers:has(> .page-numbers:nth-child(13)):not(:has(> .current:nth-child(-n+3))) > .page-numbers:first-child::after,
.wp-block-query-pagination-numbers:has(> .page-numbers:nth-child(13)):not(:has(> .current:nth-last-child(-n+3))) > .page-numbers:last-child::before {
	content: "\2026"; position: absolute; top: 50%; transform: translateY(-50%); color: var(--dl-muted); font-weight: 600; pointer-events: none;
}
.wp-block-query-pagination-numbers:has(> .page-numbers:nth-child(13)):not(:has(> .current:nth-child(-n+3))) > .page-numbers:first-child::after { left: calc(100% + 9px); }
.wp-block-query-pagination-numbers:has(> .page-numbers:nth-child(13)):not(:has(> .current:nth-last-child(-n+3))) > .page-numbers:last-child { margin-left: 26px; }
.wp-block-query-pagination-numbers:has(> .page-numbers:nth-child(13)):not(:has(> .current:nth-last-child(-n+3))) > .page-numbers:last-child::before { right: calc(100% + 9px); }
@media (max-width: 600px) {
	.wp-block-query-pagination-numbers:has(> .page-numbers:nth-child(6)) > .page-numbers { display: none; }
	.wp-block-query-pagination-numbers:has(> .page-numbers:nth-child(6)) > .page-numbers:is(:first-child, :last-child, .current, .current + .page-numbers),
	.wp-block-query-pagination-numbers:has(> .page-numbers:nth-child(6)) > .page-numbers:has(+ .current) { display: inline-flex; }
	.wp-block-query-pagination-numbers:has(> .page-numbers:nth-child(6)) > .page-numbers:first-child,
	.wp-block-query-pagination-numbers:has(> .page-numbers:nth-child(6)) > .page-numbers:last-child { position: relative; }
	.wp-block-query-pagination-numbers:has(> .page-numbers:nth-child(6)):not(:has(> .current:nth-child(-n+3))) > .page-numbers:first-child { margin-right: 26px; }
	.wp-block-query-pagination-numbers:has(> .page-numbers:nth-child(6)):not(:has(> .current:nth-last-child(-n+3))) > .page-numbers:last-child { margin-left: 26px; }
	.wp-block-query-pagination-numbers:has(> .page-numbers:nth-child(6)):not(:has(> .current:nth-child(-n+3))) > .page-numbers:first-child::after,
	.wp-block-query-pagination-numbers:has(> .page-numbers:nth-child(6)):not(:has(> .current:nth-last-child(-n+3))) > .page-numbers:last-child::before {
		content: "\2026"; position: absolute; top: 50%; transform: translateY(-50%); color: var(--dl-muted); font-weight: 600; pointer-events: none;
	}
	.wp-block-query-pagination-numbers:has(> .page-numbers:nth-child(6)):not(:has(> .current:nth-child(-n+3))) > .page-numbers:first-child::after { left: calc(100% + 9px); }
	.wp-block-query-pagination-numbers:has(> .page-numbers:nth-child(6)):not(:has(> .current:nth-last-child(-n+3))) > .page-numbers:last-child::before { right: calc(100% + 9px); }
}
/* Phones: Previous and Next share the first row; the numbers get their own row. */
@media (max-width: 600px) {
	.wp-block-query-pagination { justify-content: space-between; margin-top: 36px !important; }
	.wp-block-query-pagination-numbers { order: 3; flex: 1 0 100%; gap: 4px; }
	.wp-block-query-pagination .page-numbers { min-width: 40px; height: 44px; padding: 0 8px; }
	.wp-block-query-pagination-next { margin-left: auto !important; }
}

/* ================================================================== */
/* 3. /guides/ hub (Fadi's request 7): DL_Guides_Hub::render()         */
/* ================================================================== */
.dl-main--guides .dl-sec { padding-top: 24px; padding-bottom: 88px; }
.dl-gh__hero {
	position: relative; border-radius: 24px; overflow: hidden; isolation: isolate;
	min-height: 380px; display: flex; flex-direction: column; justify-content: flex-end;
	padding: 56px 56px 44px;
}
.dl-gh__img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: center 40%; border-radius: 0 !important; }
.dl-gh__in { max-width: 720px; }
.dl-gh__hero .dl-pagetitle { font-size: 52px; margin: 6px 0 10px; color: #fff; }
.dl-gh__hero .dl-lead { color: rgba(255, 255, 255, .9); margin: 0; }
.dl-gh__search {
	display: flex; align-items: center; gap: 8px; margin: 24px 0 0; max-width: 600px;
	background: #fff; border-radius: 999px; padding: 6px 6px 6px 22px;
	box-shadow: 0 8px 28px rgba(0, 0, 0, .22);
}
.dl-gh__search input[type="search"] {
	flex: 1 1 auto; min-width: 0; border: 0; background: transparent; height: 44px;
	font: inherit; font-size: 16px; color: var(--dl-navy);
}
.dl-gh__search input[type="search"]::placeholder { color: var(--dl-muted); opacity: 1; }
.dl-gh__search input[type="search"]:focus { outline: none; }
.dl-gh__search:focus-within { outline: 3px solid var(--dl-sun); outline-offset: 3px; }
.dl-gh__go {
	display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 22px;
	border: 0; border-radius: 999px; background: var(--dl-lake); color: #fff;
	font: inherit; font-weight: 600; font-size: 15px; cursor: pointer;
}
.dl-gh__go:hover { background: var(--dl-navy); }
.dl-gh__go:focus-visible { outline: 3px solid var(--dl-navy); outline-offset: 2px; }
.dl-gh__kyl { margin: 18px 0 0; font-size: 14px; color: rgba(255, 255, 255, .85) !important; }
.dl-gh__kyl a { color: #fff; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

/* Filter bar: one white strip under the hero. */
.dl-gh__filters {
	display: flex; flex-wrap: wrap; align-items: flex-end; gap: 16px;
	margin: 24px 0 0; padding: 18px 20px; background: #fff;
	border: 1px solid var(--dl-line); border-radius: 18px;
}
.dl-gh__field { display: flex; flex-direction: column; gap: 6px; flex: 1 1 200px; min-width: 0; }
.dl-gh__field label { font-size: 13px; font-weight: 600; color: var(--dl-navy); }
.dl-gh__field select {
	height: 44px; padding: 0 40px 0 14px; border: 1px solid var(--dl-line); border-radius: 12px;
	background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%231C2B45' stroke-width='1.8'/%3E%3C/svg%3E") no-repeat right 14px center;
	appearance: none; -webkit-appearance: none; font: inherit; font-size: 15px; color: var(--dl-navy); width: 100%;
}
.dl-gh__field select:hover { border-color: var(--dl-navy); }
.dl-gh__field select:focus-visible { outline: 3px solid var(--dl-lake); outline-offset: 1px; border-color: var(--dl-navy); }
.dl-gh__apply, .dl-gh__empty .dl-gh__all {
	display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box;
	min-height: 44px; padding: 0 24px; border-radius: 999px; border: 1.5px solid var(--dl-navy);
	background: var(--dl-navy); color: #fff !important; font: inherit; font-size: 15px; font-weight: 600;
	text-decoration: none !important; cursor: pointer; flex: 0 0 auto;
}
.dl-gh__apply:hover { background: var(--dl-navy-2); }
.dl-gh__empty .dl-gh__all { background: #fff; color: var(--dl-navy) !important; }
.dl-gh__empty .dl-gh__all:hover { background: var(--dl-mist); }
.dl-gh__apply:focus-visible, .dl-gh__all:focus-visible { outline: 3px solid var(--dl-lake); outline-offset: 2px; }

.dl-gh__status { display: flex; align-items: baseline; gap: 16px; margin: 28px 0 0; }
.dl-gh__count { margin: 0; font-size: 15px; font-weight: 600; color: var(--dl-navy); }
.dl-gh__clear { font-size: 15px; color: var(--dl-lake); text-decoration: underline; text-underline-offset: 3px; }
.dl-gh__empty { margin: 20px 0 0; padding: 28px; background: var(--dl-mist); border: 1px solid var(--dl-line); border-radius: 16px; }
.dl-gh__empty p { margin: 0 0 14px; } .dl-gh__empty p:last-child { margin: 0; }
.dl-main--guides .dl-gx { margin-top: 20px !important; }
.dl-main--guides .dl-gx__grid { margin-top: 0; }
/* Guide cards with no featured image: the brand water texture, not a blank box. */
.dl-main--guides .dl-gx__card:not(:has(.dl-gx__img))::before {
	background: linear-gradient(180deg, rgba(28, 43, 69, .35) 0%, rgba(28, 43, 69, .85) 100%), url('../images/pro-band-1600.jpg') center / cover;
}

@media (max-width: 781px) {
	.dl-gh__hero { min-height: 0; padding: 32px 20px 24px; border-radius: 18px; }
	.dl-gh__hero .dl-pagetitle { font-size: 36px; }
	.dl-gh__search { padding-left: 16px; }
	.dl-gh__go span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }
	.dl-gh__go { padding: 0; width: 44px; justify-content: center; }
	.dl-gh__filters { padding: 16px; gap: 12px; }
	.dl-gh__field { flex: 1 1 100%; }
	.dl-gh__apply { width: 100%; justify-content: center; }
	.dl-main--guides .dl-sec { padding-bottom: 64px; }
}
