/*
 * Site-wide header and footer. Adapted from the client-approved mockup at
 * ~/Desktop/FCLS/fcls-header-footer-mockup.html (mock-* classes renamed to
 * fcls-*; behavior otherwise unchanged).
 */

/* ==================== HEADER ==================== */

.fcls-skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	background: var(--charcoal);
	color: var(--white);
	padding: 12px 20px;
	font-weight: 700;
	font-size: 14px;
	z-index: 999;
	border-radius: 0 0 6px 0;
}
.fcls-skip-link:focus { left: 0; }

.fcls-announcement-bar {
	background: var(--red);
	color: var(--white);
	text-align: center;
	padding: 9px 24px;
	font-size: 13px;
	font-weight: 700;
}
.fcls-announcement-bar a, .fcls-announcement-bar span { color: var(--white); }
.fcls-announcement-bar a:hover { text-decoration: underline; }
@media (max-width: 640px) {
	.fcls-announcement-bar { font-size: 12px; padding: 8px 16px; }
}

.fcls-topbar {
	background: var(--charcoal);
	color: rgba(255,255,255,.85);
	font-size: 13px;
	padding: 8px 24px;
}
.fcls-topbar-inner {
	display: flex;
	justify-content: space-between;
	align-items: center;
	max-width: 1400px;
	margin: 0 auto;
}
.fcls-topbar a { color: var(--white); font-weight: 700; }
.fcls-topbar .social { display: flex; gap: 10px; }
.fcls-topbar .social a {
	width: 26px; height: 26px; border-radius: 50%;
	background: rgba(255,255,255,.1);
	display: flex; align-items: center; justify-content: center;
	font-size: 12px;
}

.fcls-header-wrap {
	position: sticky;
	top: 0;
	z-index: 100;
	background: var(--white);
}
.fcls-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 16px 24px;
	max-width: 1400px;
	margin: 0 auto;
	border-bottom: 1px solid var(--gray-300);
	transition: padding .2s ease;
	gap: 24px;
}
.fcls-logo svg { height: 56px; width: auto; display: block; }
.fcls-logo .shield-mark { display: none; }

