/*
Theme Name:   MSDigest (GeneratePress Child)
Theme URI:    
Description:  Child theme for GeneratePress built for MSDigest.net — navy/blue editorial layout with a category-driven hero, filterable article pills, a featured-post card and a widgetised sidebar. Requires the free GeneratePress parent theme.
Author:       
Author URI:   
Template:     generatepress
Version:      1.6.1
Text Domain:  gpmd
*/

/* ==========================================================================
   DESIGN TOKENS
   Navy + bright blue, mixing the existing MSDigest mark with a
   NeoConsulting-style corporate-security palette. One sans family
   throughout — this is a scan-and-click reference site, not long-form
   reading, so a single workhorse sans (system stack, no web-font request)
   does the job at every size.
   ========================================================================== */

:root {
	--gpmd-navy-900: #0b1b45;
	--gpmd-navy-800: #132a63;
	--gpmd-blue-600: #2f6fef;
	--gpmd-blue-700: #2456d6;

	--gpmd-bg: #eef1f7;
	--gpmd-surface: #ffffff;
	--gpmd-border: #e1e5ee;

	--gpmd-ink: #10172b;
	--gpmd-ink-soft: #5b6478;

	--gpmd-pill-bg: #e6eaf4;
	--gpmd-pill-text: #33415c;

	--gpmd-on-navy: #f2f5fc;
	--gpmd-on-navy-soft: #b7c2e6;

	--gpmd-font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

	--gpmd-radius-sm: 6px;
	--gpmd-radius-md: 10px;
	--gpmd-content-width: 1295px;
	--gpmd-speed: 150ms;
}

/* Intentionally no @media (prefers-color-scheme: dark) block: this is a
   fixed branded design matching the approved mockup (navy header, light
   page, white cards), not one that should repalette itself based on a
   visitor's OS-level dark mode setting. */

/* ==========================================================================
   BASE
   ========================================================================== */

html {
	background: var(--gpmd-bg);
}

body {
	background: var(--gpmd-bg);
	color: var(--gpmd-ink);
	font-family: var(--gpmd-font);
	font-size: 1rem;
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
}

*, *::before, *::after {
	box-sizing: border-box;
}

img, video, iframe {
	max-width: 100%;
	height: auto;
	border-radius: var(--gpmd-radius-sm);
}

h1, h2, h3, h4 {
	font-family: var(--gpmd-font);
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: -0.01em;
	color: var(--gpmd-ink);
}

a {
	color: var(--gpmd-blue-700);
	text-decoration: none;
	transition: color var(--gpmd-speed) ease;
}

a:hover, a:focus {
	color: var(--gpmd-blue-600);
}

/* Never remove focus outlines without replacing them */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
	outline: 2px solid var(--gpmd-blue-600);
	outline-offset: 2px;
}

.skip-link {
	background: var(--gpmd-navy-900);
	color: #fff;
}

/* ==========================================================================
   SITE HEADER / NAV (rendered by GeneratePress — themed here)
   ========================================================================== */

.site-header {
	background: var(--gpmd-surface);
	border-bottom: 1px solid var(--gpmd-border);
}

.site-logo img {
	border-radius: 0;
}

.site-title a {
	font-weight: 800;
	color: var(--gpmd-ink);
}

.main-navigation .main-nav ul li a {
	font-size: 0.95rem;
	font-weight: 500;
	color: var(--gpmd-ink);
	padding: 0.6em 1em;
}

.main-navigation .main-nav ul li a:hover,
.main-navigation .main-nav ul li.current-menu-item > a {
	color: var(--gpmd-blue-700);
}

/* ==========================================================================
   HERO
   Navy panel with a CSS-only dot-mesh background — no image request,
   no extra font, nothing to slow the LCP down.
   ========================================================================== */

