/*
Theme Name: You Are Loved
Theme URI: https://youareloved.org.uk
Description: Block theme for You Are Loved CIC. Edit pages with the block editor; header, footer and menu in Appearance → Editor.
Version: 0.2.0
Requires at least: 6.6
Requires PHP: 8.0
Author: You Are Loved CIC
Text Domain: yal
*/

/* ---------- Header: floating dark pill ---------- */
.wp-site-blocks > header.wp-block-template-part { position: sticky; top: 0; z-index: 100; height: 0; overflow: visible; }
.admin-bar .wp-site-blocks > header.wp-block-template-part { top: 32px; }
@media (max-width: 782px) { .admin-bar .wp-site-blocks > header.wp-block-template-part { top: 46px; } }
.yal-header__bar {
	margin: 14px auto 0;
	max-width: 1200px;
	background: rgba(10, 10, 10, 0.92);
	-webkit-backdrop-filter: blur(10px);
	backdrop-filter: blur(10px);
	border-radius: 999px;
	padding: 8px 10px 8px 22px !important;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
}
.yal-header .wp-block-site-logo img { height: 34px; width: auto; }
.yal-header .wp-block-navigation a { padding: 8px 12px; border-radius: 999px; text-decoration: none; }
.yal-header .wp-block-navigation a:hover { background: rgba(255, 255, 255, 0.12); }
.yal-header .wp-block-navigation .current-menu-item > a, .yal-header .wp-block-navigation a[aria-current="page"] { background: #fff; color: #0a0a0a !important; }
.yal-header .yal-nav-donate a { color: var(--wp--preset--color--amber) !important; font-weight: 800; }
.yal-header .wp-block-navigation__responsive-container.is-menu-open { background: #0a0a0a !important; color: #fff !important; padding: 24px; }
.yal-header .wp-block-navigation__responsive-container.is-menu-open a { font-size: 1.4rem; }
@media (max-width: 600px) { .yal-header__bar { margin: 10px 12px 0; } }

/* Pages without a hero photo need room under the floating header. */
.yal-below-header { padding-top: 110px !important; }

/* ---------- Section helpers (picked in the editor as block styles) ---------- */
.is-style-eyebrow { font-size: 1rem !important; font-weight: 600 !important; letter-spacing: 0 !important; margin-bottom: -0.2em !important; opacity: 0.9; }
.is-style-accent-bar::after { content: ""; display: block; width: 72px; height: 6px; border-radius: 6px; background: var(--wp--preset--color--orange-bright); margin-top: 0.35em; }
.has-text-align-center.is-style-accent-bar::after { margin-left: auto; margin-right: auto; }
.wp-block-group.is-style-card { background: #fff; border-radius: 28px; padding: clamp(22px, 3vw, 40px); box-shadow: 0 10px 30px rgba(13, 23, 48, 0.06); }
.wp-block-cover.is-style-photo-card { border-radius: 28px; overflow: hidden; min-height: 380px; transition: transform 0.2s; }
.wp-block-cover.is-style-photo-card:hover { transform: translateY(-4px); }
.wp-block-cover.is-style-photo-card a { color: inherit; text-decoration: none; }
.wp-block-cover.is-style-photo-card a::after { content: ""; position: absolute; inset: 0; z-index: 2; }
.wp-block-button.is-style-outline-light .wp-block-button__link { background: transparent; border: 2px solid currentColor; color: #fff; }
.wp-block-button.is-style-outline-light .wp-block-button__link:hover { background: #fff; color: var(--wp--preset--color--ink); }
.wp-block-image.is-style-rounded-xl img { border-radius: 32px; }

/* Mission list A–D */
.yal-letters { counter-reset: yal; list-style: none; padding: 0; display: grid; gap: 16px; }
.yal-letters li { counter-increment: yal; display: grid; grid-template-columns: 52px 1fr; gap: 16px; align-items: start; font-size: 1.1rem; }
.yal-letters li::before { content: counter(yal, upper-alpha); display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--wp--preset--color--orange); color: #fff; font-weight: 900; font-size: 1.3rem; }

/* Article cards (Query Loop) */
.yal-post-cards .wp-block-post { background: #fff; border-radius: 24px; overflow: hidden; box-shadow: 0 4px 18px rgba(13, 23, 48, 0.05); display: flex; flex-direction: column; }
.yal-post-cards .wp-block-post-featured-image { margin: 0; }
.yal-post-cards .wp-block-post-featured-image img { aspect-ratio: 16 / 10; object-fit: cover; border-radius: 0; }
.yal-post-cards .yal-post-cards__body { padding: 20px 22px 24px; }
.yal-post-cards .wp-block-post-title a { text-decoration: none; color: inherit; }
.yal-post-cards .wp-block-post-title a:hover { text-decoration: underline; }

/* Galleries */
.wp-block-gallery.has-nested-images figure.wp-block-image img { border-radius: 16px; }

/* Article body */
.single .wp-block-post-content { font-size: 1.125rem; }
.single .wp-block-post-content img { border-radius: 20px; }

/* Footer */
.yal-footer a { color: inherit; text-decoration: none; }
.yal-footer a:hover { text-decoration: underline; }

/* Cookie notice */
.yal-consent { position: fixed; z-index: 200; left: 16px; right: 16px; bottom: 16px; max-width: 560px; margin: 0 auto; background: #0a0a0a; color: #fff; border-radius: 20px; padding: 18px 20px; box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3); display: flex; flex-wrap: wrap; gap: 12px; align-items: center; font-size: 0.95rem; }
.yal-consent p { margin: 0; flex: 1 1 260px; }
.yal-consent a { color: #fff; }
.yal-consent button { font: inherit; font-weight: 700; border-radius: 999px; padding: 9px 18px; cursor: pointer; border: 2px solid #fff; background: transparent; color: #fff; }
.yal-consent button[data-accept] { background: var(--wp--preset--color--orange); border-color: var(--wp--preset--color--orange); }

:where(a, button, input, select, textarea, summary):focus-visible { outline: 3px solid var(--wp--preset--color--amber); outline-offset: 2px; }
