/**
 * The Special Interest Group page sections.
 *
 * Skins the stock-widget sections the SIG template (Theme Builder single for
 * `interest_group`) is built from: About this group (frame 359:12877), Our
 * purpose (359:12893), the CTA Banner (352:11938) and Related groups
 * (372:20803) in the OTA design file. Loaded only on interest group singles by
 * Interest_Groups::enqueue_page_styles(), because every selector here is
 * anchored to a `_css_classes` value stamped on that one template.
 *
 * Colours are theme roles wherever the frame binds a variable, with the
 * frame's resolved value as the fallback, same contract as every other block.
 * The one raw hex that remains is `#ffffff` on the related card, which is raw
 * in the frame too, so there is no role to bind. The Join card's `#00252b` is
 * a deliberate literal for a different reason, explained at its rule.
 */

/* --- Shared ---------------------------------------------------------------- */

/*
 * IN-PAGE JUMPS CLEAR THE FIXED HEADER
 *
 * The member banner's arrow points down the page at
 * `#ota-sig-member-content`, and the site header is `position: fixed`, so a
 * plain jump lands the target underneath it. `scroll-padding-top` on the
 * scrolling element is the platform's fix, and `--ota-header-height` is
 * already measured onto `html` by ota-mega-menu.js, so the rule reads it
 * directly. The 16px is breathing room so the target does not land flush
 * against the header's edge.
 *
 * Same rule ota-secondary-nav.css carries, restated here rather than shared,
 * because that stylesheet loads only where its widget renders and group
 * singles do not have the bar. This one is scoped the same way: to group
 * singles, via Interest_Groups::enqueue_page_styles().
 *
 * The admin bar sits above the header and `--ota-admin-bar` is scoped to
 * `body.admin-bar`, which `html` cannot read, hence the `:has()` rules
 * restating WordPress's own heights. Logged-in editors only. Under 600px the
 * admin bar is `position: absolute` and scrolls away with the page, so it
 * gets no offset at all.
 */
html {
	scroll-padding-top: calc(var(--ota-header-height, 0px) + 16px);
}

html:has(body.admin-bar) {
	scroll-padding-top: calc(var(--ota-header-height, 0px) + 32px + 16px);
}

@media screen and (max-width: 782px) {
	html:has(body.admin-bar) {
		scroll-padding-top: calc(var(--ota-header-height, 0px) + 46px + 16px);
	}
}

@media screen and (max-width: 600px) {
	html:has(body.admin-bar) {
		scroll-padding-top: calc(var(--ota-header-height, 0px) + 16px);
	}
}

.ota-sig-about,
.ota-sig-purpose,
.ota-sig-cta,
.ota-sig-archive,
.ota-sig-related,
.ota-sig-resources,
.ota-sig-research {
	padding: 96px 0;
}

/*
 * THE SECTION HEADINGS ARE REGULAR, NOT BOLD
 *
 * Every band header in the design is Heading/H2 at Regular 400, 44/47.5,
 * -0.44px (`Component/Header`, and the same style on Layout/Resources
 * 372:21749 and the Loop band 372:21857). These are stock Elementor Heading
 * widgets with no typography of their own, so they were inheriting the theme's
 * `h2 { font-weight: var(--at-h2-font-weight) }`, which the OTA theme mods set
 * to 700, and the theme's 48px with it. Measured on a group single before this
 * rule: 48px/700 against the design's 44px/400.
 *
 * The kit has the right numbers all along: the `h2` global is 2.75rem at
 * weight 400. The theme's rule is a bare element selector at (0,0,1), so
 * naming the section and the widget is already more than enough to win, and
 * this reads the globals rather than restating the design's numbers, the same
 * way the eyebrow below does and the widgets in this plugin do.
 *
 * Levels are treated separately on purpose. Only the band headers are `h2` and
 * only they are Component/Header, so they take the whole H2 style. The join
 * card's own heading is an `h3` whose design size I have not confirmed, so it
 * gets the weight and keeps its size: the complaint was boldness, and changing
 * a size I have not checked would be a second, unrequested change.
 *
 * The eyebrow is excluded because it IS Bold in the design, by the rule below.
 */
:is(.ota-sig-about, .ota-sig-purpose, .ota-sig-cta, .ota-sig-archive, .ota-sig-related, .ota-sig-resources, .ota-sig-research) .elementor-widget-heading:not(.ota-sig-eyebrow) .elementor-heading-title {
	font-weight: var(--e-global-typography-h2-font-weight, 400);
}

