/*
Theme Name: Cardiff Landlord Forum
Theme URI: https://www.cardifflandlordforum.co.uk/
Description: Child theme of Twenty Twenty-Five for the Cardiff Landlord Forum. Magenta brand colours, Poppins and Source Serif 4, and block patterns for the home page and the speaker information page.
Author: Lobster Web Design
Author URI: https://lobsterwebdesign.co.uk/
Template: twentytwentyfive
Version: 1.0.0
Requires at least: 6.6
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: cardiff-landlord-forum
*/

/* ==========================================================================
   Colour tokens
   theme.json defines the palette. These short aliases keep the CSS readable.
   ========================================================================== */
:root {
	--clf-ground: var(--wp--preset--color--base);
	--clf-ink: var(--wp--preset--color--contrast);
	--clf-magenta: var(--wp--preset--color--accent-1);
	--clf-magenta-soft: var(--wp--preset--color--accent-2);
	--clf-on-magenta: var(--wp--preset--color--accent-3);
	--clf-grey: var(--wp--preset--color--accent-4);
	--clf-panel: var(--wp--preset--color--accent-5);
	--clf-line: var(--wp--preset--color--accent-6);
	--clf-field: var(--wp--preset--color--base);
	--clf-ui: var(--wp--preset--font-family--poppins);
	--clf-header-h: 72px;
}

/* Dark mode, following the visitor's device setting (as in the design).
   Delete this block to keep the site light at all times. */
@media (prefers-color-scheme: dark) {
	:root:not(.clf-light) {
		--wp--preset--color--base: #16151A;
		--wp--preset--color--contrast: #EEEDF2;
		--wp--preset--color--accent-1: #FF4FA3;
		--wp--preset--color--accent-2: #3A1D2D;
		--wp--preset--color--accent-3: #1A0710;
		--wp--preset--color--accent-4: #B4B3BC;
		--wp--preset--color--accent-5: #1F1E25;
		--wp--preset--color--accent-6: #34333B;
		--clf-field: #1B1A20;
		color-scheme: dark;
	}
}

/* ==========================================================================
   Base
   ========================================================================== */
html { scroll-padding-top: calc(var(--clf-header-h) + 16px); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
@media (max-width: 760px) { :root { --clf-header-h: 120px; } }

a { text-underline-offset: 3px; }
a:focus-visible,
button:focus-visible,
summary:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
	outline: 3px solid var(--clf-magenta);
	outline-offset: 2px;
	border-radius: 4px;
}
h1, h2, h3, h4 { text-wrap: balance; }

/* No gap between header, main and footer. */
:where(.wp-site-blocks) > * { margin-block-start: 0; }

/* ==========================================================================
   Header
   ========================================================================== */
.wp-site-blocks > header.wp-block-template-part,
.wp-site-blocks > .wp-block-template-part:has(> .clf-header) {
	position: sticky;
	top: var(--wp-admin--admin-bar--height, 0px);
	z-index: 50;
	background: var(--clf-ground);
}
.wp-block-group.clf-header {
	border-bottom: 1px solid var(--clf-line);
	padding-top: 12px;
	padding-bottom: 12px;
}
.clf-header-inner { gap: 8px 20px; }
.clf-logo { line-height: 0; }
.clf-logo a { display: inline-block; }
.clf-logo svg { height: 46px; width: auto; display: block; }

.clf-header .wp-block-navigation .wp-block-navigation__container { gap: 4px 22px; }
.clf-header .wp-block-navigation-item__content {
	color: var(--clf-ink);
	text-decoration: none;
	padding: 6px 0;
	border-bottom: 2px solid transparent;
}
.clf-header .wp-block-navigation-item__content:hover,
.clf-header .current-menu-item > .wp-block-navigation-item__content {
	border-bottom-color: var(--clf-magenta);
}
@media (max-width: 760px) {
	.clf-header-inner { flex-direction: column; align-items: flex-start !important; }
	.clf-header .wp-block-navigation .wp-block-navigation__container { gap: 2px 16px; }
	.clf-header .wp-block-navigation { font-size: 0.875rem; }
}