.fcls-nav { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.fcls-nav-item { position: relative; }
.fcls-nav-link {
	font-size: 13px; font-weight: 600; color: var(--charcoal);
	cursor: pointer; padding: 8px 0; display: inline-flex; align-items: center; gap: 4px;
	white-space: nowrap; background: none; border: none;
}
.fcls-nav-link:hover, .fcls-nav-item:hover .fcls-nav-link { color: var(--red); }

.fcls-dropdown {
	display: none;
	position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
	background: var(--white); box-shadow: 0 12px 32px rgba(0,0,0,.14);
	border-radius: 8px; padding: 10px; min-width: 240px; z-index: 50;
}
.fcls-nav-item:hover .fcls-dropdown,
.fcls-nav-item.is-open .fcls-dropdown { display: block; }
.fcls-dropdown a { display: block; padding: 9px 14px; border-radius: 6px; font-size: 12.5px; font-weight: 500; color: var(--charcoal-soft); }
.fcls-dropdown a:hover { background: var(--gray-100); color: var(--red); }
.fcls-dropdown.fcls-dropdown-wide { min-width: 460px; column-count: 2; column-gap: 4px; }

.fcls-nav-badge-new, .fcls-nav-badge-trending {
	font-size: 9px; font-weight: 700;
	padding: 2px 5px; border-radius: 3px; vertical-align: middle; letter-spacing: .5px;
	margin-left: 4px;
}
.fcls-nav-badge-new { background: #c0392b; color: #fff; }
.fcls-nav-badge-trending { background: #1a1a1a; color: #fff; }

.fcls-header-cta { display: flex; align-items: center; gap: 18px; }
.fcls-btn-apply {
	display: inline-block; background: var(--red); color: var(--white);
	padding: 13px 24px; border-radius: 4px; font-weight: 700; font-size: 14px; white-space: nowrap;
	margin-left: auto; /* pushes it to the right within the flex nav row on desktop */
}
.fcls-btn-apply:hover { background: var(--red-dark); color: var(--white); }

@media (max-width: 980px) {
	.fcls-btn-apply { margin-left: 0; margin-top: 8px; text-align: center; }
}

.fcls-burger {
	display: none; background: none; border: 1px solid var(--gray-300);
	border-radius: 6px; padding: 10px 12px; cursor: pointer;
}

/* Collapse full logo to shield mark only in the narrow "squeeze" zone
   before the mobile hamburger breakpoint kicks in — keeps the header from
   feeling cramped when there's a lot of nav items competing for space. */
@media (max-width: 1220px) and (min-width: 981px) {
	.fcls-logo .full-mark { display: none; }
	.fcls-logo .shield-mark { display: block; height: 46px; width: auto; }
	.fcls-nav { gap: 16px; }
	.fcls-nav-link { font-size: 12px; }
}

@media (max-width: 980px) {
	.fcls-nav {
		display: none;
		position: absolute; top: 100%; left: 0; right: 0;
		background: var(--white); flex-direction: column; align-items: stretch;
		gap: 0; padding: 8px 24px 16px; box-shadow: 0 12px 32px rgba(0,0,0,.14);
		/* iOS Safari has a known rendering bug where a position:absolute
		   descendant of a position:sticky ancestor (.fcls-header-wrap)
		   doesn't repaint correctly on a class-toggled display change —
		   forcing its own compositing layer works around it. Harmless
		   on other browsers. */
		z-index: 10;
		-webkit-transform: translateZ(0);
		transform: translateZ(0);
	}
	.fcls-nav.is-open { display: flex; }
	.fcls-nav-item { width: 100%; }
	.fcls-nav-link { width: 100%; justify-content: space-between; padding: 12px 0; }
	.fcls-dropdown {
		display: none; position: static; transform: none; box-shadow: none;
		padding: 0 0 8px 12px; min-width: 0;
	}
	.fcls-nav-item.is-open .fcls-dropdown { display: block; }
	/* The base .fcls-nav-item:hover .fcls-dropdown rule (desktop) isn't
	   scoped out here, and iOS Safari applies :hover on tap and clears it
	   unpredictably (e.g. as soon as the page redraws) — fighting with the
	   deliberate JS .is-open toggle and making an expanded submenu appear
	   to collapse on its own before the user can tap anything inside it.
	   Force closed whenever .is-open isn't present, regardless of :hover. */
	.fcls-nav-item:not(.is-open) .fcls-dropdown { display: none !important; }
	.fcls-dropdown.fcls-dropdown-wide { column-count: 1; }
	.fcls-burger { display: inline-flex; }
	.fcls-logo .full-mark { display: block; }
	.fcls-logo .shield-mark { display: none; }
}

@media (max-width: 640px) {
	.fcls-topbar span:first-child { font-size: 12px; }
}

/* ==================== FOOTER ==================== */

.fcls-footer { background: var(--gray-900); color: rgba(255,255,255,.7); padding-top: 60px; }
.fcls-footer .fcls-footer-inner { max-width: 1180px; margin: 0 auto; padding: 0 24px; }

.fcls-footer-top {
	display: grid;
	grid-template-columns: 1.4fr repeat(5, 1fr);
	gap: 24px;
	padding-bottom: 40px;
	border-bottom: 1px solid rgba(255,255,255,.1);
}
.fcls-footer-top h5 {
	color: var(--white); font-size: 11.5px; text-transform: uppercase;
	letter-spacing: .05em; margin-bottom: 12px;
}
.fcls-footer-top ul { display: flex; flex-direction: column; gap: 8px; }
.fcls-footer-top li { font-size: 12px; line-height: 1.4; }
.fcls-footer-top a:hover { color: var(--white); }
.fcls-footer-logo { height: 48px; width: auto; margin-bottom: 14px; display: block; }
.fcls-footer-brand p { font-size: 11.5px; color: rgba(255,255,255,.55); max-width: 240px; }
.fcls-footer-brand .social { display: flex; gap: 10px; margin-top: 16px; }
.fcls-footer-brand .social a {
	width: 32px; height: 32px; border-radius: 50%; background: rgba(255,255,255,.08);
	display: flex; align-items: center; justify-content: center; font-size: 13px;
}

.fcls-footer-links {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 24px;
	padding: 30px 0;
	border-bottom: 1px solid rgba(255,255,255,.1);
	grid-column: 2 / -1;
}
.fcls-footer-links h5 {
	color: var(--white); font-size: 11.5px; text-transform: uppercase;
	letter-spacing: .05em; margin-bottom: 12px;
}
.fcls-footer-links ul { display: flex; flex-direction: column; gap: 8px; }
.fcls-footer-links li { font-size: 12px; line-height: 1.4; }
.fcls-footer-links a:hover { color: var(--white); }

.fcls-compliance {
	display: flex;
	align-items: center;
	gap: 18px;
	padding: 22px 0;
	border-bottom: 1px solid rgba(255,255,255,.1);
	flex-wrap: wrap;
}
.fcls-compliance .badge {
	display: flex; align-items: center; gap: 8px;
	font-size: 11px; color: rgba(255,255,255,.6);
}
.fcls-compliance .badge svg { color: rgba(255,255,255,.5); }
.fcls-compliance a { color: rgba(255,255,255,.75); font-weight: 600; font-size: 11px; }
.fcls-compliance a:hover { color: var(--white); }

.fcls-legal-text {
	font-size: 10.5px; color: rgba(255,255,255,.4); line-height: 1.6;
	padding: 12px 0; max-width: 900px;
}
.fcls-legal-text a { color: rgba(255,255,255,.55); text-decoration: underline; }

.fcls-footer-bottom {
	display: flex; justify-content: space-between; align-items: center;
	padding: 20px 0; font-size: 11px; color: rgba(255,255,255,.45);
	flex-wrap: wrap; gap: 10px;
}
.fcls-footer-bottom a { color: rgba(255,255,255,.6); margin-left: 16px; }

@media (max-width: 980px) {
	.fcls-footer-top { grid-template-columns: repeat(2, 1fr); }
	.fcls-footer-links { grid-column: 1 / -1; grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
	.fcls-footer-top, .fcls-footer-links { grid-template-columns: 1fr; }
}