:is(.ota-sig-about, .ota-sig-purpose, .ota-sig-cta, .ota-sig-archive, .ota-sig-related, .ota-sig-resources, .ota-sig-research) .elementor-widget-heading:not(.ota-sig-eyebrow) h2.elementor-heading-title {
	font-size: var(--e-global-typography-h2-font-size, 2.75rem);
	line-height: var(--e-global-typography-h2-line-height, 1.08em);
	letter-spacing: var(--e-global-typography-h2-letter-spacing, -0.44px);
}

/*
 * The eyebrow, one treatment for all four sections: Label/Eyebrow from the
 * type scale, in the accent role the frames bind (`bar/logo` and `bar/accent`
 * both resolve to the ochre on every published theme).
 */
.ota-sig-eyebrow .elementor-heading-title {
	color: var(--ota-accent, #f04c3a);
	font-size: var(--e-global-typography-eyebrow-font-size, 1.0625rem);
	font-weight: var(--e-global-typography-eyebrow-font-weight, 700);
	line-height: var(--e-global-typography-eyebrow-line-height, 1.46em);
	letter-spacing: var(--e-global-typography-eyebrow-letter-spacing, 1px);
}

/*
 * Three classes, not two: the kit's widget spacing rule
 * (`.elementor-widget:not(:last-child)`, 20px) ties a two-class selector at
 * (0,2,0) and wins on load order, which held the eyebrow 20px off its heading.
 * The design draws 8px (Component/Header 359:13510).
 */
.elementor-widget.elementor-widget-heading.ota-sig-eyebrow {
	margin-bottom: 8px;
}

/*
 * The theme stretches any Elementor button in a one-third column to the full
 * column (`skinned/2020`: `#agendtheme-content ... .elementor-col-33 >
 * .elementor-widget-wrap a.elementor-button-link { width: 100% }`, at 1,5,1).
 * The pill then centres its label and dot inside the stretched box and the
 * padding reads broken. Mirroring the theme's own chain plus the section class
 * lands at 1,6,1, so this wins exactly where the theme fights and nowhere
 * else; same approach as the full-width-column note in ota-buttons.css.
 */
#agendtheme-content .agendtheme-content-inner :is(.ota-sig-related, .ota-sig-archive, .ota-sig-about, .ota-sig-purpose, .ota-sig-cta, .ota-sig-resources, .ota-sig-research) .elementor-column > .elementor-widget-wrap a.elementor-button-link:not(.elementor-slide-button) {
	width: max-content;
}

/* --- The member banner's band ----------------------------------------------- */

/*
 * The banner and About are ONE white region in the frame (359:13588), not two
 * bands: 96px above the banner, then only 24px between it and About. So this
 * band carries the leading 96 and hands the trailing gap to About, which
 * otherwise opens its own 96 and pushed the pair 72px apart.
 *
 * The adjacent sibling is what makes that conditional: on a member's page the
 * banner is there and About tightens up; on a guest's page the section is not
 * rendered at all and About keeps its own 96. Top level Elementor sections are
 * siblings, which is the only reason this can be expressed in CSS rather than
 * in two versions of the template.
 */
.ota-sig-banner-wrap {
	padding-block: 96px 0;
}

.ota-sig-banner-wrap + .ota-sig-about {
	padding-block-start: 24px;
}

@media (max-width: 1024px) {
	.ota-sig-banner-wrap {
		padding-block: 64px 0;
	}
}

/* --- About this group: the image and the retired stat cards ---------------- */

/*
 * The feature image takes the frame's 14px card radius, written literally like
 * the row cards below: there is no site-wide radius token to read. It is a
 * stock Elementor image widget inside each group's own About block (26 copies
 * of saved section intro-sig-content_about), so the radius is set here once
 * rather than on 26 widgets, and a group built tomorrow from the same section
 * gets it too. The radius goes on the img itself, so it holds whether the
 * widget wraps it in a figure, a link, or neither, and it clips the replaced
 * element directly with nothing else to round.
 *
 * Prefixed with the theme's own ID chain because the theme sets every
 * content image's radius through `main#agendtheme-content
 * .agendtheme-content-inner:not(...) img` (1,2,1), which a class-only rule
 * cannot beat. Same device as the button rule above.
 */
#agendtheme-content .agendtheme-content-inner .ota-sig-about .elementor-widget-image img {
	border-radius: 14px;
}

/*
 * The stat cards under the image ("1,200+ members", "National / open to
 * every state & territory") were removed from every group's content on
 * 1 Oct 2026 (Bryce: "remove this card under the image"), by
 * strip-sig-stats-card.php in the migration tools. This rule covers an
 * environment where the content script has not run yet, so the card never
 * shows there either. Its colour rules went with it.
 */
.ota-sig-about .ota-sig-stats {
	display: none;
}

/* --- Our purpose: the numbered rows ----------------------------------------- */

