/*
Theme Name: Friends of Ling Moor
Theme URI: https://friendsoflingmoor.co.uk
Author: Bright Spark Solutions
Description: A bright, friendly block theme for the Friends of Ling Moor PTA – events, disco tickets, fundraising goals and meet-the-committee pages. Pair it with the "Friends of Ling Moor – Core" and "Disco Tickets" plugins.
Version: 1.0.9
Requires at least: 6.5
Tested up to: 7.1
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: friends-of-ling-moor
Tags: block-patterns, full-site-editing, education, custom-colors, wide-blocks
*/

/* ---------- Base ---------- */
html { scroll-behavior: smooth; }
body { -webkit-font-smoothing: antialiased; }
:where(.wp-site-blocks) > * { margin-block-start: 0; }
::selection { background: var(--wp--preset--color--accent); color: var(--wp--preset--color--ink); }
:focus-visible { outline: 3px solid var(--wp--preset--color--secondary); outline-offset: 2px; }
img { height: auto; max-width: 100%; }

/* ---------- Buttons ---------- */
.wp-element-button, .wp-block-button__link { box-shadow: 0 4px 0 rgba(0, 0, 0, .14); transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease; text-decoration: none; }
.wp-element-button:hover, .wp-block-button__link:hover { transform: translateY(-2px); box-shadow: 0 6px 0 rgba(0, 0, 0, .14); }
.wp-block-button.is-style-sunshine .wp-block-button__link { background: var(--wp--preset--color--accent); color: var(--wp--preset--color--ink); }
.wp-block-button.is-style-sunshine .wp-block-button__link:hover { background: #ffbb10; color: var(--wp--preset--color--ink); }
.wp-block-button.is-style-outline .wp-block-button__link { background: transparent; color: var(--wp--preset--color--primary); border: 3px solid currentColor; box-shadow: none; padding: calc(.85em - 3px) calc(1.6em - 3px); }
.wp-block-button.is-style-outline .wp-block-button__link:hover { background: var(--wp--preset--color--primary); color: #fff; border-color: var(--wp--preset--color--primary); }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 100; background: #fff; border-bottom: 4px solid var(--wp--preset--color--accent); padding-block: .8rem; overflow: visible; }
.admin-bar .site-header { top: var(--wp-admin--admin-bar--height, 32px); }
@media (max-width: 600px) { .admin-bar .site-header { top: 0; } }
.site-header__inner { gap: 1rem; }
.site-brand { gap: .75rem; min-width: 0; }
.site-brand::before { content: ""; flex: none; width: 76px; height: 76px; background: url(assets/images/logo.png) center / contain no-repeat; }
.site-brand:has(.wp-block-site-logo img)::before { display: none; }
.site-brand .wp-block-site-logo { flex: none; line-height: 0; }
.site-brand .wp-block-site-logo img { width: 76px; height: 76px; object-fit: contain; }
.site-brand__text { gap: 0; }
.site-brand .wp-block-site-tagline { margin: 0; }
.site-header__right { gap: 1.25rem; }
.site-nav .wp-block-navigation-item__content { padding: .45em .8em; border-radius: 999px; color: var(--wp--preset--color--ink); transition: background-color .15s, color .15s; }
.site-nav .wp-block-navigation-item__content:hover,
.site-nav .current-menu-item > .wp-block-navigation-item__content { background: var(--wp--preset--color--sky); color: var(--wp--preset--color--primary); }
.site-nav .wp-block-navigation__container { gap: .15rem; }
.site-header__cta .wp-block-button__link { padding: .65em 1.3em; font-size: .95rem; }
.wp-block-navigation__responsive-container.is-menu-open {
	position: fixed !important;
	z-index: 100000 !important;
	inset: 0;
	width: auto !important;
	height: auto !important;
	max-width: none;
	overflow: auto;
	box-sizing: border-box;
	background: var(--wp--preset--color--cream) !important;
	padding: 5.5rem 1.5rem 2rem;
}
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container {
	width: 100%;
	align-items: center !important;
	justify-content: flex-start !important;
	gap: 0.35rem;
}
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item,
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
	width: 100%;
	justify-content: center;
	text-align: center;
}
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content { font-size: 1.4rem; font-family: var(--wp--preset--font-family--heading); }
.wp-block-navigation__responsive-container-open { background: var(--wp--preset--color--sky); border-radius: 12px; padding: 8px; }
@media (max-width: 1220px) {
	.site-nav .wp-block-navigation__responsive-container:not(.is-menu-open) { display: none !important; }
	.site-nav .wp-block-navigation__responsive-container-open { display: flex !important; }
}
@media (max-width: 900px) { .site-brand .wp-block-site-tagline { display: none; } }
@media (max-width: 560px) {
	.site-header__right { gap: .5rem; }
	.site-header__cta .wp-block-button__link { padding: .5em .9em; font-size: .8rem; white-space: nowrap; }
	.site-brand::before,
	.site-brand .wp-block-site-logo img { width: 52px; height: 52px; }
	.site-brand .wp-block-site-title { font-size: 1.1rem; }
}

/* ---------- Page hero (inner pages) ---------- */
.page-hero {
	position: relative; text-align: center; color: #fff; overflow: hidden;
	padding-top: calc(var(--wp--preset--spacing--60) + 30px); padding-bottom: calc(var(--wp--preset--spacing--60) + 20px);
	background:
		url(assets/images/bunting.svg) top center / 240px 60px repeat-x,
		radial-gradient(circle at 8% 70%, rgba(255, 201, 60, .35) 0 40px, transparent 41px),
		radial-gradient(circle at 92% 40%, rgba(232, 65, 122, .45) 0 70px, transparent 71px),
		radial-gradient(circle at 75% 110%, rgba(31, 163, 154, .45) 0 90px, transparent 91px),
		var(--wp--preset--gradient--disco);
	margin-bottom: var(--wp--preset--spacing--50);
	clip-path: ellipse(120% 100% at 50% 0%);
}
.page-hero h1, .page-hero .wp-block-post-title, .page-hero .wp-block-query-title { color: #fff; margin: 0 auto; max-width: 900px; }
.page-hero .folm-kicker, .page-hero .wp-block-post-date { color: var(--wp--preset--color--accent); margin-bottom: .5rem; }
.page-featured img { border-radius: 24px; box-shadow: 0 10px 30px rgba(29, 31, 58, .12); }
.page-content { padding-bottom: var(--wp--preset--spacing--60); }
.back-link { margin-bottom: var(--wp--preset--spacing--60) !important; }
.back-link a { font-weight: 800; text-decoration: none; }

.folm-kicker { text-transform: uppercase; letter-spacing: .14em; font-weight: 800; font-size: .85rem; color: var(--wp--preset--color--secondary); margin: 0; }
.folm-lead { font-size: var(--wp--preset--font-size--large); line-height: 1.55; }

/* ---------- Landing page sections (Home) ---------- */
.site-main--landing .wp-block-post-content > .alignfull { margin-block: 0; }
.site-main--landing .wp-block-post-content > *:last-child { margin-bottom: 0; }

.folm-hero {
	position: relative; overflow: hidden; color: #fff; text-align: center;
	padding-top: calc(var(--wp--preset--spacing--70) + 20px); padding-bottom: calc(var(--wp--preset--spacing--70) + 30px);
	background:
		url(assets/images/bunting.svg) top center / 240px 60px repeat-x,
		radial-gradient(circle at 6% 30%, rgba(255, 201, 60, .5) 0 18px, transparent 19px),
		radial-gradient(circle at 14% 80%, rgba(31, 163, 154, .55) 0 46px, transparent 47px),
		radial-gradient(circle at 88% 22%, rgba(232, 65, 122, .55) 0 60px, transparent 61px),
		radial-gradient(circle at 95% 75%, rgba(255, 201, 60, .4) 0 26px, transparent 27px),
		radial-gradient(circle at 70% 105%, rgba(124, 198, 242, .35) 0 120px, transparent 121px),
		var(--wp--preset--gradient--disco);
	clip-path: ellipse(140% 100% at 50% 0%);
}
.folm-hero > * { position: relative; }
.folm-hero h1 { color: #fff; max-width: 880px; margin-inline: auto !important; text-wrap: balance; }
.folm-hero .folm-kicker { color: var(--wp--preset--color--accent); }
.folm-hero .folm-lead { max-width: 680px; margin-inline: auto !important; opacity: .95; font-size: clamp(1.1rem, 2vw, 1.3rem); }
.folm-hero .wp-block-buttons { justify-content: center; margin-top: 2rem; gap: 1rem; }
.folm-hero .is-style-outline .wp-block-button__link { color: #fff; }
.folm-hero .is-style-outline .wp-block-button__link:hover { background: #fff; color: var(--wp--preset--color--primary); border-color: #fff; }
.folm-hero::after {
	content: "🪩"; position: absolute; right: 7%; top: 28%; font-size: clamp(2.5rem, 6vw, 5rem);
	animation: folm-float 5s ease-in-out infinite; pointer-events: none;
}
@keyframes folm-float { 0%, 100% { transform: translateY(0) rotate(-6deg); } 50% { transform: translateY(-14px) rotate(6deg); } }
@media (prefers-reduced-motion: reduce) { .folm-hero::after { animation: none; } html { scroll-behavior: auto; } }
@media (max-width: 700px) { .folm-hero::after { display: none; } }

.folm-section { padding-block: var(--wp--preset--spacing--60); }
.folm-section--tint { background: var(--wp--preset--color--sky); }
.folm-section > h2 + p { margin-top: .5rem; }

.folm-features { gap: 1.5rem !important; }
.folm-feature { background: #fff; border-radius: 24px; padding: 2rem 1.75rem; box-shadow: 0 10px 30px rgba(29, 31, 58, .08); border-top: 8px solid var(--wp--preset--color--secondary); }
.folm-feature--yellow { border-top-color: var(--wp--preset--color--accent); }
.folm-feature--teal { border-top-color: var(--wp--preset--color--teal); }
.folm-feature h3 { margin-top: .5rem; }
.folm-feature__icon { font-size: 2.6rem; line-height: 1; margin: 0; }
.folm-feature > * { margin-block: .5rem 0; }

.folm-cta {
	text-align: center; color: var(--wp--preset--color--ink); padding-block: var(--wp--preset--spacing--60);
	background:
		radial-gradient(circle at 10% 20%, rgba(255, 255, 255, .5) 0 30px, transparent 31px),
		radial-gradient(circle at 90% 80%, rgba(232, 65, 122, .25) 0 60px, transparent 61px),
		var(--wp--preset--gradient--sunshine);
}
.folm-cta h2 { color: var(--wp--preset--color--primary); }
.folm-cta p { max-width: 600px; margin-inline: auto !important; }
.folm-cta .is-style-sunshine .wp-block-button__link { background: var(--wp--preset--color--primary); color: #fff; }
.folm-cta .is-style-sunshine .wp-block-button__link:hover { background: var(--wp--preset--color--secondary); }

.folm-callout { background: #fff; border-radius: 24px; padding: 2rem; border: 3px dashed var(--wp--preset--color--accent); margin-top: var(--wp--preset--spacing--50); }
.folm-ticks { list-style: none; padding-left: 0; }
.folm-ticks li { position: relative; padding-left: 2rem; margin: .4rem 0; }
.folm-ticks li::before { content: "✓"; position: absolute; left: 0; top: 0; width: 1.4rem; height: 1.4rem; border-radius: 50%; background: var(--wp--preset--color--teal); color: #fff; font-size: .8rem; font-weight: 800; display: flex; align-items: center; justify-content: center; margin-top: .2rem; }
.folm-join-section { margin-top: var(--wp--preset--spacing--60) !important; gap: 2.5rem !important; }

/* Card group style */
.wp-block-group.is-style-card { background: #fff; border-radius: 24px; padding: 1.25rem 1.25rem 1.5rem; box-shadow: 0 10px 30px rgba(29, 31, 58, .08); gap: .5rem; height: 100%; }
.wp-block-group.is-style-card .wp-block-post-featured-image img { border-radius: 16px; }
.wp-block-group.is-style-card .wp-block-post-title { margin: 0; }

/* ---------- Legal pages ---------- */
.folm-legal-updated { display: inline-block; background: var(--wp--preset--color--sky); padding: .35em 1em; border-radius: 999px; font-size: .9rem; font-weight: 700; }
.page-content h2.wp-block-heading { margin-top: 2.5rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--wp--preset--color--ink); color: #d8dbf3; padding-top: var(--wp--preset--spacing--60); padding-bottom: 1.5rem; position: relative; margin-top: 0; }
.site-footer::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 8px; background: linear-gradient(90deg, var(--wp--preset--color--secondary) 0 25%, var(--wp--preset--color--accent) 25% 50%, var(--wp--preset--color--teal) 50% 75%, #7cc6f2 75%); }
.site-footer h3 { color: var(--wp--preset--color--accent); font-size: 1.15rem; }
.site-footer a { color: #fff; }
.site-footer a:hover { color: var(--wp--preset--color--accent); }
.site-footer .site-footer__title a { color: #fff; }
.site-footer__links { list-style: none; padding: 0; }
.site-footer__links li { margin: .35rem 0; }
.site-footer__links a { text-decoration: none; }
.site-footer__bottom { border-top: 1px solid rgba(255, 255, 255, .15); padding-top: 1.25rem; margin-top: 2.5rem !important; font-size: .9rem; color: #a9add3; }
.site-footer__bottom p { margin: 0; }
.site-footer__credit { display: block; margin-top: .35rem; }

/* ---------- WooCommerce (pay for order / thank you) ---------- */
.woocommerce-order-pay .site-main, .woocommerce-order-received .site-main { padding-bottom: var(--wp--preset--spacing--60); }
.woocommerce-order-pay #order_review, .woocommerce .wc-block-order-confirmation-status, .woocommerce-order { background: #fff; border-radius: 24px; padding: clamp(1rem, 3vw, 2rem); box-shadow: 0 10px 30px rgba(29, 31, 58, .08); }
.woocommerce-order-pay table.shop_table { border-radius: 16px; overflow: hidden; }
.woocommerce-order-pay #place_order { width: 100%; font-size: 1.1rem; }

/* ---------- Cookie notice ---------- */
.folm-cookie {
	position: fixed;
	z-index: 90000;
	left: 0;
	right: 0;
	bottom: 0;
	background: #fff;
	color: var(--wp--preset--color--ink);
	border-top: 4px solid var(--wp--preset--color--accent);
	box-shadow: 0 -8px 30px rgba(29, 31, 58, .12);
	padding: 1rem 1.25rem calc(1rem + env(safe-area-inset-bottom));
}
.folm-cookie__inner {
	max-width: var(--wp--style--global--wide-size, 1100px);
	margin: 0 auto;
	display: flex;
	align-items: center;
	gap: 1.25rem;
}
.folm-cookie p { margin: 0; flex: 1; line-height: 1.45; }
.folm-cookie a { font-weight: 800; color: var(--wp--preset--color--primary); }
.folm-cookie__ok {
	flex: none;
	appearance: none;
	background: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--ink);
	border: 0;
	border-radius: 999px;
	font: inherit;
	font-weight: 800;
	padding: .7em 1.6em;
	cursor: pointer;
	box-shadow: 0 4px 0 rgba(0, 0, 0, .14);
}
.folm-cookie__ok:hover { background: #ffbb10; }
@media (max-width: 600px) {
	.folm-cookie__inner { flex-direction: column; align-items: stretch; text-align: left; }
	.folm-cookie__ok { width: 100%; }
}