.gpmd-hero {
	/* Break out of GeneratePress's centered .grid-container ancestor so the
	   navy panel runs full-bleed edge to edge, like the mockup — the inner
	   .gpmd-hero-inner below still centers its content at the normal width. */
	position: relative;
	left: 50%;
	right: 50%;
	width: 100vw;
	margin-left: -50vw;
	margin-right: -50vw;
	background-color: var(--gpmd-navy-900);
	background-image:
		radial-gradient(circle at 18% 25%, rgba(255,255,255,0.10) 0, transparent 45%),
		radial-gradient(circle at 85% 10%, rgba(47,111,239,0.32) 0, transparent 42%),
		url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A//www.w3.org/2000/svg%27%20width%3D%27240%27%20height%3D%27240%27%3E%3Cg%20stroke%3D%27rgba%28255%2C255%2C255%2C0.14%29%27%20stroke-width%3D%271%27%20fill%3D%27none%27%3E%3Cline%20x1%3D%2720%27%20y1%3D%2730%27%20x2%3D%2795%27%20y2%3D%2775%27/%3E%3Cline%20x1%3D%2795%27%20y1%3D%2775%27%20x2%3D%27165%27%20y2%3D%2745%27/%3E%3Cline%20x1%3D%2795%27%20y1%3D%2775%27%20x2%3D%2765%27%20y2%3D%27155%27/%3E%3Cline%20x1%3D%27165%27%20y1%3D%2745%27%20x2%3D%27215%27%20y2%3D%27115%27/%3E%3Cline%20x1%3D%2765%27%20y1%3D%27155%27%20x2%3D%27145%27%20y2%3D%27195%27/%3E%3Cline%20x1%3D%27145%27%20y1%3D%27195%27%20x2%3D%27215%27%20y2%3D%27115%27/%3E%3Cline%20x1%3D%2720%27%20y1%3D%2730%27%20x2%3D%2765%27%20y2%3D%27155%27/%3E%3Cline%20x1%3D%27165%27%20y1%3D%2745%27%20x2%3D%27230%27%20y2%3D%2715%27/%3E%3C/g%3E%3Cg%20fill%3D%27rgba%28255%2C255%2C255%2C0.4%29%27%3E%3Ccircle%20cx%3D%2720%27%20cy%3D%2730%27%20r%3D%272%27/%3E%3Ccircle%20cx%3D%2795%27%20cy%3D%2775%27%20r%3D%272%27/%3E%3Ccircle%20cx%3D%27165%27%20cy%3D%2745%27%20r%3D%272%27/%3E%3Ccircle%20cx%3D%2765%27%20cy%3D%27155%27%20r%3D%272%27/%3E%3Ccircle%20cx%3D%27215%27%20cy%3D%27115%27%20r%3D%272%27/%3E%3Ccircle%20cx%3D%27145%27%20cy%3D%27195%27%20r%3D%272%27/%3E%3Ccircle%20cx%3D%27230%27%20cy%3D%2715%27%20r%3D%271.5%27/%3E%3C/g%3E%3C/svg%3E");
	background-size: auto, auto, 240px 240px;
	background-repeat: no-repeat, no-repeat, repeat;
	color: var(--gpmd-on-navy);
	padding: 3.2em 0;
}

.gpmd-hero-inner {
	max-width: var(--gpmd-content-width);
	margin: 0 auto;
	padding: 0 1.5em;
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 3em;
}

.gpmd-hero-eyebrow {
	font-size: 0.8rem;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--gpmd-on-navy-soft);
	margin-bottom: 1em;
}

.gpmd-hero-eyebrow a {
	color: inherit;
}

.gpmd-hero-title {
	font-size: clamp(2rem, 1.5rem + 2vw, 3rem);
	color: #fff;
	margin: 0 0 0.4em;
	max-width: 16ch;
}

.gpmd-hero-subtitle {
	font-size: 1.1rem;
	color: var(--gpmd-on-navy-soft);
	max-width: 46ch;
	margin: 0;
}

.gpmd-hero-topics {
	list-style: none;
	margin: 0;
	padding: 1.2em 0 0;
	border-top: 1px solid rgba(255,255,255,0.25);
	display: flex;
	flex-direction: column;
	gap: 0.6em;
	flex-shrink: 0;
}

.gpmd-hero-topics a {
	font-size: 0.8rem;
	font-weight: 600;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: var(--gpmd-on-navy-soft);
}

.gpmd-hero-topics a:hover {
	color: #fff;
}

/* ==========================================================================
   FILTER PILLS
   Real links to category archives — crawlable, cacheable, no client JS.
   ========================================================================== */

