/* wp-content/plugins/ceca-widgets/widgets/section-index/section-index.css */
/* Section Index (Figma 257:3111 / 214:2586): 20/30 grey sidebar links on a
   30px rhythm, active section black + bold, sticky under the site header. */

.ceca-si {
	--ceca-si-color: #7e7e7e;
	--ceca-si-active: #000;
	--ceca-si-top: 175px; /* 125px sticky header + 50px breathing room */
}

/* Self-sizing (news-sidebar pattern): a container holding the Section Index
   becomes the design's fixed 306px sidebar column, and its following sibling
   becomes the 636px content column — so the row lays out correctly however
   it was assembled in Elementor. */
@media (min-width: 1025px) {
	.e-con:has(> .elementor-widget-ceca-section-index),
	.e-con:has(> .e-con-inner > .elementor-widget-ceca-section-index) {
		flex: 0 0 306px;
		max-width: 306px;
		align-self: stretch;
	}

	.e-con:has(> .elementor-widget-ceca-section-index) ~ .e-con,
	.e-con:has(> .e-con-inner > .elementor-widget-ceca-section-index) ~ .e-con {
		flex: 0 1 636px;
		max-width: 636px;
	}

	/* Wide variant — the "inner-Sidebar-Wide" template (user, 2026-09-29):
	   same 306px sidebar, but the content column takes 960px and runs into
	   the right-hand space. Opt-in via the content container's CSS class. */
	.e-con:has(> .elementor-widget-ceca-section-index) ~ .e-con.ceca-content-wide,
	.e-con:has(> .e-con-inner > .elementor-widget-ceca-section-index) ~ .e-con.ceca-content-wide {
		flex: 0 1 960px;
		max-width: 960px;
	}
}

/* Sticky must sit on the WIDGET wrapper, not the nav: the nav's direct
   parent is the widget div (exactly as tall as the nav), so sticking the nav
   inside it gives zero travel. The wrapper's parent is the full-height
   sidebar column — that's the room it needs. */
.elementor-widget-ceca-section-index:has(.ceca-si--sticky) {
	position: sticky;
	top: var(--ceca-si-top, 175px);
}

.ceca-si__list {
	display: flex;
	flex-direction: column;
	margin: 0;
	padding: 0;
	list-style: none;
}

/* Double specificity + explicit states so theme/kit link globals cannot
   repaint the sidebar. */
.ceca-si .ceca-si__list a {
	display: block;
	padding: 6px 0; /* user, 2026-09-29 */
	font-size: 20px;
	line-height: 25px;
	color: var(--ceca-si-color);
	text-decoration: none;
	transition: color 0.15s ease;
}

.ceca-si .ceca-si__list a:hover,
.ceca-si .ceca-si__list a:focus {
	color: var(--ceca-si-active);
	text-decoration: none;
}

.ceca-si .ceca-si__list a.is-active {
	color: var(--ceca-si-active);
	font-weight: 700;
}

.ceca-si__editor-note {
	margin: 0;
	padding: 12px;
	background: #f7f7f7;
	border: 1px dashed #c4c4c4;
	border-radius: 8px;
	font-size: 13px;
	color: #666;
}

/* The sidebar column collapses above the content on small screens; a long
   sticky list would trap the viewport, so it goes static and horizontal. */
@media (max-width: 1024px) {
	.ceca-si--sticky {
		position: static;
	}

	.ceca-si__list {
		flex-direction: row;
		flex-wrap: wrap;
		gap: 4px 20px;
	}

	.ceca-si .ceca-si__list a {
		padding: 0;
		font-size: 17px;
		line-height: 26px;
	}
}

/* Phones: the inner-page row (now just the content — the index is hidden
   below) sits 30px under the hero, not the desktop 50px. */
@media (max-width: 767px) {
	.e-con:has(> .e-con > .elementor-widget-ceca-section-index),
	.e-con:has(> .e-con-inner > .e-con > .elementor-widget-ceca-section-index) {
		padding-top: 30px !important;
	}
}

/* Phones: no anchor sidebar at all (user, 2026-10-02) — the widget AND its
   306px sidebar column go, so the content column leads straight on. */
@media (max-width: 767px) {
	.elementor-widget-ceca-section-index,
	.e-con:has(> .elementor-widget-ceca-section-index),
	.e-con:has(> .e-con-inner > .elementor-widget-ceca-section-index) {
		display: none !important;
	}
}