/* ==========================================================================
   Footer
   ========================================================================== */
.wp-block-group.clf-footer {
	padding-top: 40px;
	padding-bottom: 56px;
	font-family: var(--clf-ui);
	font-size: 0.875rem;
	color: var(--clf-grey);
}
.clf-footer p { margin: 0; }
.clf-footer a { color: inherit; }

/* ==========================================================================
   Shared section pieces
   ========================================================================== */
.wp-block-group.clf-section {
	padding-top: 72px;
	padding-bottom: 72px;
	border-bottom: 1px solid var(--clf-line);
}
@media (max-width: 600px) {
	.wp-block-group.clf-section { padding-top: 52px; padding-bottom: 52px; }
}
.clf-section h2.wp-block-heading { margin-bottom: 0; }
.clf-section .is-style-eyebrow + h2.wp-block-heading { margin-top: 10px; }
.clf-section h2.wp-block-heading + * { margin-top: 24px; }

/* Eyebrow label above headings */
p.is-style-eyebrow {
	font-family: var(--clf-ui);
	font-size: 0.8125rem;
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--clf-magenta);
	margin-bottom: 0;
}

/* Small grey note under a section */
p.clf-note {
	font-family: var(--clf-ui);
	font-size: 0.875rem;
	color: var(--clf-grey);
	max-width: 70ch;
}
.clf-section .wp-block-group > p.clf-note,
.clf-section > p.clf-note { margin-top: 28px; }

/* Two-column sections */
.wp-block-columns.clf-cols { column-gap: 48px; row-gap: 28px; margin-bottom: 0; }
.clf-cols .wp-block-column > p { max-width: 62ch; }
.clf-cols .wp-block-column > p:first-child { margin-top: 0; }
.clf-cols .wp-block-column > ul.wp-block-list:not([class*="is-style-"]) { padding-left: 20px; max-width: 62ch; }
.clf-cols .wp-block-column > ul.wp-block-list:not([class*="is-style-"]) li { margin-bottom: 8px; }
.clf-cols h3.wp-block-heading { margin-top: 28px; }

/* ==========================================================================
   List styles
   ========================================================================== */

/* Facts: label in the first column, detail in the second.
   Make the first word(s) of each item bold to form the label. */
ul.is-style-facts {
	list-style: none;
	margin: 0;
	padding: 0;
	border-top: 1px solid var(--clf-line);
}
ul.is-style-facts > li {
	position: relative;
	padding: 14px 0 14px 166px;
	border-bottom: 1px solid var(--clf-line);
	font-size: 1rem;
	margin: 0;
}
ul.is-style-facts > li > strong:first-child {
	position: absolute;
	left: 0;
	top: 17px;
	width: 150px;
	font-family: var(--clf-ui);
	font-size: 0.8125rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--clf-grey);
	line-height: 1.4;
}
@media (max-width: 480px) {
	ul.is-style-facts > li { padding-left: 0; }
	ul.is-style-facts > li > strong:first-child { position: static; display: block; width: auto; margin-bottom: 2px; }
}

/* Meetings: date in bold, then the description */
ul.is-style-meetings {
	list-style: none;
	margin: 0;
	padding: 0;
}
ul.is-style-meetings > li {
	position: relative;
	padding: 12px 0 12px 148px;
	border-top: 1px solid var(--clf-line);
	font-size: 1rem;
	line-height: 1.5;
	margin: 0;
}
ul.is-style-meetings > li > strong:first-child {
	position: absolute;
	left: 0;
	top: 14px;
	width: 130px;
	font-family: var(--clf-ui);
	font-size: 0.875rem;
	font-weight: 600;
	font-variant-numeric: tabular-nums;
	color: var(--clf-ink);
}
@media (max-width: 520px) {
	ul.is-style-meetings > li { padding-left: 0; }
	ul.is-style-meetings > li > strong:first-child { position: static; display: block; width: auto; margin-bottom: 2px; }
}

