/*
Theme Name: Fontmell Magna Village Hall Theme
Theme URI: https://egret.digital/
Author: Egret Digital
Author URI: https://egret.digital/
Description: Block theme for Fontmell Magna Village Hall, a child of Twenty Twenty-Five. Rebuilt from the Elementor design (Default Kit 5045): olive #5D661F, cream #EFEFE8, system sans-serif text (what visitors saw on the old site), club, people and document lists as core Query Loops reading the ACF fields.
Template: twentytwentyfive
Version: 1.0.2
Requires at least: 6.7
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: fmvh-theme
*/

/* ---------- Base ---------- */
body { -webkit-font-smoothing: antialiased; }
p { margin-block-start: 0; }
.wp-site-blocks > * + * { margin-block-start: 0; }
:where(.is-layout-flow) > * + *, :where(.is-layout-constrained) > * + * { margin-block-start: 14px; }
ul.wp-block-list, ol.wp-block-list { margin-top: 0; margin-bottom: 0; }
.wp-block-post-content > * { margin-block-start: 0 !important; }
.fmvh-visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
img { height: auto; max-width: 100%; }

/* ---------- Header (Elementor "Header" 6073: cream bar 130px, sun watermark at 800px, sticky) ---------- */
.fmvh-site-header { position: sticky; top: 0; z-index: 95; background: #fff; padding-bottom: 20px; }
.admin-bar .fmvh-site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .fmvh-site-header { top: 0; } }
.fmvh-header { min-height: 130px; background-repeat: no-repeat; background-position: 800px 0; display: flex; align-items: flex-end; padding: 0 !important; }
.fmvh-header-inner { width: 100%; max-width: 1200px; margin: 0 auto !important; padding: 0 39px 20px 57px; box-sizing: border-box; align-items: flex-end !important; }
.fmvh-logo img { width: 264px; height: auto; display: block; }
.fmvh-nav { font-size: 16px; line-height: 20px; letter-spacing: normal; }
.fmvh-nav .wp-block-navigation-item__content { padding: 5px 0; border-bottom: 1px solid transparent; color: #000; }
.fmvh-nav .wp-block-navigation-item__content:hover { color: #324A6D; border-bottom-color: #324A6D; text-decoration: none; }
.fmvh-nav .current-menu-item > .wp-block-navigation-item__content { color: #5D661F; border-bottom-color: #5D661F; }
/* Hamburger at 1200px and below, as Elementor's "tablet extra" drop-down */
@media (max-width: 1200px) {
	.fmvh-nav .wp-block-navigation__responsive-container-open:not(.always-shown) { display: flex !important; }
	.fmvh-nav .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) { display: none !important; }
	.fmvh-nav .wp-block-navigation__responsive-container-open svg { width: 30px; height: 30px; color: #5D661F; }
	.fmvh-header-inner { padding: 0 20px 20px; }
}
.fmvh-nav .wp-block-navigation__responsive-container.is-menu-open { padding: 60px 30px; }
.fmvh-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content { gap: 18px; align-items: flex-start; }
.fmvh-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content { font-size: 18px; }
.fmvh-nav .wp-block-navigation__responsive-container-close svg { width: 30px; height: 30px; }
@media (max-width: 767px) {
	.fmvh-header { min-height: 50px; background-position: right -120px top 0; background-size: 200px auto; }
	.fmvh-header-inner { padding: 20px 16px 16px; align-items: center !important; }
	.fmvh-logo img { width: 200px; }
	.fmvh-site-header { padding-bottom: 12px; }
}

/* ---------- Page title band (Hello "entry-title": 40px olive, in the 1180px box) ---------- */
.fmvh-title-wrap { padding-top: 22px; padding-bottom: 18px; }
.fmvh-page-title { margin: 0; }

/* ---------- Common sections ---------- */
.fmvh-hero { min-height: 500px !important; }
.fmvh-section { padding-top: 60px; padding-bottom: 60px; }
.fmvh-section-top { padding-top: 40px; }
.fmvh-h { font-size: 1.3rem !important; margin-bottom: 0 !important; }
.fmvh-cols { gap: 60px !important; }
@media (max-width: 1024px) { .fmvh-cols { gap: 30px !important; } }

/* ---------- Home: facility cards ---------- */
.fmvh-facility { padding: 10px 10px 10px 0 !important; gap: 0 !important; margin-top: 20px !important; align-items: center !important; }
.fmvh-facility .fmvh-facility-icon { flex-basis: 25% !important; }
.fmvh-facility .fmvh-facility-icon figure { margin: 0 auto; width: 80%; }
.fmvh-facility .fmvh-facility-text { flex-basis: 75% !important; }
.fmvh-facility h3 { font-size: 1.2rem !important; margin: 0 0 4px !important; }
.fmvh-facility .fmvh-facility-text > * + * { margin-top: 2px !important; }
@media (max-width: 767px) {
	.fmvh-facility .fmvh-facility-icon figure { width: 70px; }
	.fmvh-facility .fmvh-facility-icon { flex-basis: 30% !important; }
	.fmvh-facility .fmvh-facility-text { flex-basis: 70% !important; }
}
.fmvh-hall-list { margin-top: 24px !important; }

/* Home: "Outside" panel */
.fmvh-outside { min-height: 529px !important; padding: 30px 40px 60px !important; align-items: flex-end !important; }
.fmvh-outside .wp-block-cover__inner-container { width: 100%; position: static; }
.fmvh-outside .wp-block-cover__inner-container > *:not(.fmvh-tree) { position: relative; z-index: 1; }
.fmvh-outside .fmvh-tree { z-index: 1; }
.fmvh-outside .fmvh-tree img { width: 150px; }
.fmvh-outside .fmvh-tree { position: absolute; top: 30px; left: 30px; width: 150px; margin: 0; }
.fmvh-outside h3 { color: #fff !important; font-size: 1.2rem !important; }

/* Home: quote panel with the two speech marks */
.fmvh-quote { position: relative; border: 1px solid #5D661F; padding: 30px 30px 50px; margin-top: 20px !important; }
.fmvh-quote p { font-size: 30px; line-height: 45px; color: #B1B1B0; padding: 10px; }
.fmvh-quote .fmvh-mark-top { position: absolute; top: -42px; left: 40px; width: 96px; margin: 0; }
.fmvh-quote .fmvh-mark-bottom { position: absolute; bottom: -36px; right: 14px; width: 90px; margin: 0; }
.fmvh-quote figure img { width: 100%; height: auto; }
@media (max-width: 767px) { .fmvh-quote p { font-size: 24px; line-height: 36px; } }

/* Home: club bars */
.fmvh-club-bars { margin-top: 20px !important; }
.fmvh-club-bars .wp-block-post-template { display: flex; flex-direction: column; gap: 30px; margin: 0; padding: 0; }
.fmvh-club-bar { min-height: 59px; padding: 0 30px !important; align-items: center !important; }
.fmvh-club-bar h3 { font-size: 1.2rem !important; margin: 0 !important; }
.fmvh-club-bar h3 a, .fmvh-club-bar .fmvh-more a { color: #fff; }
.fmvh-club-bar .fmvh-more { font-size: 15px; }

/* Query Loop items: no extra margins (spacing comes from the list gap) */
.wp-block-post-template > li { margin: 0 !important; }
.fmvh-club-card h2 a { color: #5D661F; }
.fmvh-club-card h2 a:hover { color: #000; }
.fmvh-facilities-h { margin-top: 30px !important; }

/* Load more (theme script shows 5 at a time, like the Elementor "Load More" loops) */
.fmvh-loadmore-btn { display: block; margin: 30px auto 0; background: #5D661F; color: #fff; border: 0; border-radius: 3px; padding: 12px 24px; font: inherit; font-size: 15px; line-height: 1; cursor: pointer; }
.fmvh-loadmore-btn:hover, .fmvh-loadmore-btn:focus { background: #333; }
.fmvh-hidden-item { display: none !important; }

/* ---------- Clubs and Societies: club cards with tabs ---------- */
.fmvh-club-cards .wp-block-post-template { display: flex; flex-direction: column; gap: 20px; margin: 0; padding: 0; }
.fmvh-club-card { width: 95%; margin: 0 auto !important; padding: 20px !important; gap: 20px !important; }
.fmvh-club-card h2 { font-size: 1.2rem !important; margin: 0 !important; }
.fmvh-club-card .fmvh-club-main { flex-basis: 75% !important; }
.fmvh-club-card .fmvh-club-side { flex-basis: 25% !important; display: flex; align-items: center; justify-content: center; }
.fmvh-club-card .fmvh-club-side figure { margin: 0; width: 106px; }
.fmvh-club-card .fmvh-club-side img { width: 106px; height: auto; }
@media (max-width: 1024px) {
	.fmvh-club-card { width: 100%; }
	.fmvh-club-card .fmvh-club-side { justify-content: center; }
}
.fmvh-rich > *:first-child { margin-top: 0; }
.fmvh-rich p { margin: 0 0 14px; }
.fmvh-rich ul { margin: 0 0 14px; }
.fmvh-rich img { display: inline-block; vertical-align: top; }
.fmvh-rel-name { font-weight: 600; margin-bottom: 4px !important; }

/* Tabs: core Details blocks; the theme script turns each set into tabs (More / Timing / Venue / Leader) */
.fmvh-tabs { margin-top: 10px !important; }
.fmvh-tabs .wp-block-details { margin: 0 0 8px; }
.fmvh-tabs .wp-block-details summary { cursor: pointer; color: #5D661F; background: #EFEFE8; padding: 10px 20px; display: inline-block; }
.fmvh-tabs .wp-block-details[open] summary { background: #5D661F; color: #fff; }
.fmvh-tabs .wp-block-details > *:not(summary) { padding: 14px 8px 4px; }
.fmvh-tablist { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 0; }
.fmvh-tablist button { font: inherit; font-size: 15px; line-height: 1; border: 0; border-radius: 0; padding: 12px 25px; background: #EFEFE8; color: #5D661F; cursor: pointer; }
.fmvh-tablist button:hover { background: #5D661F; color: #fff; }
.fmvh-tablist button[aria-selected="true"] { background: #5D661F; color: #fff; }
.fmvh-tabs.is-tabbed .wp-block-details > summary { display: none; }
.fmvh-tabs.is-tabbed .wp-block-details { margin: 0; }
.fmvh-tabs.is-tabbed .wp-block-details > *:not(summary) { padding: 24px 8px 10px; }
.fmvh-tabs.is-tabbed .fmvh-tabpanel-hidden { display: none; }

/* ---------- Contact ---------- */
.fmvh-people .wp-block-post-template { display: flex; flex-direction: column; gap: 30px; margin: 0; padding: 0; }
.fmvh-person { padding: 20px 30px !important; }
.fmvh-person h3 { font-size: 1.2rem !important; margin: 0 0 18px !important; }
.fmvh-person .fmvh-roles { color: #717130; margin-bottom: 18px !important; }
.fmvh-person .fmvh-email, .fmvh-person .fmvh-phone { padding-left: 22px; position: relative; margin: 0 !important; }
.fmvh-person .fmvh-email::before, .fmvh-person .fmvh-phone::before { content: ""; position: absolute; left: 0; top: 5px; width: 14px; height: 14px; background-color: #000; -webkit-mask: var(--fmvh-icon) no-repeat center / contain; mask: var(--fmvh-icon) no-repeat center / contain; }
.fmvh-person .fmvh-email { --fmvh-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'%3E%3Cpath d='M48 64C21.5 64 0 85.5 0 112c0 15.1 7.1 29.3 19.2 38.4l217.6 163.2c11.4 8.5 27 8.5 38.4 0L492.8 150.4c12.1-9.1 19.2-23.3 19.2-38.4 0-26.5-21.5-48-48-48H48zM0 176v208c0 35.3 28.7 64 64 64h384c35.3 0 64-28.7 64-64V176L294.4 339.2a63.9 63.9 0 0 1-76.8 0L0 176z'/%3E%3C/svg%3E"); }
.fmvh-person .fmvh-phone { --fmvh-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'%3E%3Cpath d='M164.9 24.6c-7.7-18.6-28-28.5-47.4-23.2l-88 24C12.1 30.2 0 46 0 64c0 247.4 200.6 448 448 448 18 0 33.8-12.1 38.6-29.5l24-88c5.3-19.4-4.6-39.7-23.2-47.4l-96-40c-16.3-6.8-35.2-2.1-46.3 11.6L304.7 368C234.3 334.7 177.3 277.7 144 207.3l49.4-40.4c13.7-11.2 18.4-30 11.6-46.3l-40-96z'/%3E%3C/svg%3E"); }
.fmvh-venue p { margin: 0 0 2px !important; }
.fmvh-map { margin-top: 40px !important; }
.fmvh-map iframe { width: 100%; height: 300px; border: 0; display: block; }

/* Gravity Forms (Elementor Custom Code 7740, 7737, 7736 and the Customizer CSS) */
body .gform_wrapper .gfield_label { font-weight: normal !important; }
.gform-body .field_description_below input[type=email], .gform-body .field_description_below input[type=text], .gform-body .field_description_below input[type=tel] { width: 100% !important; }
#gform_2 .gform_footer { float: none; justify-content: center; }
#gform_submit_button_2 { color: #fff; text-transform: none; border-width: 0; background-color: #5d661f; width: 100%; padding: 12px; font-size: 16px; cursor: pointer; }
#gform_submit_button_2:hover { background-color: #333; }
.gform_wrapper input[type=text], .gform_wrapper input[type=email], .gform_wrapper input[type=tel], .gform_wrapper textarea { border: 1px solid #666; border-radius: 3px; padding: 8px; font: inherit; }

/* ---------- Documentation ---------- */
.fmvh-docs .wp-block-post-template { gap: 40px 40px; margin: 0; padding: 0; }
.fmvh-doc h3 { font-size: 1.2rem !important; margin: 0 !important; }
.fmvh-doc p { margin: 0 0 8px !important; }
.fmvh-doc .wp-block-button__link::after { content: ""; display: inline-block; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-3px); margin-left: 29px; }
.fmvh-doc .wp-block-button__link:not([href]) { cursor: default; }
.fmvh-doc-heading { margin-top: 70px !important; margin-bottom: 30px !important; }
@media (max-width: 1024px) { .fmvh-docs .wp-block-post-template { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; } }
@media (max-width: 767px) { .fmvh-docs .wp-block-post-template { grid-template-columns: 1fr !important; } }

/* ---------- Friendship Garden ---------- */
.fmvh-awards { padding: 30px !important; margin-top: 20px !important; margin-bottom: 20px !important; }
.fmvh-awards p { color: #fff; }
.fmvh-awards .fmvh-awards-list p { color: #EFEFE8; }
.fmvh-awards figure { width: 150px; margin: 0; }
.fmvh-justified { gap: 8px !important; }
.fmvh-cols-40 { gap: 40px !important; }
.fmvh-section-fg .fmvh-justified.wp-block-gallery.has-nested-images figure.wp-block-image, .fmvh-section-fg .fmvh-justified.wp-block-gallery.has-nested-images figure.wp-block-image img { height: 160px !important; }
.fmvh-awards-cols { gap: 20px !important; }
.fmvh-awards-cols > .wp-block-column:first-child { flex: 0 0 100px !important; }
.fmvh-awards figure { width: 100px; }
.fmvh-justified.wp-block-gallery.has-nested-images figure.wp-block-image { flex-grow: 1; width: auto !important; height: 220px; }
.fmvh-justified.wp-block-gallery.has-nested-images figure.wp-block-image img { height: 220px !important; width: 100% !important; object-fit: cover; }
@media (max-width: 767px) {
	.fmvh-justified.wp-block-gallery.has-nested-images figure.wp-block-image { height: 160px; }
	.fmvh-justified.wp-block-gallery.has-nested-images figure.wp-block-image img { height: 160px !important; }
}

/* ---------- Privacy ---------- */
.fmvh-privacy-img { max-width: 300px; margin-left: auto !important; margin-right: auto !important; }

/* ---------- Single pages and lists ---------- */
.fmvh-single { padding-top: 22px; padding-bottom: 60px; }
.fmvh-doc-meta { color: #717130; }
.fmvh-archive .wp-block-post-template > li { margin-bottom: 30px; }
.fmvh-archive .wp-block-post-title { font-size: 1.5rem; }

/* ---------- 404 (Elementor 404 template 7717) ---------- */
.fmvh-404 { padding-top: 110px !important; }
.fmvh-404-code { font-size: 1.6rem !important; line-height: 1 !important; letter-spacing: 8px; color: #5D661F !important; margin: 0 !important; }
.fmvh-404-title { font-size: clamp(1.5rem, 1rem + 1.6vw, 2.2rem) !important; letter-spacing: 3px; margin-top: 10px !important; }
.fmvh-404-btn { margin-top: 24px !important; }
.fmvh-404-btn .wp-block-button__link { color: #fff !important; border: 0 solid #fff !important; border-left-width: 1px !important; border-right-width: 1px !important; border-radius: 0 !important; letter-spacing: 4px; text-transform: none; font-size: 16px; padding: 12px 24px !important; background: transparent !important; }
.fmvh-404-btn .wp-block-button__link:hover { border-color: #29332F !important; }

/* ---------- Footer (Elementor "Footer" 5547 on the hills SVG) ---------- */
.fmvh-footer { min-height: 290px; display: flex; align-items: flex-end; padding: 0 !important; }
.fmvh-footer-cols { width: 100%; max-width: 1200px; margin: 0 auto !important; padding: 110px 20px 22px !important; box-sizing: border-box; gap: 0 !important; }
.fmvh-footer a { color: #5D661F; }
.fmvh-footer a:hover { color: #000; }
.fmvh-footer-heading { margin: 0 0 8px !important; font-size: 1.2rem !important; }
.fmvh-social .wp-social-link { color: #fff; }
.fmvh-social .wp-social-link svg { width: 26px; height: 26px; }
@media (max-width: 767px) {
	.fmvh-footer-cols { padding-top: 120px !important; gap: 20px !important; }
	.fmvh-footer-centre .fmvh-social { justify-content: center; }
}

/* ---------- Calendar: HallMaster button (outline pill, as the old block button) ---------- */
.fmvh-section-tight { padding-top: 0; padding-bottom: 60px; }
.fmvh-hallmaster .wp-block-button__link { background: #fff !important; color: #000 !important; border: 2px solid #000; border-radius: 9999px; font-size: 1.125rem; padding: 10px 14px; text-decoration: underline; }
.fmvh-hallmaster .wp-block-button__link:hover { background: #5D661F !important; color: #fff !important; border-color: #5D661F; }
.fmvh-section-calendar-h { margin-top: 14px !important; }
.fmvh-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container,
.fmvh-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content { align-items: flex-start !important; justify-content: flex-start !important; text-align: left; }
.fmvh-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container { gap: 18px; }