.gpmd-pills {
	max-width: var(--gpmd-content-width);
	margin: 0 auto;
	padding: 1.8em 1.5em 0;
	display: flex;
	flex-wrap: nowrap;
	overflow-x: auto;
	gap: 0.6em;
	-ms-overflow-style: none;
	scrollbar-width: none;
}

.gpmd-pills::-webkit-scrollbar {
	display: none;
}

.gpmd-pill {
	flex: 0 0 auto;
	font-size: 0.9rem;
	font-weight: 500;
	color: var(--gpmd-pill-text);
	background: var(--gpmd-pill-bg);
	border-radius: var(--gpmd-radius-md);
	padding: 0.6em 1.1em;
	white-space: nowrap;
}

.gpmd-pill:hover {
	background: #dbe1f0;
	color: var(--gpmd-ink);
}

.gpmd-pill.is-active {
	background: var(--gpmd-navy-900);
	color: #fff;
}

/* ==========================================================================
   LAYOUT
   ========================================================================== */

/* GeneratePress sets #content.site-content { display: flex } for its own
   content+sidebar pairing — needed as-is on single posts/pages/archives.
   Our front-page.php puts three stacked sections (hero, pills, wrap)
   directly inside that same container, so on the front page only, this
   override restores normal top-to-bottom flow instead of squeezing them
   into side-by-side flex columns. */
.gpmd-front-page #content.site-content {
	display: block;
}

.gpmd-wrap {
	max-width: var(--gpmd-content-width);
	margin: 0 auto;
	padding: 2.2em 1.5em 4em;
}

.gpmd-columns {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 320px;
	gap: 2.5em;
	align-items: start;
}

/* ==========================================================================
   FEATURED CARD
   ========================================================================== */

.gpmd-featured {
	background: var(--gpmd-surface);
	border: 1px solid var(--gpmd-border);
	border-radius: var(--gpmd-radius-md);
	overflow: hidden;
	display: grid;
	grid-template-columns: 1.1fr 1fr;
	margin-bottom: 2.5em;
}

.gpmd-featured-media {
	background: linear-gradient(135deg, #0b1b45 0%, #142a63 60%, #1c3a8a 100%);
	min-height: 340px;
	display: block;
}

.gpmd-featured-media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 0;
	display: block;
}

.gpmd-featured-body {
	padding: 2.4em 2.6em;
	display: flex;
	flex-direction: column;
	justify-content: center;
}

.gpmd-eyebrow {
	display: inline-block;
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: var(--gpmd-blue-700);
	margin-bottom: 0.6em;
}

.gpmd-featured-body h2 {
	font-size: 1.65rem;
	margin: 0 0 0.5em;
}

.gpmd-featured-body h2 a {
	color: var(--gpmd-ink);
}

.gpmd-featured-body p {
	color: var(--gpmd-ink-soft);
	margin: 0 0 1.2em;
}

.gpmd-readmore {
	font-weight: 600;
	font-size: 0.95rem;
	display: inline-flex;
	align-items: center;
	gap: 0.35em;
}

.gpmd-readmore .arrow {
	transition: transform var(--gpmd-speed) ease;
}

.gpmd-readmore:hover .arrow {
	transform: translateX(3px);
}

/* ==========================================================================
   ARTICLE GRID
   ========================================================================== */

.gpmd-section-title {
	font-size: 1.4rem;
	margin: 0 0 1em;
}

.gpmd-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 1.6em;
	margin-bottom: 2em;
}

.gpmd-card {
	background: var(--gpmd-surface);
	border: 1px solid var(--gpmd-border);
	border-radius: var(--gpmd-radius-md);
	overflow: hidden;
	display: flex;
	flex-direction: column;
}

.gpmd-card-media {
	background: linear-gradient(135deg, #0b1b45 0%, #1c3a8a 100%);
	aspect-ratio: 16 / 9;
	display: block;
}

.gpmd-card-media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 0;
	display: block;
}

.gpmd-card-body {
	padding: 1.6em 1.8em 1.8em;
}

.gpmd-card-body h3 {
	font-size: 1.25rem;
	margin: 0.4em 0 0.5em;
}

.gpmd-card-body h3 a {
	color: var(--gpmd-ink);
}

.gpmd-card-body p {
	color: var(--gpmd-ink-soft);
	font-size: 0.95rem;
	margin: 0 0 1em;
}

