/*
Theme Name:   Kadence Child – Lydford
Theme URI:    https://www.lydford.co.uk/
Description:  Child theme of Kadence for lydford.co.uk. Put custom CSS and template changes here so they survive Kadence updates.
Template:     kadence
Version:      1.1.5
Text Domain:  kadence-child
*/

/* ------------------------------------------------------------------
   Homepage (2026 refresh)
   Sections are core blocks with these class names, so they can still
   be edited in the block editor.
------------------------------------------------------------------- */

:root {
	--lyd-moss: #2f4a3a;      /* band and accents */
	--lyd-moss-dark: #22372b; /* hover */
	--lyd-mist: #eef2ee;      /* tile background */
	--lyd-ink: #1f2d24;       /* tile text */
	--lyd-stone: #f4f5f3;     /* news / signup background */
}

/* Full-width aerial image directly under the header.
   Selector is deliberately specific enough to beat core's
   ".wp-block-image.alignfull img { height: auto }". */
.lyd-hero.wp-block-image {
	position: relative;
	margin: 0 !important;
}
.wp-block-image.alignfull.lyd-hero img,
.lyd-hero.wp-block-image img {
	display: block;
	width: 100%;
	height: clamp(220px, 34vw, 460px);
	object-fit: cover;
	object-position: 50% 45%;
}
.lyd-hero figcaption,
.lyd-hero .wp-element-caption {
	position: absolute;
	right: 0.5rem;
	bottom: 0.3rem;
	margin: 0;
	padding: 0;
	font-size: 0.7rem;
	color: #fff;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.85);
}

/* Welcome band beneath the image */
.lyd-welcome.wp-block-group {
	margin: 0 !important;
	padding: 1.75rem 1.25rem 2rem;
	background: var(--lyd-moss);
	color: #fff;
	text-align: center;
}
.lyd-welcome h1 {
	margin: 0 0 0.5rem;
	color: #fff;
	font-size: clamp(1.6rem, 3.2vw, 2.25rem);
}
.lyd-welcome p {
	max-width: 42rem;
	margin: 0 auto;
	color: #e3ebe5;
}

/* Quick-link tiles: 1 column on small phones, 2 on larger phones and
   tablets, 3 on desktop. WordPress may wrap the links in an inner
   container, so the grid is applied to whichever holds them. */
.lyd-tiles.wp-block-group {
	max-width: 1200px;
	margin: 2rem auto 0.75rem !important;
	padding: 0 1.25rem;
}
.lyd-tiles.wp-block-group,
.lyd-tiles > .wp-block-group__inner-container {
	display: grid;
	grid-template-columns: 1fr;
	gap: 0.75rem;
}
.lyd-tiles:has(> .wp-block-group__inner-container) {
	display: block;
}
@media (min-width: 480px) {
	.lyd-tiles.wp-block-group,
	.lyd-tiles > .wp-block-group__inner-container {
		grid-template-columns: repeat(2, 1fr);
	}
}
@media (min-width: 900px) {
	.lyd-tiles.wp-block-group,
	.lyd-tiles > .wp-block-group__inner-container {
		grid-template-columns: repeat(3, 1fr);
	}
}
.lyd-tiles p {
	margin: 0 !important;
}
.lyd-tiles a {
	display: flex;
	align-items: center;
	justify-content: space-between;
	min-height: 3.5rem;
	height: 100%;
	padding: 0.85rem 1.1rem;
	background: var(--lyd-mist);
	border-left: 4px solid var(--lyd-moss);
	color: var(--lyd-ink);
	font-weight: 600;
	text-decoration: none;
}
.lyd-tiles a::after {
	content: "\203A";
	margin-left: 1rem;
	font-size: 1.6rem;
	line-height: 1;
	color: var(--lyd-moss);
}
.lyd-tiles a:hover,
.lyd-tiles a:focus-visible {
	background: var(--lyd-moss);
	color: #fff;
}
.lyd-tiles a:hover::after,
.lyd-tiles a:focus-visible::after {
	color: #fff;
}
.lyd-tiles a:focus-visible {
	outline: 3px solid #f2c94c;
	outline-offset: 2px;
}
.lyd-small {
	max-width: 1200px;
	margin: 0 auto 2.5rem !important;
	padding: 0 1.25rem;
	font-size: 0.85rem;
}

/* Latest news */
.lyd-news.wp-block-group {
	margin: 0 !important;
	padding: 2.5rem 1.25rem;
	background: var(--lyd-stone);
}
.lyd-news > * {
	max-width: 1200px;
	margin-left: auto !important;
	margin-right: auto !important;
}
.lyd-news h2 {
	margin-top: 0;
	text-align: center;
}

/* Email signup, now below the news */
.lyd-signup.wp-block-group {
	margin: 0 !important;
	padding: 2.5rem 1.25rem;
}
.lyd-signup > * {
	max-width: 40rem;
	margin-left: auto !important;
	margin-right: auto !important;
}
.lyd-signup h2 {
	margin-top: 0;
}

/* ------------------------------------------------------------------
   Content pages: make linked headings (e.g. business names on the
   Accommodation page) look clickable.
------------------------------------------------------------------- */
.entry-content h2 > a,
.entry-content h3 > a {
	color: var(--lyd-moss);
	text-decoration: underline;
	text-underline-offset: 0.15em;
	text-decoration-thickness: 1px;
}
.entry-content h2 > a:hover,
.entry-content h3 > a:hover,
.entry-content h2 > a:focus-visible,
.entry-content h3 > a:focus-visible {
	color: var(--lyd-moss-dark);
	text-decoration-thickness: 2px;
}

/* ------------------------------------------------------------------
   Accessibility fixes
------------------------------------------------------------------- */

/* WCAG 2.5.8 Target Size: MailPoet's list checkboxes are 13px by
   default; make them at least 24px and give the labels room. */
.mailpoet_form input[type="checkbox"],
.mailpoet_form input[type="radio"] {
	width: 24px !important;
	height: 24px !important;
	margin: 0 0.5rem 0 0 !important;
	vertical-align: middle;
	accent-color: var(--lyd-moss);
}
.mailpoet_form .mailpoet_checkbox_label,
.mailpoet_form .mailpoet_radio_label {
	display: inline-flex !important;
	align-items: center;
	min-height: 32px;
}