/* Numbered steps as cards. Bold the first line of each item for its title. */
ol.is-style-steps {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 14px;
	counter-reset: clf-step;
}
ol.is-style-steps > li {
	background: var(--clf-panel);
	border-top: 3px solid var(--clf-magenta);
	padding: 18px 20px 20px;
	counter-increment: clf-step;
	font-size: 1rem;
	line-height: 1.5;
	margin: 0;
}
ol.is-style-steps > li::before {
	content: counter(clf-step);
	display: block;
	font-family: var(--clf-ui);
	font-size: 1.75rem;
	font-weight: 700;
	color: var(--clf-magenta);
	line-height: 1;
	margin-bottom: 10px;
}
ol.is-style-steps > li > strong:first-child {
	display: block;
	font-family: var(--clf-ui);
	font-size: 0.9375rem;
	font-weight: 600;
	margin-bottom: 4px;
}

/* Plain list: no bullets, used for link lists */
ul.is-style-plain {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 8px;
	font-size: 1rem;
}
ul.is-style-plain > li { margin: 0; }

/* ==========================================================================
   Past meetings: year accordions (Details block, "Year" style)
   Write the summary as "2025 _5 meetings_" - the italic part shows on the right.
   ========================================================================== */
.clf-archive > * + * { margin-top: 10px !important; }
details.is-style-year {
	border: 1px solid var(--clf-line);
	border-radius: 6px;
	background: var(--clf-ground);
}
details.is-style-year[open] { background: var(--clf-panel); }
details.is-style-year > summary {
	cursor: pointer;
	list-style: none;
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 16px 20px;
	font-family: var(--clf-ui);
	font-size: 1.25rem;
	font-weight: 600;
	line-height: 1.3;
}
details.is-style-year > summary::-webkit-details-marker { display: none; }
details.is-style-year > summary em {
	margin-left: auto;
	font-style: normal;
	font-size: 0.875rem;
	font-weight: 500;
	color: var(--clf-grey);
}
details.is-style-year > summary::after {
	content: "+";
	font-size: 1.375rem;
	font-weight: 400;
	color: var(--clf-magenta);
	margin-left: 12px;
	width: 1ch;
	text-align: center;
}
details.is-style-year > summary:not(:has(em))::after { margin-left: auto; }
details.is-style-year[open] > summary::after { content: "\2013"; }
details.is-style-year > *:not(summary) { margin: 0 20px; }
details.is-style-year > *:last-child:not(summary) { margin-bottom: 18px; }

/* ==========================================================================
   Next meeting band
   ========================================================================== */
.wp-block-group.clf-next {
	background: var(--clf-magenta);
	color: var(--clf-on-magenta);
	position: relative;
	overflow: hidden;
	padding-top: 56px;
	padding-bottom: 60px;
}
/* Faint two-houses watermark from the logo */
.clf-next::before {
	content: "";
	position: absolute;
	right: -120px;
	top: -60px;
	width: 520px;
	height: 480px;
	background: currentColor;
	opacity: 0.13;
	-webkit-mask: url("assets/images/houses.svg") no-repeat center / contain;
	mask: url("assets/images/houses.svg") no-repeat center / contain;
	pointer-events: none;
}
.clf-next > * { position: relative; z-index: 1; }
.clf-next a { color: inherit; }
.clf-next .is-style-card a { color: var(--clf-magenta); }
.clf-next p.is-style-eyebrow { color: inherit; opacity: 0.85; }
.wp-block-columns.clf-next-cols { column-gap: 48px; row-gap: 32px; margin: 0; }
.clf-next h1.wp-block-heading {
	font-size: clamp(2.5rem, 6vw, 4rem);
	letter-spacing: -0.015em;
	margin: 12px 0 18px;
}
p.clf-meta {
	font-family: var(--clf-ui);
	font-size: 1.0625rem;
	line-height: 1.55;
	margin: 0;
}
p.clf-pill {
	width: fit-content;
	margin-top: 22px;
	font-family: var(--clf-ui);
	font-size: 0.875rem;
	font-weight: 600;
	line-height: 1.4;
	border: 1.5px solid currentColor;
	border-radius: 999px;
	padding: 6px 14px;
}
.clf-next .wp-block-column > .wp-block-group + .wp-block-group { margin-top: 14px; }
@media (max-width: 860px) {
	.wp-block-group.clf-next { padding-top: 40px; padding-bottom: 44px; }
}

