/* home.css -- homepage-only styles moved out of index.php (2026-06-15).
   Loaded only on the homepage via $pageHeadCss, so the shared pages
   (outages / maps / gallery / quiz) never download it. Bump ?v= on edit. */

/* ===== gn cluster + card grid ===== */
/* ===================== Job company clusters ===================== */
.gn-cluster-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 14px;
    margin: 12px 0 18px;
    align-items: start; /* cards size to content; no stretch to tallest neighbor */
}
.gn-cluster {
    display: flex;
    flex-direction: column;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 14px 16px;
    box-shadow: var(--shadow-sm);
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.gn-cluster:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--nuke-blue);
}
/* Header: the company logo spans the full width of the card top, centered,
   standing in for the company name (which is the logo's alt text). */
.gn-cluster-head {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 56px;
    padding: 6px 0 12px;
    margin-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
}
.gn-cluster-logo-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 56px;          /* reserve the logo row so lazy logos never shift it (CLS) */
    line-height: 0;
    text-decoration: none !important;
}
.gn-cluster-logo { max-height: 56px; max-width: 78%; width: auto; height: auto; object-fit: contain; display: block; }
.gn-cluster-name-text {
    font-size: 1.18em;
    font-weight: 800;
    letter-spacing: .3px;
    line-height: 1.2;
    text-transform: uppercase;
    text-align: center;
    color: var(--nuke-blue-dark) !important;
}
.gn-cluster-logo-link:hover .gn-cluster-name-text { color: var(--nuke-blue) !important; }
.gn-cluster-jobs { display: flex; flex-direction: column; }
.gn-job { padding: 7px 0; border-bottom: 1px dashed var(--border-color); }
.gn-job:last-child { border-bottom: 0; }
.gn-job-title {
    display: block;
    font-weight: 600;
    line-height: 1.35;
    font-size: .96em;
    color: var(--text-main) !important;
    text-decoration: none !important;
}
.gn-job-title:hover { color: var(--nuke-blue) !important; }
.gn-job-meta {
    display: flex;
    align-items: center;
    gap: 9px;
    flex-wrap: wrap;
    margin-top: 3px;
    font-size: .76em;
    color: var(--text-muted);
}
.gn-chip {
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .3px;
    color: var(--nuke-blue);
    background: rgba(52, 102, 153, .1);
    padding: 1px 7px;
    border-radius: 10px;
    font-size: .92em;
}
.gn-job-meta .gn-loc { color: var(--text-muted) !important; text-decoration: none !important; }
.gn-job-meta .gn-loc:hover { color: var(--nuke-blue) !important; }
.gn-job-meta i { color: #bdc3c7; margin-right: 3px; }
/* Bottom CTA: full-width, centered. Two variants — gold for NEW jobs, neutral
   for the total open-role count. */
.gn-cluster-more {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin-top: 10px;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: .82em;
    font-weight: 700;
    text-align: center;
    text-decoration: none !important;
    transition: all .2s ease;
}
.gn-cluster-more .status-new { margin: 0; }
.gn-cluster-more--new {
    color: #7a5c00 !important;
    background: rgba(255, 215, 0, .16);
    border: 1px solid rgba(255, 215, 0, .45);
}
.gn-cluster-more--new:hover { background: var(--nuke-gold); color: #000 !important; box-shadow: 0 4px 12px rgba(255, 215, 0, .3); }
.gn-cluster-more--all {
    color: var(--nuke-blue) !important;
    background: var(--bg-light);
    border: 1px solid var(--border-color);
}
.gn-cluster-more--all:hover { background: #eef2f7; border-color: var(--nuke-blue-light); color: var(--nuke-blue-dark) !important; }

/* ===================== Forum story cards ===================== */
/* The forum sections wrap this grid in a .forum-feed div that nuke2026.css
   styles as its OWN auto-fill grid. Left as-is, that traps this entire grid
   inside one ~300px column-track and strands the rest of the content column
   empty. Flatten the wrapper so the card grid spans the full width. */
.row-forum .forum-feed { display: block; margin: 10px 0 0; padding: 0; }
.gn-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
    gap: 14px;
    margin: 12px 0;
    align-items: stretch; /* all cards in a row share the tallest card's height (full height) */
}
.gn-card {
    position: relative; /* anchor for the stretched title link */
    display: flex;
    flex-direction: column;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.gn-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--nuke-blue); }
/* Make the whole card (image, preview, empty space) click through to the post.
   A dedicated overlay link covers the card; the board + poster links sit above
   it so they stay independently clickable. (Can't hang this off the title's
   ::after -- the title has overflow:hidden for its line-clamp, which would clip
   the overlay to just the title box.) */
.gn-card-link { position: absolute; inset: 0; z-index: 1; }
.gn-card .gn-board,
.gn-card .gn-byline-name { position: relative; z-index: 2; }
.gn-card--lead { grid-column: span 2; }
.gn-card-media { display: block; line-height: 0; }
.gn-card-body { display: flex; flex-direction: column; flex: 1; padding: 12px 14px; }

/* Text card (no image): no placeholder tile; a brand accent bar + a longer
   snippet so it carries weight and roughly matches the image cards' height. */
.gn-card--text { border-top: 3px solid var(--nuke-blue); }
.gn-card--text .gn-card-body { padding-top: 14px; }
.gn-card--text .gn-card-title { font-size: 1.12em; }
.gn-card--text.gn-card--lead .gn-card-title { font-size: 1.5em; }
.gn-card--text.gn-card--lead .gn-card-preview { font-size: .95em; }
/* Trailing card(s) hidden by JS so the last grid row is never ragged */
.gn-card.gn-hide { display: none; }
/* Buffer Site News cards trimmed by nwFillSiteNews() to fit the center column */
.site-news-card.nw-snews-hide { display: none !important; }

.gn-thumb {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: var(--gradient-blue);
    overflow: hidden;
}
.gn-card--lead .gn-thumb { aspect-ratio: 21 / 9; }
/* Subtle on-brand gradient variants for the (imageless) fallback tile */
.gn-thumb--v0 { background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%); }
.gn-thumb--v1 { background: linear-gradient(135deg, #243b55 0%, #141e30 100%); }
.gn-thumb--v2 { background: linear-gradient(135deg, #2c5364 0%, #203a43 100%); }
.gn-thumb--v3 { background: linear-gradient(135deg, #3a6073 0%, #16222a 100%); }
.gn-thumb-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; z-index: 1; }
.gn-thumb-fallback {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, .82);
    font-size: 2.6em;
    z-index: 0;
}
.gn-thumb-fallback::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 22%, rgba(255, 255, 255, .14), transparent 60%);
}
.gn-thumb-fallback i { position: relative; z-index: 1; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .25)); }
.gn-card--lead .gn-thumb-fallback { font-size: 3.6em; }

