/*
 * Newsdesk base styles shared by every preset.
 * Colors and fonts come from the preset variables (--ndk-*), set on .ndk--<preset>.
 */
.ndk {
	background: var(--ndk-bg);
	color: var(--ndk-text);
	font-family: var(--ndk-font-body, inherit);
	-webkit-font-smoothing: antialiased;
}
.ndk *,
.ndk *::before,
.ndk *::after { box-sizing: border-box; }
:where(.ndk) img { display: block; max-width: 100%; height: auto; }
:where(.ndk) a { color: inherit; text-decoration: none; }
.ndk :focus-visible { outline: 3px solid var(--ndk-primary); outline-offset: 2px; }
.ndk-wrap { max-width: 1200px; margin-inline: auto; padding-inline: clamp(16px, 4vw, 40px); }
.ndk-sr-only { position: absolute !important; left: 0; top: 0; width: 1px; height: 1px; padding: 0; margin: -1px; border: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ndk-views { display: inline-flex; gap: .35em; align-items: center; font-variant-numeric: tabular-nums; }
@media (prefers-reduced-motion: reduce) {
	.ndk *, .ndk *::before, .ndk *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- Shared building blocks ---------- */
.ndk { position: relative; overflow-x: clip; }
.ndk form { position: relative; }
.ndk h1, .ndk h2, .ndk h3, .ndk h4 { margin: 0; padding: 0; color: inherit; line-height: 1.15; text-wrap: balance; letter-spacing: normal; }
.ndk p { padding: 0; }
.ndk ol, .ndk ul { margin: 0; padding: 0; }
.ndk button { font: inherit; color: inherit; cursor: pointer; }
.ndk input, .ndk select { font: inherit; color: inherit; }
.ndk .ndk-ico { width: 1.1em; height: 1.1em; flex-shrink: 0; display: inline-block; vertical-align: -.18em; }
.ndk-noimg { display: flex !important; align-items: center; justify-content: center; background: var(--ndk-cat, var(--ndk-accent)); color: var(--ndk-text); font-family: var(--ndk-font-display); font-size: 3rem; font-weight: 700; opacity: .9; aspect-ratio: 4 / 3; width: 100%; }
.ndk-empty { padding: 48px 0; text-align: center; font-size: 1.1rem; grid-column: 1 / -1; }
.ndk-more { display: flex; justify-content: center; padding-block: 40px 16px; }
.ndk-more [aria-busy="true"] { opacity: .6; pointer-events: none; }
.ndk-progress { position: sticky; top: 0; z-index: 30; height: 4px; background: color-mix(in srgb, var(--ndk-line) 70%, transparent); }
.admin-bar .ndk-progress { top: 32px; }
.ndk-progress i { display: block; height: 100%; width: 0; background: var(--ndk-primary); }
.ndk-pages { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; padding-block: 48px 16px; }
.ndk-pages .page-numbers { min-width: 44px; height: 44px; padding: 0 14px; display: inline-flex; gap: 6px; align-items: center; justify-content: center; border: 1px solid var(--ndk-line); border-radius: 8px; }
.ndk-pages .current { background: var(--ndk-text); color: var(--ndk-bg); border-color: var(--ndk-text); }
.ndk-pages .dots { border: 0; }

/* Post content (non-builder posts) */
.ndk-content { font-size: 1.125rem; line-height: 1.75; min-width: 0; }
.ndk-content > * { margin-block: 0 1.2em; }
.ndk-content p { padding-bottom: 0; }
.ndk-content ul, .ndk-content ol { padding-left: 1.4em; }
.ndk-content li { margin-bottom: .4em; }
:where(.ndk-content) a { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.ndk-content img { border-radius: var(--ndk-radius, 12px); }
.ndk-content figure { margin-inline: 0; }
.ndk-content figcaption { font-size: .85rem; opacity: .8; margin-top: 8px; }
.ndk-content .wp-block-gallery, .ndk-content .gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.ndk-content .wp-block-gallery figure, .ndk-content .gallery-item { margin: 0; width: auto !important; }
.ndk-content .wp-block-gallery img, .ndk-content .gallery img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4 / 3; }
.ndk-content blockquote { margin-inline: 0; }
.ndk-content iframe, .ndk-content video { max-width: 100%; }

/* Posts built with the Divi builder: content uses the full width under the header */
.ndk-single--builder .ndk-article { flex: 1 1 100% !important; max-width: none !important; width: 100%; font-size: inherit; line-height: inherit; }
.ndk-single--builder .ndk-aside { display: none; }

/* ---------- Divi modules ---------- */
.ndk-module { padding-block: 8px; }
.ndk-module--transparent { background: transparent !important; background-image: none !important; padding-bottom: 8px !important; }
.ndk-module .ndk-wrap { max-width: none; padding-inline: 0; }
.ndk-module-title { margin-bottom: 20px !important; font-family: var(--ndk-font-display); font-weight: 700; font-size: clamp(26px, 3vw, 38px); }
.ndk-module-empty { margin: 0; padding: 28px; border: 2px dashed color-mix(in srgb, var(--ndk-text) 30%, transparent); border-radius: 12px; text-align: center; font-size: 15px; }
.ndk-module-loading { min-height: 120px; }
.ndk-module-filter { margin-bottom: 28px; }
.ndk-module .ndk-progress { display: none; }

/* Carousels: elements cycle through data-pos (0 = current) */
.ndk-car button { -webkit-tap-highlight-color: transparent; }

/* Gallery */
.ndk-gal { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.ndk-gal-item { position: relative; display: block; overflow: hidden; height: 190px; border-radius: var(--ndk-radius, 12px); background: var(--ndk-surface); }
.ndk-gal-item[hidden] { display: none !important; }
.ndk-gal-item:first-child { grid-column: span 2; height: 240px; }
.ndk-gal-item:nth-child(2) { height: 240px; }
.ndk-gal--1 .ndk-gal-item:first-child { grid-column: 1 / -1; height: clamp(240px, 40vw, 460px); }
.ndk-gal--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ndk-gal--2 .ndk-gal-item:first-child { grid-column: auto; }
.ndk-gal-img { width: 100%; height: 100% !important; object-fit: cover; transition: transform .35s; }
.ndk-gal-item:hover .ndk-gal-img { transform: scale(1.04); }
.ndk-gal-more { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; background: color-mix(in srgb, var(--ndk-text) 62%, transparent); color: var(--ndk-bg); font-weight: 600; }
.ndk-gal-more b { font-size: 34px; line-height: 1; }
@media (max-width: 600px) {
	.ndk-gal { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
	.ndk-gal-item, .ndk-gal-item:nth-child(2) { height: 130px; }
	.ndk-gal-item:first-child { grid-column: span 2; height: 200px; }
}

/* Lightbox */
.ndk-lb { position: fixed; inset: 0; z-index: 100000; display: flex; align-items: center; justify-content: center; padding: 56px 16px; background: rgba(10, 12, 16, .92); }
.ndk-lb[hidden] { display: none; }
.ndk-lb-fig { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 10px; max-width: min(1100px, 100%); max-height: 100%; }
.ndk-lb-fig img { max-width: 100%; max-height: calc(100vh - 160px); border-radius: 10px; object-fit: contain; }
.ndk-lb-fig figcaption { color: #fff; font-size: 14px; text-align: center; }
.ndk-lb-btn { position: absolute; width: 52px; height: 52px; display: flex; align-items: center; justify-content: center; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .16); color: #fff; font-size: 30px; line-height: 1; cursor: pointer; }
.ndk-lb-btn:hover, .ndk-lb-btn:focus-visible { background: rgba(255, 255, 255, .3); outline: 2px solid #fff; outline-offset: 2px; }
.ndk-lb-close { top: 16px; right: 16px; }
.ndk-lb-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.ndk-lb-next { right: 16px; top: 50%; transform: translateY(-50%); }
.ndk-lb--single .ndk-lb-prev, .ndk-lb--single .ndk-lb-next { display: none; }
.ndk-lb-count { position: absolute; bottom: 14px; left: 0; right: 0; margin: 0; text-align: center; color: #fff; font-size: 14px; }
.ndk-lb-open, .ndk-lb-open body { overflow: hidden; }