/* Speaker cards (Group block, "Card" and "Card outline" styles).
   Put the photo first, then the title, name, role, summary and link. */
.wp-block-group.is-style-card,
.wp-block-group.is-style-card-outline {
	display: grid;
	grid-template-columns: 76px minmax(0, 1fr);
	column-gap: 18px;
	row-gap: 0;
	align-items: start;
	align-content: start;
	border-radius: 6px;
	padding: 20px 22px;
}
.wp-block-group.is-style-card {
	background: var(--clf-ground);
	color: var(--clf-ink);
}
.wp-block-group.is-style-card-outline {
	background: transparent;
	color: inherit;
	border: 1.5px solid color-mix(in srgb, currentColor 45%, transparent);
}
.wp-block-group.is-style-card > *,
.wp-block-group.is-style-card-outline > * {
	grid-column: 2;
	margin: 6px 0 0;
	max-width: none;
}
.wp-block-group.is-style-card > :first-child,
.wp-block-group.is-style-card-outline > :first-child,
.wp-block-group.is-style-card > :is(.wp-block-image, .wp-block-post-featured-image) + *,
.wp-block-group.is-style-card-outline > :is(.wp-block-image, .wp-block-post-featured-image) + * { margin-top: 0; }
.wp-block-group.is-style-card > .wp-block-image,
.wp-block-group.is-style-card-outline > .wp-block-image,
.wp-block-group.is-style-card > .wp-block-post-featured-image,
.wp-block-group.is-style-card-outline > .wp-block-post-featured-image {
	grid-column: 1;
	grid-row: 1 / span 12;
	margin-top: 0;
}
.is-style-card p, .is-style-card-outline p { font-size: 1rem; line-height: 1.55; }
.is-style-card .clf-talk-desc { margin-top: 10px; }
@media (max-width: 420px) {
	.wp-block-group.is-style-card,
	.wp-block-group.is-style-card-outline { grid-template-columns: 60px minmax(0, 1fr); }
	.wp-block-image.is-style-avatar img,
	.wp-block-post-featured-image.is-style-avatar img { width: 60px; height: 60px; }
}
.clf-talk-title {
	font-family: var(--clf-ui);
	font-size: 1.1875rem;
	font-weight: 600;
	line-height: 1.3;
}
p.clf-who {
	font-family: var(--clf-ui);
	font-size: 0.9375rem;
	font-weight: 600;
	line-height: 1.4;
}
p.clf-role {
	font-family: var(--clf-ui);
	font-size: 0.875rem;
	color: var(--clf-grey);
	line-height: 1.45;
}
.is-style-card-outline p.clf-role { color: inherit; opacity: 0.85; }
p.clf-web {
	font-family: var(--clf-ui);
	font-size: 0.875rem;
	font-weight: 600;
}

/* Round photo (Image and Post Featured Image blocks, "Round photo" style) */
.wp-block-image.is-style-avatar,
.wp-block-post-featured-image.is-style-avatar { margin: 0; width: auto; height: auto; }
.wp-block-image.is-style-avatar img,
.wp-block-post-featured-image.is-style-avatar img {
	width: 76px;
	height: 76px;
	border-radius: 50%;
	object-fit: cover;
	border: 3px solid var(--clf-magenta);
	background: var(--clf-panel);
}

/* ==========================================================================
   Page hero (speaker page and other inner pages)
   ========================================================================== */
.wp-block-group.clf-hero {
	background: var(--clf-magenta);
	color: var(--clf-on-magenta);
	padding-top: 56px;
	padding-bottom: 60px;
}
.clf-hero a { color: inherit; }
.clf-hero p.is-style-eyebrow { color: inherit; opacity: 0.85; }
.clf-hero h1.wp-block-heading { max-width: 18ch; margin: 12px 0 16px; }
.clf-hero p:not(.is-style-eyebrow) {
	font-family: var(--clf-ui);
	font-size: 1.0625rem;
	max-width: 60ch;
	margin: 0;
}

/* ==========================================================================
   Committee and useful links
   ========================================================================== */