.gn-board {
    font-size: .72em;
    font-weight: 800;
    letter-spacing: .6px;
    text-transform: uppercase;
    color: var(--nuke-blue) !important;
    text-decoration: none !important;
    margin-bottom: 5px;
    display: block;
}
.gn-board:hover { color: var(--nuke-blue-dark) !important; }
.gn-card-title {
    font-family: var(--font-condensed);
    letter-spacing: -.2px;
    font-size: 1.06em;
    font-weight: 700;
    line-height: 1.3;
    color: var(--text-main) !important;
    text-decoration: none !important;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.gn-card-title:hover { color: var(--nuke-blue) !important; }
.gn-card--lead .gn-card-title { font-size: 1.45em; -webkit-line-clamp: 3; }
.gn-card-preview {
    font-size: .85em;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 10px;
    display: block;
    /* flex-basis 0 is the key: the snippet text does NOT count toward the card's
       natural height, so a long body never inflates the card. Card height is set
       by the genuinely-tall cards in the row (image/lead). flex-grow then lets a
       SHORT card's snippet expand to fill only its leftover white space (clipped
       by overflow). min-height is a small baseline so an all-text row still shows
       a few lines instead of collapsing. The server caps text long enough to
       have something to fill the gap with. */
    flex: 1 1 0;
    min-height: 4.5em; /* ~3 lines: compact baseline when nothing forces it taller */
    overflow: hidden;
}
.gn-card--lead .gn-card-preview { font-size: .92em; }
.gn-byline { display: flex; align-items: center; gap: 7px; margin-top: auto; font-size: .78em; color: var(--text-muted); }
.gn-avatar { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; flex-shrink: 0; background: var(--bg-light); }
.gn-avatar--ph { display: flex; align-items: center; justify-content: center; color: #bdc3c7; font-size: .7em; border: 1px solid var(--border-color); }
.gn-byline-name { font-weight: 600; color: var(--text-main) !important; text-decoration: none !important; }
.gn-byline-name:hover { color: var(--nuke-blue) !important; }
.gn-byline-age { margin-left: auto; white-space: nowrap; }
.gn-byline-age i { color: #cbd5e1; margin-right: 3px; }
.gn-byline-comments { white-space: nowrap; }
.gn-byline-comments i { color: #cbd5e1; margin-right: 3px; }

/* ===================== Responsive ===================== */
/* .gn-card-grid auto-fills columns to the available width, so it needs no
   per-width column rules; only the lead span is clamped on phones below. */
@media (max-width: 1060px) {
    .gn-cluster-grid { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
    .gn-card-grid { grid-template-columns: 1fr; }
    /* Server-side mobile trim: cards past the visible count start hidden, so the
       first paint matches the final state and nothing collapses post-load (CLS). */
    .gn-card.gn-hide-mobile { display: none; }
    .gn-card--lead { grid-column: span 1; }
    .gn-card--lead .gn-thumb { aspect-ratio: 16 / 9; }
    .gn-card--lead .gn-card-title { font-size: 1.2em; }
    .gn-cluster { padding: 12px; }
    .gn-cluster-logo { max-height: 38px; max-width: 110px; }
    .gn-cluster-logo-link { min-height: 38px; }
}

/* ===== job feed footer, section headers / KPIs, more card styles ===== */
.job-feed .job-item-footer {
    display: none;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    margin-top: auto;
    padding-top: 8px;
}
@media (max-width: 1060px) {
    .job-feed .job-item-footer { display: flex; }
}
.job-feed .job-item-type {
    font-size: 0.7em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--nuke-blue);
    background: rgba(42, 82, 152, 0.1);
    padding: 2px 8px;
    border-radius: 10px;
    white-space: nowrap;
}
.job-feed .job-item-age {
    font-size: 0.78em;
    color: var(--text-muted);
    white-space: nowrap;
}
.job-feed .job-item-age i {
    margin-right: 4px;
    color: #bdc3c7;
}
/* Section header: stacked title + subline (jobs + gallery) */
.section-header-titles {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}
.section-subline {
    margin: 0;
    font-size: 0.8rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.8);
    letter-spacing: 0.2px;
}
/* From the Gallery row — fixed 5-up grid so cards never stretch/blur on an
   under-full row (the old flex:1 1 150px packed 8-up then stretched the 2
   leftovers huge). Column count steps down at the page's breakpoints. */
.gallery-row {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
}
@media (max-width: 1060px) {
    .gallery-row { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 600px) {
    .gallery-row { grid-template-columns: repeat(2, 1fr); }
}
.gallery-card {
    position: relative;
    display: block;
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 16 / 10;
    text-decoration: none !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.06);
    transition: all 0.2s ease;
}
.gallery-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transform: translateY(-2px);
}
.gallery-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.gallery-card-caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 22px 10px 8px;
    font-size: 0.8em;
    font-weight: 700;
    line-height: 1.3;
    color: #ffffff !important;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.55) 45%, rgba(0,0,0,0) 100%);
}
/* Jobs KPI / action row — 4 matching boxes */
.job-kpi-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}
.job-kpi-box {
    flex: 1 1 155px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 8px;
    padding: 14px 12px;
    text-decoration: none !important;
    background: linear-gradient(135deg, #346699 0%, #2a5298 50%, #1e3c72 100%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 2px 4px rgba(0,0,0,0.06);
    transition: all 0.2s ease;
}
.job-kpi-box:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transform: translateY(-2px);
}
.job-kpi-icon {
    font-size: 1.6em;
    line-height: 1;
    color: var(--nuke-gold);
}
.job-kpi-text {
    font-size: 0.82em;
    font-weight: 700;
    line-height: 1.35;
    text-align: center;
    color: #ffffff !important;
}
.job-kpi-num {
    color: var(--nuke-gold) !important;
    font-weight: 800;
    font-size: 1.15em;
}
@media (max-width: 480px) {
    .job-kpi-row { gap: 8px; }
    .job-kpi-box {
        padding: 10px;
        flex-basis: calc(50% - 4px);
    }
}
/* Job card header: 2-row grid — logo | company + date | location + type */
#jobs .job-feed .job-item {
    padding: 8px 12px;
}
#jobs .job-feed .feed-item-header {
    display: grid;
    grid-template-columns: auto 1fr auto;
    grid-template-rows: auto auto;
    column-gap: 10px;
    row-gap: 1px;
    align-items: center;
    margin-bottom: 2px;
}
#jobs .job-feed .job-item-title {
    line-height: 1.3;
    margin-bottom: 0;
}
#jobs .job-feed .job-item-logo-link {
    grid-column: 1;
    grid-row: 1 / span 2;
    align-self: center;
}
#jobs .job-feed .job-item-logo {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    margin-right: 0;
}
#jobs .job-feed .job-item-company {
    grid-column: 2;
    grid-row: 1;
    display: block;
    min-width: 0;
    /* Shrink-wrap to the text so the empty space to the right of the company
       name falls through to the stretched job-title link instead of being a
       dead employer-link hotspot. max-width caps long names at the column
       width so they still ellipsis-truncate (see .job-item-title::after). */
    justify-self: start;
    max-width: 100%;
    margin: 0;
    font-size: 0.95em;
    font-weight: 700;
    text-transform: none;
    letter-spacing: 0;
    color: var(--text-main) !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