/* Pagination */
.gpmd-pagination {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5em;
	margin-top: 1em;
}

.gpmd-pagination .page-numbers {
	font-size: 0.9rem;
	color: var(--gpmd-ink);
	border: 1px solid var(--gpmd-border);
	border-radius: var(--gpmd-radius-sm);
	padding: 0.5em 0.9em;
	background: var(--gpmd-surface);
}

.gpmd-pagination .page-numbers.current {
	background: var(--gpmd-navy-900);
	border-color: var(--gpmd-navy-900);
	color: #fff;
}

.gpmd-pagination .page-numbers:hover:not(.current) {
	border-color: var(--gpmd-blue-600);
	color: var(--gpmd-blue-700);
}

/* ==========================================================================
   SIDEBAR / WIDGETS
   ========================================================================== */

.gpmd-sidebar .widget {
	background: var(--gpmd-surface);
	border: 1px solid var(--gpmd-border);
	border-radius: var(--gpmd-radius-md);
	padding: 1.8em;
	margin-bottom: 1.8em;
}

.gpmd-sidebar .widget-title {
	font-size: 1.05rem;
	margin: 0 0 1em;
}

/* About-author widget */
.gpmd-about-photo {
	width: 84px;
	height: 84px;
	border-radius: 50%;
	object-fit: cover;
	margin-bottom: 1em;
}

.gpmd-about-name {
	font-weight: 700;
	font-size: 1.05rem;
	margin: 0 0 0.15em;
}

.gpmd-about-role {
	font-size: 0.85rem;
	color: var(--gpmd-ink-soft);
	margin: 0 0 1em;
}

.gpmd-about-bio {
	font-size: 0.92rem;
	color: var(--gpmd-ink-soft);
	margin: 0 0 1.2em;
}

/* CTA / link-card widget */
.gpmd-cta-icon {
	width: 40px;
	height: 40px;
	border-radius: var(--gpmd-radius-sm);
	background: var(--gpmd-navy-900);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	margin-bottom: 1em;
}

.gpmd-cta-icon svg {
	width: 20px;
	height: 20px;
}

.gpmd-cta-desc {
	font-size: 0.92rem;
	color: var(--gpmd-ink-soft);
	margin: 0 0 1.1em;
}

/* Generic default widgets (search, categories, RSS, etc. from core/plugins) */
.gpmd-sidebar ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.gpmd-sidebar ul li {
	padding: 0.45em 0;
	border-bottom: 1px solid var(--gpmd-border);
	font-size: 0.92rem;
}

.gpmd-sidebar ul li:last-child {
	border-bottom: none;
}

.gpmd-sidebar input[type="search"],
.gpmd-sidebar input[type="text"] {
	width: 100%;
	border: 1px solid var(--gpmd-border);
	border-radius: var(--gpmd-radius-sm);
	padding: 0.6em 0.8em;
	font-family: var(--gpmd-font);
}

/* ==========================================================================
   FOOTER
   Custom footer injected via the generate_before_footer hook (see
   inc/footer.php) — GeneratePress's own default footer is hidden below
   rather than restyled, since we're replacing it, not theming it.
   ========================================================================== */

.site-footer {
	display: none;
}

.gpmd-footer {
	position: relative;
	left: 50%;
	right: 50%;
	width: 100vw;
	margin-left: -50vw;
	margin-right: -50vw;
	background: var(--gpmd-navy-900);
	color: var(--gpmd-on-navy-soft);
}

.gpmd-footer-inner {
	max-width: var(--gpmd-content-width);
	margin: 0 auto;
	padding: 2.4em 1.5em;
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 1.5em 2em;
}

.gpmd-footer-brand {
	display: flex;
	align-items: center;
	gap: 0.8em;
	margin-right: auto;
}

.gpmd-footer-logo {
	height: 32px;
	width: auto;
	border-radius: 0;
}

.gpmd-footer-name {
	display: block;
	font-weight: 800;
	font-size: 1.1rem;
	color: #fff;
}

.gpmd-footer-tagline {
	margin: 0.15em 0 0;
	font-size: 0.85rem;
	color: var(--gpmd-on-navy-soft);
}

.gpmd-footer-nav-list {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	gap: 0.4em 1.6em;
	margin: 0;
	padding: 0;
}