.wp-block-group.clf-people { gap: 14px; }
.wp-block-group.is-style-person {
	border-top: 3px solid var(--clf-magenta);
	background: var(--clf-panel);
	padding: 16px 18px 18px;
}
.wp-block-group.is-style-person > * { margin: 0; }
p.clf-person-name {
	font-family: var(--clf-ui);
	font-size: 1.125rem;
	font-weight: 600;
	line-height: 1.3;
}
.wp-block-group.clf-linkgroups { gap: 28px 40px; }
.clf-linkgroups h3.wp-block-heading { font-size: 1rem; margin: 0 0 10px; }
.clf-linkgroups .wp-block-group > * { margin-top: 0; }

/* ==========================================================================
   Speaker form (Contact Form 7 - see extras/cf7-speaker-form.txt)
   ========================================================================== */
.wpcf7 { max-width: 760px; }
.wpcf7 form.wpcf7-form { display: grid; gap: 36px; }
.wpcf7 fieldset { border: 0; margin: 0; padding: 0; display: grid; gap: 18px; min-width: 0; }
.wpcf7 legend {
	font-family: var(--clf-ui);
	font-size: 1.25rem;
	font-weight: 600;
	padding: 0;
	margin-bottom: 6px;
}
.wpcf7 .clf-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: end; }
@media (max-width: 620px) { .wpcf7 .clf-row { grid-template-columns: 1fr; } }
.wpcf7 label.clf-f {
	display: grid;
	gap: 6px;
	font-family: var(--clf-ui);
	font-size: 0.875rem;
	font-weight: 600;
	line-height: 1.4;
}
.wpcf7 label.clf-f small {
	font-weight: 400;
	color: var(--clf-grey);
	font-size: 0.8125rem;
}
.wpcf7 .wpcf7-form-control-wrap { display: block; }
.wpcf7 input[type="text"],
.wpcf7 input[type="email"],
.wpcf7 input[type="tel"],
.wpcf7 input[type="url"],
.wpcf7 select,
.wpcf7 textarea {
	font: 1rem/1.4 var(--clf-ui);
	color: var(--clf-ink);
	background: var(--clf-field);
	border: 1.5px solid var(--clf-line);
	border-radius: 6px;
	padding: 11px 12px;
	width: 100%;
	box-sizing: border-box;
}
.wpcf7 textarea { min-height: 110px; height: 110px; resize: vertical; }
.wpcf7 textarea.clf-short { min-height: 80px; height: 80px; }
.wpcf7 input:focus, .wpcf7 select:focus, .wpcf7 textarea:focus { border-color: var(--clf-magenta); }

/* Upload drop zones */
.wpcf7 .clf-drop {
	position: relative;
	border: 2px dashed var(--clf-line);
	border-radius: 8px;
	padding: 22px;
	display: grid;
	grid-template-columns: auto minmax(0, 1fr);
	gap: 16px;
	align-items: center;
	background: var(--clf-panel);
}
.wpcf7 .clf-drop:focus-within, .wpcf7 .clf-drop.has-file { border-color: var(--clf-magenta); }
.wpcf7 .clf-drop .wpcf7-form-control-wrap { position: static; grid-column: 1 / -1; }
.wpcf7 .clf-drop .wpcf7-form-control-wrap:not(:has(.wpcf7-not-valid-tip)) { display: contents; }
.wpcf7 .clf-drop input[type="file"] {
	position: absolute;
	inset: 0;
	opacity: 0;
	cursor: pointer;
	width: 100%;
	height: 100%;
}
.wpcf7 .clf-pv {
	width: 72px;
	height: 72px;
	border-radius: 50%;
	background: var(--clf-ground);
	border: 3px solid var(--clf-magenta);
	object-fit: cover;
	display: grid;
	place-items: center;
	color: var(--clf-magenta);
	font-family: var(--clf-ui);
	font-size: 1.625rem;
	line-height: 1;
}
.wpcf7 .clf-pv.clf-doc { border-radius: 8px; }
.wpcf7 .clf-drop b { display: block; font-family: var(--clf-ui); font-size: 0.9375rem; font-weight: 600; line-height: 1.4; }
.wpcf7 .clf-drop .clf-drop-name { display: block; font-family: var(--clf-ui); font-size: 0.8125rem; color: var(--clf-grey); overflow-wrap: anywhere; line-height: 1.45; }