#jobs .job-feed .job-item-company:hover {
    color: var(--nuke-blue) !important;
}
#jobs .job-feed .job-item-date {
    grid-column: 3;
    grid-row: 2;
    justify-self: end;
    font-size: 0.76em;
    color: var(--text-muted);
    white-space: nowrap;
}
#jobs .job-feed .job-item-date i {
    margin-right: 3px;
    color: #bdc3c7;
}
#jobs .job-feed .job-item-location {
    grid-column: 2;
    grid-row: 2;
    display: block;
    min-width: 0;
    /* Same shrink-wrap as .job-item-company: keep the location hotspot to its
       text so the gap before the posted-date routes to the job link. */
    justify-self: start;
    max-width: 100%;
    font-size: 0.72em;
    color: var(--text-muted) !important;
    text-decoration: none !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
#jobs .job-feed .job-item a.job-item-location {
    position: relative;
    z-index: 2;
}
#jobs .job-feed a.job-item-location:hover {
    color: var(--nuke-blue) !important;
}
#jobs .job-feed .job-item-location i {
    margin-right: 3px;
    color: #bdc3c7;
}
#jobs .job-feed .feed-item-header .job-item-type {
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
    align-self: center;
}
@media (max-width: 1060px) {
    #jobs .job-feed .feed-item-header { display: none; }
}