.gpmd-footer-nav-list a {
	font-size: 0.9rem;
	color: var(--gpmd-on-navy-soft);
}

.gpmd-footer-nav-list a:hover {
	color: #fff;
}

.gpmd-footer-social {
	display: flex;
	align-items: center;
	gap: 1em;
	padding-left: 1.6em;
	border-left: 1px solid rgba(255,255,255,0.2);
}

.gpmd-footer-social a {
	color: var(--gpmd-on-navy-soft);
	display: inline-flex;
}

.gpmd-footer-social a:hover {
	color: #fff;
}

.gpmd-footer-disclaimer {
	border-top: 1px solid rgba(255,255,255,0.12);
}

.gpmd-footer-disclaimer p {
	max-width: var(--gpmd-content-width);
	margin: 0 auto;
	padding: 1.2em 1.5em;
	font-size: 0.78rem;
	line-height: 1.6;
	color: rgba(242,245,252,0.55);
}

@media (max-width: 640px) {
	.gpmd-footer-social {
		border-left: none;
		padding-left: 0;
	}
}

/* ==========================================================================
   BUTTONS / FORMS (comments, search, widgets)
   ========================================================================== */

button,
input[type="submit"],
.button {
	font-family: var(--gpmd-font);
	font-weight: 600;
	background: var(--gpmd-blue-700);
	color: #fff;
	border: none;
	border-radius: var(--gpmd-radius-sm);
	padding: 0.7em 1.4em;
	cursor: pointer;
	transition: background var(--gpmd-speed) ease;
}

button:hover,
input[type="submit"]:hover,
.button:hover {
	background: var(--gpmd-navy-900);
	color: #fff;
}

/* ==========================================================================
   SINGLE POST / PAGE
   Wider content column than GP's default, rounded "separate containers"
   boxes to match the homepage cards.
   ========================================================================== */

/* GeneratePress's default 70/30 content/sidebar split, widened in the
   content's favor and rounded corners added to match the homepage cards. */
/* Only rebalance the split when a sidebar is actually present — GeneratePress
   already gives .content-area 100% width on no-sidebar pages via its own
   `.no-sidebar .content-area` rule, and this needs to not fight that. */
body.right-sidebar .site-content .content-area,
body.left-sidebar .site-content .content-area,
body.both-sidebars .site-content .content-area {
	width: 78%;
}

body.right-sidebar .is-right-sidebar,
body.left-sidebar .is-left-sidebar,
body.both-sidebars .is-right-sidebar,
body.both-sidebars .is-left-sidebar {
	width: 22%;
}

.separate-containers .inside-article,
.separate-containers .comments-area,
.separate-containers .page-header,
.separate-containers .paging-navigation,
.sidebar .widget {
	border-radius: var(--gpmd-radius-md);
	border: 1px solid var(--gpmd-border);
}

.single .inside-article,
.page .inside-article {
	max-width: 100%;
	padding: 3em 2.5em;
}

.single .entry-title,
.page .entry-title {
	font-size: clamp(1.7rem, 1.4rem + 1.5vw, 2.4rem);
	margin-bottom: 0.4em;
}

.single .entry-content,
.page .entry-content {
	font-size: 1.08rem;
	line-height: 1.75;
}

.single .entry-content p:first-of-type {
	margin-top: 0;
}

.entry-meta {
	font-size: 0.85rem;
	color: var(--gpmd-ink-soft);
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 960px) {
	.gpmd-columns {
		grid-template-columns: 1fr;
	}

	.gpmd-featured {
		grid-template-columns: 1fr;
	}

	.gpmd-featured-media {
		min-height: 200px;
	}
}

@media (max-width: 640px) {
	.gpmd-hero {
		padding: 2.2em 0;
	}

	.gpmd-hero-inner {
		flex-direction: column;
		gap: 1.6em;
	}

	.gpmd-hero-topics {
		flex-direction: row;
		flex-wrap: wrap;
		border-top: none;
		padding-top: 0;
	}

	.gpmd-grid {
		grid-template-columns: 1fr;
	}
}

/* ==========================================================================
   ACCESSIBILITY / MOTION
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after {
		animation-duration: 0.001ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.001ms !important;
		scroll-behavior: auto !important;
	}
}