/*
 * The frame's section/number rows (359:12901): a two-digit accent number, a
 * 32px gutter, Body/Lead text, 24px of breathing room and a divider under each
 * row. Drawn from a plain <ol> with CSS counters so the editor writes an
 * ordinary list and the numbers can never drift out of sequence.
 */
.ota-sig-purpose-list ol {
	margin: 0;
	padding: 0;
	list-style: none;
	counter-reset: ota-sig-purpose;
}

.ota-sig-purpose-list li {
	display: flex;
	gap: 32px;
	padding: 24px 0;
	border-bottom: 1px solid var(--ota-divider, rgba(0, 48, 56, 0.2));
	color: var(--ota-text, #003038);
	font-size: var(--e-global-typography-lead-font-size, 1.375rem);
	font-weight: 400;
	line-height: 1.5;
	letter-spacing: -0.22px;
}

.ota-sig-purpose-list li::before {
	counter-increment: ota-sig-purpose;
	content: counter(ota-sig-purpose, decimal-leading-zero);
	flex: none;
	width: 64px;
	color: var(--ota-accent, #f04c3a);
	font-size: 32px;
	line-height: 1.08;
	letter-spacing: -0.32px;
}

/* --- The CTA banner ---------------------------------------------------------- */

/*
 * The section headings, made visible. The kit paints headings in the dark
 * text colour and never re-reads the theme, so on the navy band the H2 was
 * navy on navy: present, measured, invisible. The eyebrow escaped because its
 * own rule above names a colour. `white-text` is the role for text that reads
 * on the current theme, exactly this job.
 */
.ota-sig-cta .elementor-widget-heading:not(.ota-sig-eyebrow) .elementor-heading-title {
	color: var(--ota-white-text, #f0e7d8);
}

/*
 * The Join OTA card (352:11938's right panel), painted here rather than
 * through the section's own style settings so a rule cannot silently fail to
 * generate.
 *
 * NOT THE FRAME'S #003038, ON PURPOSE. The frame draws a #003038 card on a
 * band of a different teal, but this site's navy theme resolves the band's
 * `background` role to #003038 itself, so the frame's literal card colour
 * rendered invisibly: same paint on same paint, measured on the page. The
 * card takes the next step down instead, which keeps the design's
 * dark-card-on-dark-band intent. One for the designer: give the card a bound
 * variable and this hex follows it.
 */
.ota-sig-cta .ota-sig-cta-card {
	padding: 48px;
	border-radius: 30px;
	background-color: #00252b;
}

/* --- The cards themselves live in ota-post-cards.css ----------------------- */

/*
 * The redress of Pro's cards skin used to sit here, scoped to
 * `.ota-sig-related` and `.ota-sig-archive`. It moved to
 * assets/css/ota-post-cards.css on 9 Sep 2026 so that every post grid on the
 * site can wear the same card, and both of those class names are still named
 * there, so nothing on this template changed. What is left in this file is the
 * template's own layout: the band padding, the headings, the eyebrow and the
 * `--rows` variant below, which overrides the shared card and therefore
 * depends on loading after it. Interest_Groups::enqueue_page_styles() declares
 * that dependency.
 */

/* All five, not four: `.ota-sig-archive` takes the same 96px above and has to
   come down with the rest, or the news and events sub-pages read heavier than
   every other SIG section on tablet and mobile. It was left off the list. */
@media (max-width: 1024px) {
	.ota-sig-about,
	.ota-sig-purpose,
	.ota-sig-cta,
	.ota-sig-archive,
	.ota-sig-related,
	.ota-sig-resources,
	.ota-sig-research {
		padding: 64px 0;
	}
}

/*
 * The sub-page archive's pagination, Pro's own numbers centred and given the
 * theme's text colour. Only appears on /news/ when a group outgrows a page.
 */
.ota-sig-archive .elementor-pagination {
	margin-top: 48px;
	text-align: center;
}

.ota-sig-archive .elementor-pagination .page-numbers {
	color: var(--ota-text, #003038);
	font-weight: 700;
}

/* --- The rows variant: the site's archive card, on the news sub-page -------- */

/*
 * Asked for by Bryce on 19 Aug 2026: the sub-page's grid tiles read wrong
 * against the rest of the site's listings, so the cards take the archive
 * card's shape instead: a white full-width row, image left, the category as
 * an eyebrow over the title, and the arrow dot riding the right edge. Grid
 * rather than absolute positioning: Pro's markup order (thumbnail, badge,
 * text) maps straight onto named areas, so the badge sits above the title
 * without knowing the image's width.
 */
.ota-sig-archive--rows .elementor-posts .elementor-post__card {
	display: grid;
	grid-template-columns: 370px 1fr;
	grid-template-rows: auto 1fr;
	gap: 0 32px;
	padding: 24px;
	border: 1px solid var(--ota-divider, rgba(0, 48, 56, 0.15));
	overflow: visible;
}

.ota-sig-archive--rows .elementor-posts .elementor-post__card .elementor-post__thumbnail__link {
	grid-row: 1 / 3;
	height: auto;
	min-height: 240px;
	border-radius: 14px;
	overflow: hidden;
}

/* The category, an eyebrow above the title rather than a pill on the image. */
.ota-sig-archive--rows .elementor-posts .elementor-post__card .elementor-post__badge {
	position: static;
	align-self: end;
	margin: 8px 0 0;
	padding: 24px 96px 0 0;
	border-radius: 0;
	background: none;
	color: var(--ota-accent, #f04c3a);
	font-size: 13px;
	letter-spacing: 0.78px;
	text-transform: uppercase;
}

.ota-sig-archive--rows .elementor-posts .elementor-post__card .elementor-post__text {
	padding: 8px 96px 24px 0;
}

/*
 * The arrow dot rides the card's right edge, filled at rest the way the
 * archive rows draw it. The label is the dot: the words are hidden rather
 * than removed so the link keeps its accessible name.
 */
.ota-sig-archive--rows .elementor-posts .elementor-post__card .elementor-post__read-more {
	margin: 0;
	font-size: 0;
	line-height: 0;
}

.ota-sig-archive--rows .elementor-posts .elementor-post__card .elementor-post__read-more::after {
	position: absolute;
	top: 50%;
	right: 48px;
	transform: translateY(-50%);
	width: 44px;
	height: 44px;
	background-color: var(--ota-cta-bg, #003038);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 13 13' fill='none'%3E%3Cpath d='M2.71 6.5h7.58' stroke='%23ffffff' stroke-width='1.35' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M7.04 3.25 10.29 6.5 7.04 9.75' stroke='%23ffffff' stroke-width='1.35' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
	background-size: 16px 16px;
}

@media (max-width: 1024px) {
	.ota-sig-archive--rows .elementor-posts .elementor-post__card {
		grid-template-columns: 1fr;
		grid-template-rows: auto auto auto;
	}

	.ota-sig-archive--rows .elementor-posts .elementor-post__card .elementor-post__thumbnail__link {
		grid-row: 1;
		min-height: 200px;
	}

	.ota-sig-archive--rows .elementor-posts .elementor-post__card .elementor-post__badge,
	.ota-sig-archive--rows .elementor-posts .elementor-post__card .elementor-post__text {
		padding-right: 0;
	}

	.ota-sig-archive--rows .elementor-posts .elementor-post__card .elementor-post__read-more::after {
		position: static;
		transform: none;
		margin-top: 8px;
	}
}

/*
 * The events sub-page's rows: the same archive-card shape applied to the
 * Events Block's own cards, because the events DATA has to keep coming
 * through the kiosk bridge (upcoming-only, event-date ordering, the CRM meta
 * matching) and only the paint should change. The date badge stays on the
 * image, where the events design puts it; the View Event footer collapses to
 * the riding arrow dot, label hidden not removed so the card keeps its
 * accessible name.
 */
.ota-sig-archive--rows .ota-events__grid {
	display: flex;
	flex-direction: column;
	gap: 24px;
}

.ota-sig-archive--rows .ota-events__card {
	position: relative;
	display: grid;
	grid-template-columns: 370px 1fr;
	gap: 0 32px;
	padding: 24px 120px 24px 24px;
	border: 1px solid var(--ota-divider, rgba(0, 48, 56, 0.15));
	border-radius: 14px;
	background: #ffffff;
	overflow: visible;
}

.ota-sig-archive--rows .ota-events__card .ota-events__media {
	height: 240px;
	border-radius: 14px;
	overflow: hidden;
}

.ota-sig-archive--rows .ota-events__card .ota-events__body {
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding: 8px 0;
}

.ota-sig-archive--rows .ota-events__card .ota-events__footer {
	position: absolute;
	top: 50%;
	right: 48px;
	transform: translateY(-50%);
	margin: 0;
	padding: 0;
	border: 0;
}

.ota-sig-archive--rows .ota-events__card .ota-events__more {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

.ota-sig-archive--rows .ota-events__card .ota-events__dot {
	width: 44px;
	height: 44px;
	background-color: var(--ota-cta-bg, #003038);
	color: var(--ota-cta-text, #ffffff);
}

@media (max-width: 1024px) {
	.ota-sig-archive--rows .ota-events__card {
		grid-template-columns: 1fr;
		padding: 24px;
	}

	.ota-sig-archive--rows .ota-events__card .ota-events__media {
		height: 200px;
	}

	.ota-sig-archive--rows .ota-events__card .ota-events__footer {
		position: static;
		transform: none;
		margin-top: 16px;
	}
}
