/* =========================================================================
   AFSFV1 - "Community Screening Room" design system
   ========================================================================= */

:root {
	--afsf-marquee-orange: #F4782A;
	--afsf-projection-ink: #1B1815;
	--afsf-reel-teal: #1D6F68;
	--afsf-paper: #FBFBF9;
	--afsf-sprocket-grey: #8C8579;
	--afsf-ink-body: #2A2622;
	--afsf-white: #FFFFFF;

	--afsf-font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
	--afsf-font-body: 'Work Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

	--afsf-radius-sm: 6px;
	--afsf-radius-md: 8px;
	--afsf-radius-lg: 14px;

	--afsf-container: 1320px;
	--afsf-content: 760px;

	--afsf-header-h: 84px;
}

/* -------------------------------------------------------------------------
   Reset & base
   ------------------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
	margin: 0;
	background: var(--afsf-paper);
	color: var(--afsf-ink-body);
	font-family: var(--afsf-font-body);
	font-size: 17px;
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--afsf-reel-teal); text-decoration-thickness: 1.5px; text-underline-offset: 2px; }
a:hover { color: var(--afsf-marquee-orange); }

h1, h2, h3, h4, h5, h6, .wp-block-heading {
	font-family: var(--afsf-font-display);
	font-weight: 600;
	color: var(--afsf-projection-ink);
	line-height: 1.2;
	margin: 0 0 0.6em;
}

h1 { font-size: clamp(2rem, 4vw, 3rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.25rem); }
h3 { font-size: 1.4rem; }
h4 { font-size: 1.15rem; }

p { margin: 0 0 1.2em; }

ul, ol { padding-left: 1.4em; }
li { margin-bottom: 0.4em; }

.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}

.afsf-skip-link {
	position: absolute;
	top: -60px; left: 0;
	background: var(--afsf-marquee-orange);
	color: #fff;
	padding: 12px 20px;
	z-index: 10000;
	transition: top 150ms ease;
}
.afsf-skip-link:focus {
	position: fixed;
	top: 8px; left: 8px;
	width: auto; height: auto;
	clip: auto;
	color: #fff;
}

.afsf-container {
	max-width: var(--afsf-container);
	margin-inline: auto;
	padding-inline: 24px;
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* -------------------------------------------------------------------------
   Content width - keeps ordinary blocks readable, lets alignwide/full escape
   ------------------------------------------------------------------------- */

.afsf-page-content > *,
.afsf-home-content > * {
	max-width: var(--afsf-content);
	margin-left: auto;
	margin-right: auto;
}

.afsf-home-content { padding-bottom: 0; }
.afsf-page-content { padding-block: 48px 80px; }

.afsf-page-content > .alignwide,
.afsf-home-content > .alignwide {
	max-width: var(--afsf-container);
}

.afsf-page-content > .alignfull,
.afsf-home-content > .alignfull {
	max-width: none;
	width: 100vw;
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
}

.afsf-page-content > .alignfull > .afsf-container,
.afsf-home-content > .alignfull > .afsf-container { max-width: var(--afsf-container); }

/* wide/full sections need their OWN inner max-width applied via classNames below */
.afsf-benefits-grid,
.afsf-committee-grid,
.afsf-contact-columns,
.afsf-filmstrip-section,
.afsf-cta-band,
.afsf-directory-teaser {
	max-width: var(--afsf-container) !important;
}

/* -------------------------------------------------------------------------
   Buttons
   ------------------------------------------------------------------------- */

.wp-block-button__link,
.afsf-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.4em;
	background: var(--afsf-marquee-orange);
	color: #fff;
	font-family: var(--afsf-font-body);
	font-weight: 600;
	font-size: 0.95rem;
	letter-spacing: 0.02em;
	padding: 0.85em 1.6em;
	border-radius: var(--afsf-radius-md);
	border: 2px solid var(--afsf-marquee-orange);
	text-decoration: none;
	transition: transform 150ms ease, box-shadow 150ms ease, background 150ms ease;
	cursor: pointer;
}
.wp-block-button__link:hover,
.afsf-btn:hover {
	color: #fff;
	transform: translateY(-2px);
	box-shadow: 0 6px 16px rgba(27, 24, 21, 0.18);
}

