/* =============================================================
   CRC shared UI — tokens, base, header, footer, shared parts
   Ships identically in every CRC plugin (handle: crc-ui).
   Brand: Jindal navy #1B3A7A + crest gold #E3A922.
   Type: Source Serif 4 (headings, reading) + IBM Plex Sans (UI).
   ============================================================= */

.crc-ui {
	--crc-primary:        #1B3A7A;
	--crc-primary-dark:   #142E63;
	--crc-tint:           #EEF3FB;
	--crc-tint-border:    #C9D5EC;
	--crc-accent:         #E3A922;
	--crc-accent-dark:    #CF9614;
	--crc-accent-tint:    #FDF3D8;
	--crc-accent-ink:     #7A5600;
	--crc-ratio-bg:       #FDF6E3;
	--crc-ratio-border:   #F3E3B5;
	--crc-ink:            #14213D;
	--crc-text:           #3A4357;
	--crc-muted:          #5B6478;
	--crc-faint:          #9AA2B1;
	--crc-check:          #B9C1D0;
	--crc-border:         #E3E7EF;
	--crc-border-soft:    #EEF1F6;
	--crc-page:           #F6F8FC;
	--crc-card:           #FFFFFF;
	--crc-radius:         14px;
	--crc-radius-sm:      10px;
	--crc-shadow:         0 1px 2px rgba(20, 33, 61, 0.04);
	--crc-shadow-hover:   0 10px 28px rgba(20, 33, 61, 0.08);
	--crc-sans:           'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
	--crc-serif:          'Source Serif 4', Georgia, 'Times New Roman', serif;
	--crc-shell:          1200px;
	--crc-gutter:         32px;

	background: #FFFFFF;
	color: var(--crc-ink);
	font-family: var(--crc-sans);
	font-size: 16px;
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

body.crc-page {
	margin: 0;
	padding: 0;
	background: #FFFFFF;
}

/* ── Scoped reset (keeps theme styles out) ── */
.crc-ui *,
.crc-ui *::before,
.crc-ui *::after { box-sizing: border-box; }

.crc-ui a {
	color: inherit;
	text-decoration: none;
	box-shadow: none;
	border: 0;
}
.crc-ui h1,
.crc-ui h2,
.crc-ui h3,
.crc-ui h4 {
	margin: 0;
	padding: 0;
	font-family: var(--crc-serif);
	font-weight: 500;
	line-height: 1.25;
	letter-spacing: -0.01em;
	text-transform: none;
	color: var(--crc-ink);
}
.crc-ui p { margin: 0; }
.crc-ui ul,
.crc-ui ol { margin: 0; padding: 0; list-style: none; }
.crc-ui li { margin: 0; }
.crc-ui img { max-width: 100%; height: auto; border: 0; }
.crc-ui button,
.crc-ui input,
.crc-ui select { font-family: inherit; }
.crc-ui :focus-visible { outline: 2px solid var(--crc-accent); outline-offset: 2px; }

.crc-ui-shell {
	max-width: var(--crc-shell);
	margin: 0 auto;
	padding-left: var(--crc-gutter);
	padding-right: var(--crc-gutter);
}

.crc-ui-sr {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

.crc-ui-arrow { flex-shrink: 0; transition: transform 180ms ease; }

/* =========================================================
   HEADER
   Logo: one row of four partner logos, 1043 x 180 px (about 5.8 : 1).
   Shown at 72 px tall (about 417 px wide) in the header and 64 px
   in the footer; the 180 px source covers high-resolution screens.
   ========================================================= */
.crc-ui-header {
	position: relative;
	z-index: 20;
	background: #FFFFFF;
	border-bottom: 1px solid var(--crc-border);
}
.crc-ui-header-row {
	min-height: 108px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
}
.crc-ui-brand { display: block; flex-shrink: 0; }
.crc-ui .crc-ui-brand img {
	display: block;
	height: 72px;
	width: auto;
	max-width: 100%;
}

.crc-ui-nav-list {
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-end;
	gap: 6px;
}
.crc-ui .crc-ui-nav-list a {
	display: block;
	padding: 9px 16px;
	border-radius: 999px;
	font-size: 14px;
	font-weight: 500;
	line-height: 1.4;
	color: var(--crc-text);
	transition: background 160ms ease, color 160ms ease;
}
.crc-ui .crc-ui-nav-list a:hover {
	background: var(--crc-page);
	color: var(--crc-ink);
}
.crc-ui .crc-ui-nav-list .current-menu-item > a,
.crc-ui .crc-ui-nav-list .current_page_item > a,
.crc-ui .crc-ui-nav-list .current-menu-ancestor > a {
	background: var(--crc-tint);
	color: var(--crc-primary);
}

/* =========================================================
   FOOTER
   ========================================================= */
.crc-ui-footer {
	background: #FFFFFF;
	border-top: 1px solid var(--crc-border);
}
.crc-ui-footer-row {
	padding-top: 36px;
	padding-bottom: 36px;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
}
.crc-ui .crc-ui-footer-logo {
	display: block;
	height: 64px;
	width: auto;
	max-width: 100%;
}
.crc-ui-footer-text {
	text-align: right;
	font-size: 13px;
	line-height: 1.7;
	color: var(--crc-muted);
}
.crc-ui-footer-name { font-weight: 500; color: var(--crc-ink); }

/* =========================================================
   SHARED PARTS
   ========================================================= */

/* Breadcrumbs (on navy) */
.crc-ui-crumbs {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	font-size: 13px;
	line-height: 1.5;
	color: rgba(255, 255, 255, 0.7);
}
.crc-ui .crc-ui-crumbs a { color: rgba(255, 255, 255, 0.85); }
.crc-ui .crc-ui-crumbs a:hover { color: #FFFFFF; text-decoration: underline; text-underline-offset: 4px; }
.crc-ui-crumbs [aria-current] { color: #FFFFFF; }

/* Search bar (white box on navy) */
.crc-ui-search {
	display: flex;
	gap: 8px;
	padding: 6px;
	background: #FFFFFF;
	border-radius: 12px;
	transition: box-shadow 160ms ease;
}
.crc-ui-search:focus-within { box-shadow: 0 0 0 3px var(--crc-accent); }
.crc-ui .crc-ui-search input[type="text"],
.crc-ui .crc-ui-search input[type="search"] {
	flex: 1;
	min-width: 0;
	height: 46px;
	margin: 0;
	padding: 0 14px;
	border: 0;
	border-radius: 8px;
	background: #FFFFFF;
	box-shadow: none;
	font-size: 15px;
	color: var(--crc-ink);
}
.crc-ui .crc-ui-search input:focus { outline: none; }
.crc-ui .crc-ui-search input::placeholder { color: var(--crc-muted); opacity: 1; }
.crc-ui .crc-ui-search button {
	height: 46px;
	margin: 0;
	padding: 0 24px;
	border: 0;
	border-radius: 8px;
	background: var(--crc-accent);
	color: var(--crc-ink);
	font-size: 15px;
	font-weight: 600;
	line-height: 1;
	letter-spacing: 0;
	text-transform: none;
	cursor: pointer;
	transition: background 160ms ease;
}
.crc-ui .crc-ui-search button:hover { background: var(--crc-accent-dark); }

/* Pill chip */
.crc-ui-chip {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 4px 10px;
	border-radius: 999px;
	background: var(--crc-tint);
	color: var(--crc-primary);
	font-size: 12px;
	font-weight: 500;
	line-height: 1.4;
}

/* Primary button */
.crc-ui .crc-ui-btn {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	height: 46px;
	padding: 0 22px;
	border: 0;
	border-radius: var(--crc-radius-sm);
	background: var(--crc-primary);
	color: #FFFFFF;
	font-size: 15px;
	font-weight: 500;
	line-height: 1;
	cursor: pointer;
	transition: background 160ms ease;
}
.crc-ui .crc-ui-btn:hover { background: var(--crc-primary-dark); color: #FFFFFF; }

/* Search-term highlight */
.crc-ui mark.crc-highlight {
	background: #FBE7A6;
	color: inherit;
	padding: 0 2px;
	border-radius: 3px;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 760px) {
	.crc-ui { --crc-gutter: 16px; }

	.crc-ui-header-row { min-height: 72px; flex-wrap: wrap; }
	.crc-ui-brand { max-width: 100%; }
	.crc-ui .crc-ui-brand img { height: auto; width: 300px; max-width: 100%; }

	.crc-ui-header-row { gap: 12px; padding-top: 16px; padding-bottom: 12px; justify-content: center; }
	.crc-ui-brand { margin: 0 auto; }
	.crc-ui-nav { flex-basis: 100%; }
	.crc-ui-nav-list { justify-content: center; }

	.crc-ui .crc-ui-footer-logo { height: auto; width: 300px; max-width: 100%; }
	.crc-ui-footer-text { text-align: left; }

	.crc-ui-search { flex-direction: column; }
	.crc-ui .crc-ui-search button { width: 100%; }
}

/* =========================================================
   THEME-PROOF STATES
   Many themes (and page builders such as Elementor) colour every
   button and link on :hover / :focus / :active with selectors that
   outrank plugin styles. These rules pin our own colours in every
   state. !important is deliberate here and limited to colour,
   background, border, shadow and underline.
   ========================================================= */
.crc-ui button:focus,
.crc-ui button:active,
.crc-ui a:focus,
.crc-ui a:active { outline: none; }
.crc-ui button:focus-visible,
.crc-ui a:focus-visible,
.crc-ui select:focus-visible { outline: 2px solid var(--crc-accent) !important; outline-offset: 2px; }

/* Logo link */
.crc-ui .crc-ui-brand,
.crc-ui .crc-ui-brand:hover,
.crc-ui .crc-ui-brand:focus,
.crc-ui .crc-ui-brand:active { background: transparent !important; box-shadow: none !important; }

/* Header menu */
.crc-ui .crc-ui-nav-list a,
.crc-ui .crc-ui-nav-list a:visited,
.crc-ui .crc-ui-nav-list a:focus,
.crc-ui .crc-ui-nav-list a:active {
	background: transparent !important;
	color: var(--crc-text) !important;
	text-decoration: none !important;
	box-shadow: none !important;
}
.crc-ui .crc-ui-nav-list a:hover {
	background: var(--crc-page) !important;
	color: var(--crc-ink) !important;
}
.crc-ui .crc-ui-nav-list .current-menu-item > a,
.crc-ui .crc-ui-nav-list .current-menu-item > a:hover,
.crc-ui .crc-ui-nav-list .current-menu-item > a:focus,
.crc-ui .crc-ui-nav-list .current-menu-item > a:active,
.crc-ui .crc-ui-nav-list .current_page_item > a,
.crc-ui .crc-ui-nav-list .current_page_item > a:hover,
.crc-ui .crc-ui-nav-list .current-menu-ancestor > a,
.crc-ui .crc-ui-nav-list .current-menu-ancestor > a:hover {
	background: var(--crc-tint) !important;
	color: var(--crc-primary) !important;
}

/* Breadcrumbs (on navy) */
.crc-ui .crc-ui-crumbs a,
.crc-ui .crc-ui-crumbs a:visited,
.crc-ui .crc-ui-crumbs a:focus,
.crc-ui .crc-ui-crumbs a:active { color: rgba(255, 255, 255, 0.85) !important; background: transparent !important; }
.crc-ui .crc-ui-crumbs a:hover { color: #FFFFFF !important; }

/* Search bar */
.crc-ui .crc-ui-search input,
.crc-ui .crc-ui-search input:hover,
.crc-ui .crc-ui-search input:focus,
.crc-ui .crc-ui-search input:active {
	background: #FFFFFF !important;
	color: var(--crc-ink) !important;
	border: 0 !important;
	box-shadow: none !important;
	outline: none !important;
}
.crc-ui .crc-ui-search button,
.crc-ui .crc-ui-search button:focus,
.crc-ui .crc-ui-search button:active {
	background: var(--crc-accent) !important;
	color: var(--crc-ink) !important;
	border: 0 !important;
	box-shadow: none !important;
}
.crc-ui .crc-ui-search button:hover { background: var(--crc-accent-dark) !important; color: var(--crc-ink) !important; }

/* Primary button */
.crc-ui .crc-ui-btn,
.crc-ui .crc-ui-btn:visited,
.crc-ui .crc-ui-btn:focus,
.crc-ui .crc-ui-btn:active {
	background: var(--crc-primary) !important;
	color: #FFFFFF !important;
	border: 0 !important;
	box-shadow: none !important;
	text-decoration: none !important;
}
.crc-ui .crc-ui-btn:hover { background: var(--crc-primary-dark) !important; color: #FFFFFF !important; }

/* Chips that are links */
.crc-ui a.crc-ui-chip,
.crc-ui a.crc-ui-chip:visited,
.crc-ui a.crc-ui-chip:focus,
.crc-ui a.crc-ui-chip:active {
	background: var(--crc-tint) !important;
	color: var(--crc-primary) !important;
	text-decoration: none !important;
	box-shadow: none !important;
}
.crc-ui a.crc-ui-chip:hover { background: #E1E9F7 !important; color: var(--crc-primary) !important; }