/* Permission checkboxes */
.wpcf7 .wpcf7-checkbox, .wpcf7 .wpcf7-acceptance { display: block; }
.wpcf7 .wpcf7-list-item { display: block; margin: 0; }
.wpcf7 .wpcf7-list-item label {
	display: grid;
	grid-template-columns: 22px minmax(0, 1fr);
	gap: 10px;
	font-family: var(--clf-ui);
	font-size: 0.9375rem;
	line-height: 1.5;
	align-items: start;
	cursor: pointer;
}
.wpcf7 .wpcf7-list-item input[type="checkbox"] {
	width: 18px;
	height: 18px;
	margin: 3px 0 0;
	accent-color: var(--clf-magenta);
}

/* Submit and messages */
.wpcf7 .clf-submit { display: flex; align-items: center; gap: 12px; }
.wpcf7 input.wpcf7-submit {
	font: 600 1rem var(--clf-ui);
	background: var(--clf-magenta);
	color: var(--clf-on-magenta);
	border: 0;
	border-radius: 999px;
	padding: 14px 28px;
	cursor: pointer;
}
.wpcf7 input.wpcf7-submit:hover { background: var(--clf-ink); color: var(--clf-ground); }
.wpcf7 .wpcf7-not-valid-tip { color: var(--clf-magenta); font-family: var(--clf-ui); font-size: 0.8125rem; font-weight: 500; margin-top: 4px; }
.wpcf7 form .wpcf7-response-output {
	margin: 0;
	background: var(--clf-magenta-soft);
	border: 0;
	border-left: 4px solid var(--clf-magenta);
	padding: 18px 20px;
	font-family: var(--clf-ui);
	font-size: 0.9375rem;
	color: var(--clf-ink);
}

/* Full-width sections template: sections sit flush against each other. */
.clf-main > .wp-block-post-content > .alignfull { margin-top: 0; margin-bottom: 0; }

/* Inside the 1120px sections, left-align narrower items (notes, intro text,
   the form) with the rest of the content instead of centring them. */
.clf-section.is-layout-constrained > :not(.alignfull),
.clf-hero.is-layout-constrained > :not(.alignfull),
.clf-next.is-layout-constrained > :not(.alignfull) {
	margin-left: max(0px, calc((100% - 1120px) / 2)) !important;
	margin-right: auto !important;
}

/* Speaker cards pulled from "Next meeting" posts (Query Loop) */
.clf-talks .wp-block-post-template {
	display: grid;
	gap: 14px;
	list-style: none;
	margin: 0;
	padding: 0;
}
.clf-talks .wp-block-post-template > li { margin: 0; }
.clf-talks .wp-block-post.clf-outline { order: 99; }
.clf-talks .clf-outline > .wp-block-group.is-style-card {
	background: transparent;
	color: inherit;
	border: 1.5px solid color-mix(in srgb, currentColor 45%, transparent);
}
.clf-talks .clf-outline p.clf-role { color: inherit; opacity: 0.85; }
.clf-talks .clf-outline .clf-web a { color: inherit; }
.clf-talks h3.clf-talk-title { margin: 0; font-size: 1.1875rem; }
.clf-talks .clf-talk-title a { color: inherit; text-decoration: none; }
.clf-talks .wp-block-post-excerpt { margin-top: 10px; }
.clf-talks .wp-block-post-excerpt__excerpt { margin: 0; }
.clf-talks .wp-block-post-excerpt__more-text { display: none; }
.clf-talks p:empty,
.clf-talks .wp-block-post-excerpt:not(:has(.wp-block-post-excerpt__excerpt:not(:empty))) { display: none; }
p.clf-talks-empty {
	font-family: var(--clf-ui);
	font-size: 1rem;
	border: 1.5px dashed color-mix(in srgb, currentColor 45%, transparent);
	border-radius: 6px;
	padding: 20px 22px;
	margin: 0;
}