/* ===== Site News widget ===== */
			.site-news-widget {
				font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
			}
			.site-news-widget h3 {
				font-size: 1.05em;
				letter-spacing: 0.3px;
			}
			.site-news-card {
				margin-bottom: 14px;
				padding: 12px;
				border-radius: 8px;
				background: rgba(255, 255, 255, 0.05);
				border: 1px solid rgba(255, 255, 255, 0.1);
				transition: all 0.25s ease;
				text-decoration: none !important;
				display: block;
				color: white;
			}
			.site-news-card:hover {
				transform: translateY(-2px);
				background: rgba(255, 255, 255, 0.12);
				box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
				border-color: rgba(255, 215, 0, 0.3);
			}
			.site-news-title {
				color: #ffffff;
				font-size: 0.92em;
				margin: 0 0 6px 0;
				font-weight: 700;
				line-height: 1.3;
				letter-spacing: 0.2px;
			}
			.site-news-body {
				color: rgba(255, 255, 255, 0.8);
				font-size: 0.78em;
				line-height: 1.55;
				display: block;
				margin-bottom: 8px;
				font-weight: 400;
			}
			.site-news-cta {
				display: inline-block;
				background: rgba(255, 215, 0, 0.15);
				color: #FFD700;
				padding: 3px 10px;
				border-radius: 12px;
				font-size: 0.7em;
				font-weight: 600;
				letter-spacing: 0.3px;
				text-transform: uppercase;
				transition: all 0.2s ease;
				border: 1px solid rgba(255, 215, 0, 0.2);
			}
			.site-news-card:hover .site-news-cta {
				background: rgba(255, 215, 0, 0.25);
				border-color: rgba(255, 215, 0, 0.4);
			}
			/* Tighter right sidebar on laptops */
			@media (max-width: 1440px) {
				.site-news-widget {
					padding: 10px !important;
				}
				.site-news-widget h3 {
					font-size: 0.9em;
				}
				.site-news-card {
					margin-bottom: 10px;
					padding: 8px;
				}
				.site-news-title {
					font-size: 0.82em;
				}
				.site-news-body {
					font-size: 0.7em;
				}
				.site-news-cta {
					font-size: 0.62em;
					padding: 2px 8px;
				}
			}