.wp-block-button.is-style-outline .wp-block-button__link,
.afsf-btn--outline {
	background: transparent;
	color: var(--afsf-projection-ink);
	border-color: var(--afsf-projection-ink);
}
.wp-block-button.is-style-outline .wp-block-button__link:hover,
.afsf-btn--outline:hover { color: var(--afsf-marquee-orange); border-color: var(--afsf-marquee-orange); }

/* outline buttons sitting on a dark hero/CTA band */
.afsf-hero .wp-block-button.is-style-outline .wp-block-button__link,
.afsf-cta-band .afsf-btn--outline,
.afsf-cta-band .wp-block-button.is-style-outline .wp-block-button__link {
	color: #fff;
	border-color: #fff;
}
.afsf-hero .wp-block-button.is-style-outline .wp-block-button__link:hover,
.afsf-cta-band .afsf-btn--outline:hover { color: var(--afsf-marquee-orange); border-color: var(--afsf-marquee-orange); }

.afsf-btn--small { padding: 0.55em 1.1em; font-size: 0.85rem; }
.afsf-btn--primary { background: var(--afsf-marquee-orange); color: #fff; border-color: var(--afsf-marquee-orange); }

.wp-block-buttons { margin-bottom: 1.5em; }

/* -------------------------------------------------------------------------
   Film-reel divider - the signature recurring device. A solid Projection
   Ink bar with true punched-through holes (CSS mask, not a matched
   background color), so it reads correctly as a film-strip edge no
   matter what sits behind or around it. Used both as the divider between
   page sections and as the footer's top band.
   ------------------------------------------------------------------------- */

.wp-block-separator.afsf-sprocket-divider,
.afsf-sprocket-strip {
	--afsf-reel-hole: radial-gradient(circle, #000 4.5px, transparent 4.8px);
	background-color: var(--afsf-projection-ink);
	-webkit-mask-image: var(--afsf-reel-hole);
	mask-image: var(--afsf-reel-hole);
	-webkit-mask-repeat: repeat-x;
	mask-repeat: repeat-x;
	-webkit-mask-position: 16px center;
	mask-position: 16px center;
	-webkit-mask-size: 30px 100%;
	mask-size: 30px 100%;
}

.wp-block-separator.afsf-sprocket-divider {
	border: none;
	height: 22px;
	margin: 48px auto;
	max-width: var(--afsf-container) !important;
	border-radius: 11px;
}

.afsf-sprocket-strip {
	height: 24px;
}

/* -------------------------------------------------------------------------
   Header
   ------------------------------------------------------------------------- */

.afsf-site-header {
	position: sticky;
	top: 0;
	z-index: 999;
	background: #fff;
	border-bottom: 1px solid rgba(140, 133, 121, 0.35);
}

.afsf-site-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	min-height: var(--afsf-header-h);
	padding-block: 10px;
}

.afsf-branding img,
.custom-logo { max-height: 64px; width: auto; }
.afsf-logo-link { display: inline-flex; }

.afsf-menu-toggle {
	display: none;
	flex-direction: column;
	justify-content: center;
	gap: 5px;
	width: 44px;
	height: 44px;
	background: transparent;
	border: 1px solid var(--afsf-sprocket-grey);
	border-radius: var(--afsf-radius-sm);
	cursor: pointer;
}
.afsf-menu-toggle__bar {
	display: block;
	width: 22px;
	height: 2px;
	margin-inline: auto;
	background: var(--afsf-projection-ink);
	transition: transform 150ms ease, opacity 150ms ease;
}
.afsf-menu-toggle[aria-expanded="true"] .afsf-menu-toggle__bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.afsf-menu-toggle[aria-expanded="true"] .afsf-menu-toggle__bar:nth-child(2) { opacity: 0; }
.afsf-menu-toggle[aria-expanded="true"] .afsf-menu-toggle__bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Desktop: nav links and the search box sit on one row. The >1180px media
   query below overrides this to the mobile dropdown (display:none/block). */
.afsf-primary-nav {
	display: flex;
	align-items: center;
	gap: 16px;
	flex-wrap: wrap;
	justify-content: flex-end;
	flex: 1 1 auto;
	min-width: 0;
}

.afsf-nav-menu {
	display: flex;
	align-items: center;
	gap: 4px;
	list-style: none;
	margin: 0;
	padding: 0;
	flex-wrap: wrap;
}

.afsf-nav-menu li { margin: 0; position: relative; }

.afsf-nav-menu > li > a {
	display: block;
	padding: 10px 14px;
	color: var(--afsf-projection-ink);
	font-weight: 600;
	font-size: 0.92rem;
	text-decoration: none;
	border-radius: var(--afsf-radius-sm);
	white-space: nowrap;
}
.afsf-nav-menu > li > a:hover,
.afsf-nav-menu > li.current-menu-item > a { color: var(--afsf-marquee-orange); }

.afsf-nav-menu .afsf-nav-cta > a {
	background: var(--afsf-marquee-orange);
	color: #fff;
	padding: 10px 20px;
	border-radius: var(--afsf-radius-md);
	margin-left: 6px;
}

/* Sitewide header search - a compact pill on desktop, full-width inside
   the mobile nav dropdown. */
.afsf-site-search {
	display: flex;
	align-items: center;
	margin-left: 10px;
	border: 1px solid rgba(140, 133, 121, 0.35);
	border-radius: var(--afsf-radius-md);
	overflow: hidden;
	flex: 0 0 auto;
}
.afsf-site-search input[type="search"] {
	border: none;
	outline: none;
	padding: 8px 10px;
	font-size: 0.85rem;
	width: 160px;
	background: transparent;
}
.afsf-site-search__submit {
	border: none;
	background: transparent;
	padding: 8px 10px;
	cursor: pointer;
	line-height: 1;
}
.afsf-site-search__submit:hover { color: var(--afsf-marquee-orange); }
.afsf-nav-menu .afsf-nav-cta > a:hover { color: #fff; transform: translateY(-1px); }

.afsf-nav-menu .menu-item-has-children > a::after {
	content: '\25BE';
	display: inline-block;
	margin-left: 6px;
	font-size: 0.7em;
}

.afsf-nav-menu .sub-menu {
	list-style: none;
	margin: 0;
	padding: 8px;
	position: absolute;
	top: 100%;
	left: 0;
	min-width: 240px;
	background: #fff;
	border: 1px solid rgba(140, 133, 121, 0.35);
	border-radius: var(--afsf-radius-md);
	box-shadow: 0 12px 28px rgba(27, 24, 21, 0.12);
	opacity: 0;
	visibility: hidden;
	transform: translateY(6px);
	transition: opacity 150ms ease, transform 150ms ease, visibility 150ms;
	z-index: 10;
}

.afsf-nav-menu li.menu-item-has-children:hover > .sub-menu,
.afsf-nav-menu li.menu-item-has-children.afsf-submenu-open > .sub-menu {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.afsf-nav-menu .sub-menu a {
	display: block;
	padding: 9px 12px;
	color: var(--afsf-ink-body);
	font-weight: 500;
	font-size: 0.9rem;
	border-radius: var(--afsf-radius-sm);
	text-decoration: none;
}
.afsf-nav-menu .sub-menu a:hover { background: rgba(29, 111, 104, 0.08); color: var(--afsf-reel-teal); }

/* -------------------------------------------------------------------------
   Footer
   ------------------------------------------------------------------------- */

.afsf-site-footer {
	background: var(--afsf-projection-ink);
	color: #E7E4DF;
	margin-top: 40px;
}

.afsf-site-footer__inner {
	display: grid;
	grid-template-columns: 1.2fr 2fr;
	gap: 48px;
	padding-block: 56px 32px;
}

.afsf-footer-logo { max-height: 108px; width: auto; margin-bottom: 18px; }
.afsf-footer-tagline { color: #C9C4BC; max-width: 32ch; }

.afsf-social-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 38px; height: 38px;
	border-radius: 50%;
	background: rgba(251, 251, 249, 0.1);
	color: #fff;
	margin-top: 10px;
}
.afsf-social-icon:hover { background: var(--afsf-marquee-orange); color: #fff; }

.afsf-footer-menu {
	list-style: none;
	margin: 0; padding: 0;
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 10px 32px;
}
.afsf-footer-menu a {
	color: #D9D5CE;
	text-decoration: none;
	font-size: 0.95rem;
}
.afsf-footer-menu a:hover { color: var(--afsf-marquee-orange); }

.afsf-site-footer__bottom {
	border-top: 1px solid rgba(251, 251, 249, 0.12);
	padding-block: 18px;
	font-size: 0.85rem;
	color: #B7B2A9;
}
.afsf-site-footer__bottom a { color: #B7B2A9; }
.afsf-site-footer__bottom a:hover { color: var(--afsf-marquee-orange); }

/* -------------------------------------------------------------------------
   Page header band (secondary pages)
   ------------------------------------------------------------------------- */

.afsf-page-header {
	background: var(--afsf-projection-ink);
	color: #fff;
	padding-block: 40px 44px;
}
.afsf-breadcrumb {
	font-size: 0.82rem;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--afsf-sprocket-grey);
	margin-bottom: 14px;
}
.afsf-breadcrumb a { color: var(--afsf-sprocket-grey); text-decoration: none; }
.afsf-breadcrumb a:hover { color: var(--afsf-marquee-orange); }
.afsf-breadcrumb span[aria-hidden] { margin: 0 8px; }

.afsf-page-title { color: #fff; margin-bottom: 0.3em; }
.afsf-page-tagline { color: #D9D5CE; font-size: 1.15rem; max-width: 60ch; margin: 0; }

/* Single film-society profile header (photo/avatar + title + state pill) */
.afsf-society-header { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.afsf-society-header .afsf-page-title { margin-bottom: 0; }
.afsf-society-header .afsf-society-card__photo,
.afsf-society-header .afsf-avatar { flex-shrink: 0; }

/* -------------------------------------------------------------------------
   Hero (Home) - randomised, auto-cycling background slideshow
   ------------------------------------------------------------------------- */

.afsf-hero {
	position: relative;
	overflow: hidden;
	min-height: 560px;
	display: flex;
	align-items: center;
}

.afsf-hero__bg {
	position: absolute;
	inset: 0;
}
.afsf-hero__bg .wp-block-image {
	position: absolute;
	inset: 0;
	margin: 0;
	opacity: 0;
	transition: opacity 1.4s ease;
}
.afsf-hero__bg .wp-block-image:first-child { opacity: 1; }
.afsf-hero__bg .wp-block-image.is-active { opacity: 1; }
.afsf-hero__bg img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.afsf-hero__overlay {
	position: absolute;
	inset: 0;
	background: rgba(27, 24, 21, 0.62);
}

.afsf-hero__content {
	position: relative;
	z-index: 2;
	max-width: var(--afsf-container);
	margin-inline: auto;
	padding: 64px 24px;
	width: 100%;
}

.afsf-hero-title { color: #fff; max-width: 16ch; margin-bottom: 0.3em; }
.afsf-hero-tagline { color: #E7E4DF; font-size: 1.2rem; max-width: 48ch; margin-bottom: 1.6em; }

.afsf-marquee-flicker {
	width: 84px;
	height: 3px;
	background: var(--afsf-marquee-orange);
	margin: 14px 0 26px;
	border-radius: 2px;
	animation: afsf-flicker 3.2s ease-in-out infinite;
}
@keyframes afsf-flicker {
	0%, 100% { opacity: 1; }
	46% { opacity: 1; }
	48% { opacity: 0.35; }
	50% { opacity: 1; }
	72% { opacity: 1; }
	74% { opacity: 0.5; }
	76% { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
	.afsf-marquee-flicker { animation: none; }
	.afsf-hero__bg .wp-block-image { transition: none; }
}

/* -------------------------------------------------------------------------
   Screening poster row - fixed, no carousel, no scroll, wraps on narrow
   screens.
   ------------------------------------------------------------------------- */

.afsf-poster-row {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 20px;
	padding: 40px 24px;
	max-width: var(--afsf-container) !important;
}

.afsf-poster-row .wp-block-image {
	margin: 0;
	flex: 0 1 190px;
}
.afsf-poster-row .wp-block-image img {
	width: 100%;
	height: 270px;
	object-fit: cover;
	border-radius: var(--afsf-radius-sm);
	box-shadow: 0 6px 18px rgba(27, 24, 21, 0.14);
}

/* -------------------------------------------------------------------------
   Cards
   ------------------------------------------------------------------------- */

.afsf-card {
	background: #fff;
	border: 1px solid rgba(140, 133, 121, 0.3);
	border-radius: var(--afsf-radius-lg);
	padding: 22px 22px 24px;
	height: 100%;
	position: relative;
	transition: transform 150ms ease, box-shadow 150ms ease;
}
.afsf-card::before {
	content: '';
	display: block;
	height: 4px;
	width: 46px;
	background: var(--afsf-marquee-orange);
	border-radius: 2px;
	margin-bottom: 16px;
}
.afsf-card:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(27,24,21,0.10); }
.afsf-card-title { font-size: 1.2rem; margin-bottom: 0.5em; }
.afsf-card-body { color: var(--afsf-ink-body); font-size: 0.96rem; margin-bottom: 0.6em; }
.afsf-card-link a { font-weight: 600; text-decoration: none; }

.afsf-benefits-grid.wp-block-columns,
.afsf-committee-grid.wp-block-columns { gap: 24px; margin-bottom: 8px; }

.afsf-callout {
	background: rgba(29, 111, 104, 0.06);
	border: 1px dashed var(--afsf-reel-teal);
	border-radius: var(--afsf-radius-lg);
	padding: 22px 24px;
}
.afsf-callout h3 { margin-bottom: 0.4em; }

/* Single film-society profile page - Bio / Details / Links / Map sections */
.afsf-society-section { margin-bottom: 40px; }
.afsf-society-section h2 { margin-bottom: 0.6em; }
.afsf-society-section--links p { display: flex; flex-wrap: wrap; gap: 12px; }

.afsf-directory-teaser {
	text-align: center;
	padding: 48px 24px;
	background: rgba(140, 133, 121, 0.08);
	border-radius: var(--afsf-radius-lg);
}
.afsf-directory-teaser .wp-block-buttons { justify-content: center; }

.afsf-global-cta { padding-block: 48px 0; }

.afsf-cta-band {
	text-align: center;
	padding: 56px 24px;
	border-radius: var(--afsf-radius-lg);
}
.afsf-cta-band h2 { color: #fff; }
.afsf-cta-band .afsf-section-intro { color: #fff; }
.afsf-cta-band .wp-block-buttons { justify-content: center; margin-bottom: 0; }

.afsf-section-intro {
	text-align: center;
	max-width: 60ch;
	margin-inline: auto;
	color: var(--afsf-ink-body);
}

.afsf-lede { font-size: 1.15rem; }
.afsf-muted { color: var(--afsf-sprocket-grey); font-size: 0.95rem; }

.afsf-rounded-image img { border-radius: var(--afsf-radius-lg); }

/* -------------------------------------------------------------------------
   Placeholder avatars
   ------------------------------------------------------------------------- */

.afsf-avatar-wrap { display: flex; justify-content: center; margin-bottom: 14px; }
.afsf-avatar {
	width: 76px; height: 76px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #fff;
	font-family: var(--afsf-font-body);
	font-weight: 700;
	font-size: 1.2rem;
	letter-spacing: 0.02em;
}
.afsf-avatar--ink { background: var(--afsf-projection-ink); }
.afsf-avatar--teal { background: var(--afsf-reel-teal); }

.afsf-avatar-card { text-align: center; }
.afsf-avatar-name { font-size: 1.05rem; margin-bottom: 0.2em; }
.afsf-avatar-role { color: var(--afsf-sprocket-grey); font-size: 0.88rem; }

/* -------------------------------------------------------------------------
   Native accordion (core/details) - 60 Questions, FAQs, key rules
   ------------------------------------------------------------------------- */

.wp-block-details {
	background: #fff;
	border: 1px solid rgba(140, 133, 121, 0.3);
	border-radius: var(--afsf-radius-md);
	padding: 14px 18px;
	margin-bottom: 12px;
}
.wp-block-details summary {
	cursor: pointer;
	font-family: var(--afsf-font-display);
	font-weight: 600;
	font-size: 1.05rem;
	color: var(--afsf-projection-ink);
	padding: 6px 0;
	list-style: none;
	position: relative;
	padding-right: 28px;
}
.wp-block-details summary::-webkit-details-marker { display: none; }
.wp-block-details summary::after {
	content: '+';
	position: absolute;
	right: 4px; top: 4px;
	font-size: 1.3rem;
	color: var(--afsf-marquee-orange);
	transition: transform 150ms ease;
}
.wp-block-details[open] summary::after { transform: rotate(45deg); }
.wp-block-details p:last-child { margin-bottom: 0.4em; }

/* -------------------------------------------------------------------------
   Pills / badges
   ------------------------------------------------------------------------- */

.afsf-pill {
	display: inline-block;
	background: rgba(29, 111, 104, 0.1);
	color: var(--afsf-reel-teal);
	font-size: 0.75rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	padding: 3px 10px;
	border-radius: 999px;
	margin-left: 6px;
}

/* -------------------------------------------------------------------------
   Directory shortcode
   ------------------------------------------------------------------------- */

.afsf-directory { max-width: none; }
.afsf-directory__notice {
	background: rgba(244, 120, 42, 0.08);
	border: 1px solid rgba(244, 120, 42, 0.35);
	border-radius: var(--afsf-radius-md);
	padding: 14px 18px;
	font-size: 0.92rem;
	margin-bottom: 28px;
}
.afsf-directory__notice p { margin: 0; }

.afsf-directory__controls {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
	align-items: flex-end;
	margin-bottom: 28px;
}
.afsf-field { display: flex; flex-direction: column; gap: 6px; font-size: 0.88rem; font-weight: 600; color: var(--afsf-ink-body); }
.afsf-field__label { text-transform: uppercase; letter-spacing: 0.04em; font-size: 0.78rem; color: var(--afsf-sprocket-grey); }
.afsf-field--search { flex: 1 1 240px; }

.afsf-field select,
.afsf-field input[type="text"],
.afsf-field input[type="email"],
.afsf-field textarea,
.afsf-form input[type="text"],
.afsf-form input[type="email"],
.afsf-form textarea {
	font-family: var(--afsf-font-body);
	font-size: 0.95rem;
	padding: 10px 12px;
	border: 1px solid var(--afsf-sprocket-grey);
	border-radius: var(--afsf-radius-sm);
	background: #fff;
	color: var(--afsf-ink-body);
}
.afsf-field select:focus,
.afsf-field input:focus,
.afsf-field textarea:focus,
.afsf-form input:focus,
.afsf-form textarea:focus {
	outline: 2px solid var(--afsf-reel-teal);
	outline-offset: 1px;
}

.afsf-az-toggle { align-self: flex-end; }

.afsf-directory__grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 20px;
}

.afsf-society-card {
	background: #fff;
	border: 1px solid rgba(140, 133, 121, 0.3);
	border-radius: var(--afsf-radius-lg);
	padding: 20px;
	text-align: center;
}
.afsf-society-card__top { display: none; }
.afsf-society-card .afsf-avatar { margin: 0 auto 12px; }
.afsf-society-card__photo {
	width: 76px;
	height: 76px;
	object-fit: cover;
	border-radius: 50%;
	margin: 0 auto 12px;
}
.afsf-society-card__name { font-size: 1.05rem; margin-bottom: 0.2em; }
.afsf-society-card__location { color: var(--afsf-sprocket-grey); font-size: 0.85rem; margin-bottom: 0.6em; }
.afsf-society-card__teaser { font-size: 0.88rem; margin-bottom: 1em; }

.afsf-directory__empty { text-align: center; color: var(--afsf-sprocket-grey); padding: 40px 0; }

/* Real directory/single-profile map containers (AFSF Directory Plugin).
   Leaflet needs an element with real, non-zero height to size into. */
.afsf-directory-map {
	width: 100%;
	height: 420px;
	border-radius: var(--afsf-radius-lg);
	border: 1px solid rgba(140, 133, 121, 0.3);
	margin-bottom: 28px;
	background: rgba(140, 133, 121, 0.08);
}
.afsf-society-map {
	width: 100%;
	height: 260px;
	border-radius: var(--afsf-radius-md);
	border: 1px solid rgba(140, 133, 121, 0.3);
	margin-bottom: 24px;
	background: rgba(140, 133, 121, 0.08);
}
@media (max-width: 680px) {
	.afsf-directory-map { height: 320px; }
}

/* -------------------------------------------------------------------------
   Resources hub grid
   ------------------------------------------------------------------------- */

.afsf-resources__controls {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 24px;
}
.afsf-resources__controls .afsf-field--search { flex: 1 1 260px; max-width: 360px; }
.afsf-resources__controls .afsf-az-toggle { flex: 0 0 auto; }

/* 4 columns desktop, 2 tablet, 1 phone - explicit, not auto-fill, so the
   grid always fills evenly left-to-right ("columns till the end") rather
   than reflowing card widths as the count changes. */
.afsf-resources__grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 20px;
}

.afsf-resource-card {
	display: flex;
	flex-direction: column;
	background: #fff;
	border: 1px solid rgba(140, 133, 121, 0.3);
	border-radius: var(--afsf-radius-lg);
	padding: 22px;
	min-height: 260px;
	text-decoration: none;
	color: inherit;
	transition: transform 150ms ease, box-shadow 150ms ease;
}
.afsf-resource-card:hover {
	transform: translateY(-3px);
	box-shadow: 0 10px 24px rgba(27, 24, 21, 0.1);
	color: inherit;
}
.afsf-resource-card__top {
	height: 4px;
	width: 46px;
	background: var(--afsf-marquee-orange);
	border-radius: 2px;
	margin-bottom: 16px;
}
.afsf-resource-card__title { font-size: 1.1rem; margin-bottom: 0.4em; }
.afsf-resource-card__excerpt { font-size: 0.92rem; color: var(--afsf-ink-body); margin-bottom: 0.6em; }
.afsf-resource-card__date { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--afsf-sprocket-grey); margin: 0 0 0.8em; }
.afsf-resource-card__more {
	margin-top: auto;
	font-weight: 600;
	font-size: 0.9rem;
	color: var(--afsf-reel-teal);
}
.afsf-resource-card:hover .afsf-resource-card__more { color: var(--afsf-marquee-orange); }
.afsf-resources__empty { text-align: center; color: var(--afsf-sprocket-grey); padding: 40px 0; }

/* Headlining Articles - taller, bolder cards separated into their own
   section at the top of the Resources page. */
.afsf-resources__section-title {
	font-size: 1.3rem;
	margin: 0 0 16px;
}
.afsf-resources__grid--headline {
	margin-bottom: 40px;
}
.afsf-resource-card--headline {
	min-height: 320px;
	padding: 28px;
	border-color: var(--afsf-marquee-orange);
	border-width: 2px;
}
.afsf-resource-card--headline .afsf-resource-card__top { width: 64px; }
.afsf-resource-card--headline .afsf-resource-card__title { font-size: 1.35rem; }
.afsf-resource-card--headline .afsf-resource-card__excerpt { font-size: 1rem; }

/* Home page "Headlining Guides" 3-card row - reuses the same card family
   look via afsfv1_b_card()'s generic .afsf-card markup. */
.afsf-headline-cards {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 24px;
	margin: 32px 0;
}
.afsf-headline-cards .afsf-card {
	min-height: 220px;
	display: flex;
	flex-direction: column;
}

/* -------------------------------------------------------------------------
   Forms
   ------------------------------------------------------------------------- */

.afsf-form { max-width: 560px; }
.afsf-form .afsf-field { margin-bottom: 16px; }
.afsf-form .afsf-field label { font-size: 0.88rem; font-weight: 600; margin-bottom: 6px; display: block; }
.afsf-form textarea { width: 100%; resize: vertical; }
.afsf-form input[type="text"],
.afsf-form input[type="email"] { width: 100%; }
.afsf-required { color: var(--afsf-marquee-orange); }
.afsf-field-hp { position: absolute; left: -9999px; top: -9999px; }

.afsf-form__result {
	margin-top: 14px;
	padding: 12px 14px;
	border-radius: var(--afsf-radius-sm);
	background: rgba(29, 111, 104, 0.1);
	color: var(--afsf-reel-teal);
	font-size: 0.9rem;
}
.afsf-form__result--error { background: rgba(244, 120, 42, 0.12); color: #B3541A; }

.afsf-contact-columns .wp-block-column:first-child { flex-basis: 60% !important; }

/* -------------------------------------------------------------------------
   Search / 404
   ------------------------------------------------------------------------- */

.afsf-search-result { padding-block: 18px; border-bottom: 1px solid rgba(140,133,121,0.25); }
.afsf-404 { text-align: center; padding-block: 60px; }
.afsf-404 .afsf-btn { margin: 0 6px; }

/* -------------------------------------------------------------------------
   Responsive
   ------------------------------------------------------------------------- */

@media (max-width: 1024px) {
	.afsf-site-footer__inner { grid-template-columns: 1fr; gap: 32px; }
	.afsf-footer-menu { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.afsf-resources__grid { grid-template-columns: repeat(2, 1fr); }
	.afsf-headline-cards { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 1180px) {
	.afsf-menu-toggle { display: flex; }

	.afsf-primary-nav {
		display: none;
		position: absolute;
		top: 100%;
		left: 0; right: 0;
		background: #fff;
		border-bottom: 1px solid rgba(140,133,121,0.3);
		box-shadow: 0 12px 24px rgba(27,24,21,0.12);
		max-height: calc(100vh - var(--afsf-header-h));
		overflow-y: auto;
	}
	.afsf-primary-nav.is-open { display: block; }

	.afsf-nav-menu {
		flex-direction: column;
		align-items: stretch;
		padding: 12px 24px 24px;
		gap: 0;
	}
	.afsf-nav-menu > li > a { padding: 12px 4px; border-bottom: 1px solid rgba(140,133,121,0.15); }
	.afsf-nav-menu .afsf-nav-cta > a { margin: 12px 0 0; text-align: center; border-bottom: none; }

	.afsf-site-search { width: 100%; margin: 16px 0 0; }
	.afsf-site-search input[type="search"] { flex: 1 1 auto; width: auto; }

	.afsf-nav-menu .sub-menu {
		position: static;
		opacity: 1; visibility: visible; transform: none;
		display: none;
		box-shadow: none;
		border: none;
		background: rgba(140,133,121,0.06);
		margin: 4px 0 8px;
	}
	.afsf-nav-menu li.menu-item-has-children.afsf-submenu-open > .sub-menu { display: block; }
	.afsf-nav-menu .menu-item-has-children > a::after { float: right; }

	.afsf-hero { min-height: 480px; }
	.afsf-hero__content { padding: 44px 20px; }
	.afsf-contact-columns .wp-block-column:first-child { flex-basis: 100% !important; }
}

@media (max-width: 680px) {
	body { font-size: 16px; }
	.afsf-container { padding-inline: 18px; }
	.afsf-site-footer__inner { padding-block: 40px 24px; }
	.afsf-footer-menu { grid-template-columns: 1fr; }
	.afsf-directory__controls { flex-direction: column; align-items: stretch; }
	.afsf-az-toggle { align-self: flex-start; }
	.afsf-hero-title { max-width: none; }

	.afsf-poster-row .wp-block-image { flex-basis: 130px; }
	.afsf-poster-row .wp-block-image img { height: 190px; }

	.afsf-resources__grid { grid-template-columns: 1fr; }
	.afsf-headline-cards { grid-template-columns: 1fr; }
	.afsf-site-search input[type="search"] { min-width: 0; }
}