/* ===== Right sidebar collapse toggle ===== */
			/* --- Right Sidebar Collapse Toggle --- */
			.right-sidebar-toggle {
				cursor: pointer;
				color: rgba(255,255,255,0.5);
				font-size: 0.75em;
				padding: 2px 4px;
				border-radius: 4px;
				transition: color 0.2s, background 0.2s;
				margin-left: auto;
				flex-shrink: 0;
			}
			.right-sidebar-toggle:hover {
				color: #FFD700;
				background: rgba(255,255,255,0.1);
			}
			/* Collapsed right sidebar */
			.col-right.rsidebar-collapsed .right-sidebar-text {
				display: none;
			}
			.col-right.rsidebar-collapsed .right-sidebar-toggle {
				position: absolute;
				top: -38px;
				left: 0;
				right: 0;
				display: flex;
				align-items: center;
				justify-content: center;
				background: linear-gradient(135deg, #2a5298 0%, #1e3c72 100%);
				border: 1px solid rgba(255,255,255,0.15);
				border-radius: 8px;
				padding: 6px;
				margin: 0;
				font-size: 0.9em;
				color: rgba(255,255,255,0.7);
			}
			.col-right.rsidebar-collapsed .right-sidebar-toggle:hover {
				background: linear-gradient(135deg, #346699 0%, #2a5298 100%);
				color: #FFD700;
			}
			.col-right.rsidebar-collapsed .site-news-widget {
				position: relative;
				margin-top: 38px;
				padding: 8px 4px;
			}
			.col-right.rsidebar-collapsed .site-news-widget h3 {
				justify-content: center;
				border-bottom: none !important;
				margin-bottom: 4px !important;
				padding-bottom: 0 !important;
			}
			.col-right.rsidebar-collapsed .site-news-widget h3 a {
				justify-content: center;
			}
			.col-right.rsidebar-collapsed .site-news-widget h3 i {
				margin-right: 0 !important;
			}
			/* Hide all content except icons in collapsed mode */
			.col-right.rsidebar-collapsed .right-sidebar-content {
				display: none;
			}
			.col-right.rsidebar-collapsed .site-news-card {
				display: none;
			}
