/*
Theme Name: DLC – Digital Literacy Coalition
Theme URI: https://digital-literacy.nl/
Author: Digital Literacy Coalition
Description: Functioneel, toegankelijk en formeel thema voor de Digital Literacy Coalition. Gebruikt de bestaande DLC-huisstijl (geel #FFBC00, Source Sans) en bevat een inrichtingsroutine (Weergave › DLC-inrichting) die alle pagina's, menu's en de voorpagina klaarzet.
Version: 1.0.0
Requires at least: 6.4
Tested up to: 7.1
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: dlc
*/

/* ==========================================================================
   Huisstijl-tokens
   ========================================================================== */
:root {
	--dlc-yellow: #ffbc00;
	--dlc-yellow-soft: #fff5d6;
	--dlc-ink: #1c1c1c;
	--dlc-text: #2f2f2f;
	--dlc-muted: #5b5d55;
	--dlc-sage: #b1b4a0;
	--dlc-line: #e2e2da;
	--dlc-bg-alt: #f5f5f1;
	--dlc-dark: #1e1e1c;
	--dlc-content: 760px;
	--dlc-wide: 1200px;
	--dlc-gutter: clamp(1.25rem, 4vw, 2.5rem);
	--dlc-radius: 4px;
	--dlc-font: "Source Sans 3", "Source Sans Pro", Arial, Helvetica, sans-serif;
}

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

html { -webkit-text-size-adjust: 100%; scroll-padding-top: 1rem; }

body {
	margin: 0;
	font-family: var(--dlc-font);
	font-size: 1.125rem;
	line-height: 1.65;
	color: var(--dlc-text);
	background: #fff;
	-webkit-font-smoothing: antialiased;
}

img, svg, video { max-width: 100%; height: auto; }

a { color: var(--dlc-ink); text-decoration: underline; text-decoration-color: var(--dlc-yellow); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--dlc-ink); }

:focus-visible { outline: 3px solid var(--dlc-ink); outline-offset: 2px; box-shadow: 0 0 0 6px var(--dlc-yellow); }

.screen-reader-text {
	position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.skip-link {
	position: absolute; left: 1rem; top: -100px; z-index: 1000;
	background: var(--dlc-ink); color: #fff; padding: .75rem 1.25rem; font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 1rem; }

.dlc-container { width: 100%; max-width: calc(var(--dlc-wide) + 2 * var(--dlc-gutter)); margin-inline: auto; padding-inline: var(--dlc-gutter); }

/* ==========================================================================
   Header
   ========================================================================== */
.site-header { border-top: 5px solid var(--dlc-yellow); border-bottom: 1px solid var(--dlc-line); background: #fff; position: relative; z-index: 50; }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: 96px; }

.site-branding { display: flex; align-items: center; flex-shrink: 0; }
.site-branding a { display: inline-flex; text-decoration: none; }
.site-branding img, .site-branding .custom-logo { display: block; width: auto; height: 64px; max-height: 64px; }
.dlc-wordmark { display: inline-block; background: var(--dlc-yellow); color: #fff; font-weight: 700; text-transform: uppercase; line-height: 1.05; letter-spacing: .02em; padding: .45rem .7rem; font-size: 1.05rem; text-shadow: 0 0 1px rgba(0,0,0,.25); }

.site-nav { display: flex; align-items: center; gap: .5rem; }

.primary-menu, .primary-menu ul { list-style: none; margin: 0; padding: 0; }
.primary-menu { display: flex; align-items: center; gap: .25rem; }
.primary-menu > li { position: relative; }
.primary-menu a {
	display: block; padding: .6rem .8rem; font-size: .95rem; font-weight: 600; color: var(--dlc-ink);
	text-decoration: none; letter-spacing: .01em; border-bottom: 3px solid transparent;
}
.primary-menu > li > a:hover,
.primary-menu > li.current-menu-item > a,
.primary-menu > li.current-menu-ancestor > a,
.primary-menu > li.current_page_item > a,
.primary-menu > li.current_page_ancestor > a,
.primary-menu > li.current-page-ancestor > a { border-bottom-color: var(--dlc-yellow); }

.primary-menu .sub-menu, .primary-menu .children {
	position: absolute; top: 100%; left: 0; min-width: 280px; background: #fff;
	border: 1px solid var(--dlc-line); border-top: 3px solid var(--dlc-yellow);
	box-shadow: 0 12px 24px rgba(0,0,0,.08); padding: .4rem 0;
	opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity .15s, transform .15s, visibility .15s;
}
.primary-menu li:hover > .sub-menu,
.primary-menu li:focus-within > .sub-menu,
.primary-menu li.is-open > .sub-menu { opacity: 1; visibility: visible; transform: none; }
.primary-menu .sub-menu a { font-weight: 400; padding: .55rem 1.1rem; border: 0; }
.primary-menu .sub-menu a:hover, .primary-menu .sub-menu .current-menu-item > a { background: var(--dlc-yellow-soft); }

.submenu-toggle {
	display: none; background: none; border: 0; padding: .5rem; cursor: pointer; color: var(--dlc-ink);
}
.menu-item-has-children > a::after { content: ""; display: inline-block; width: .45em; height: .45em; margin-left: .45em; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-.2em) rotate(45deg); }

.icon-button {
	display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
	min-width: 44px; min-height: 44px; padding: .4rem .6rem; background: none; border: 1px solid transparent;
	border-radius: var(--dlc-radius); color: var(--dlc-ink); font: inherit; font-weight: 600; font-size: .95rem; cursor: pointer;
}
.icon-button:hover { border-color: var(--dlc-line); }
.icon-button svg { width: 20px; height: 20px; }
.menu-toggle { display: none; }

.search-panel { border-top: 1px solid var(--dlc-line); background: var(--dlc-bg-alt); padding: 1.25rem 0; }
.search-panel[hidden] { display: none; }

.search-form { display: flex; gap: .5rem; max-width: 640px; }
.search-form label { flex: 1; }
.search-form .search-field {
	width: 100%; font: inherit; padding: .7rem .9rem; border: 1px solid #8a8c83; border-radius: var(--dlc-radius); background: #fff;
}
.search-form .search-submit, .dlc-button, .wp-block-button__link, input[type="submit"], button[type="submit"] {
	display: inline-block; font: inherit; font-weight: 700; font-size: 1rem; line-height: 1.2;
	padding: .8rem 1.4rem; border: 2px solid var(--dlc-ink); border-radius: var(--dlc-radius);
	background: var(--dlc-ink); color: #fff; text-decoration: none; cursor: pointer;
}
.search-form .search-submit:hover, .dlc-button:hover, input[type="submit"]:hover, button[type="submit"]:hover { background: #000; }

@media (max-width: 1080px) {
	.menu-toggle { display: inline-flex; }
	.site-nav { position: static; }
	.primary-nav-wrap { display: none; position: absolute; left: 0; right: 0; top: 100%; background: #fff; border-bottom: 3px solid var(--dlc-yellow); box-shadow: 0 16px 24px rgba(0,0,0,.08); }
	.primary-nav-wrap.is-open { display: block; }
	.primary-menu { flex-direction: column; align-items: stretch; padding: .5rem var(--dlc-gutter) 1rem; gap: 0; }
	.primary-menu > li { border-bottom: 1px solid var(--dlc-line); display: flex; flex-wrap: wrap; align-items: center; }
	.primary-menu > li > a { flex: 1; border-bottom: 0; padding: .85rem 0; font-size: 1.05rem; }
	.primary-menu .sub-menu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; border-left: 3px solid var(--dlc-yellow); min-width: 0; width: 100%; display: none; margin: 0 0 .75rem; padding: 0; }
	.primary-menu li.is-open > .sub-menu { display: block; }
	.primary-menu li:hover > .sub-menu, .primary-menu li:focus-within > .sub-menu { opacity: 1; }
	.menu-item-has-children > a::after { display: none; }
	.submenu-toggle { display: inline-flex; min-width: 44px; min-height: 44px; align-items: center; justify-content: center; }
	.submenu-toggle svg { width: 18px; height: 18px; transition: transform .15s; }
	.is-open > .submenu-toggle svg { transform: rotate(180deg); }
	.site-branding img, .site-branding .custom-logo { height: 52px; }
	.site-header__inner { min-height: 80px; }
}

/* ==========================================================================
   Paginakop
   ========================================================================== */
.page-hero { background: var(--dlc-bg-alt); border-bottom: 1px solid var(--dlc-line); padding: clamp(2rem, 5vw, 3.5rem) 0 clamp(2rem, 4vw, 3rem); }
.page-hero__title { margin: 0; font-size: clamp(2rem, 4.2vw, 2.9rem); line-height: 1.12; color: var(--dlc-ink); font-weight: 700; max-width: 900px; }
.page-hero__title::before { content: ""; display: block; width: 56px; height: 6px; background: var(--dlc-yellow); margin-bottom: 1rem; }
.page-hero__lead { margin: 1rem 0 0; font-size: 1.3rem; line-height: 1.5; color: var(--dlc-text); max-width: 820px; }
.page-hero__meta { margin-top: .75rem; color: var(--dlc-muted); font-size: 1rem; }

.breadcrumbs { font-size: .9rem; color: var(--dlc-muted); margin-bottom: 1.75rem; }
.breadcrumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .25rem; }
.breadcrumbs li + li::before { content: "›"; margin: 0 .4rem 0 .15rem; color: var(--dlc-muted); }
.breadcrumbs a { color: var(--dlc-muted); text-decoration-color: var(--dlc-sage); }

/* ==========================================================================
   Paginalayout
   ========================================================================== */
.site-main { display: block; }
.page-body { padding: clamp(2.25rem, 5vw, 3.75rem) 0 clamp(3rem, 6vw, 5rem); }
.page-body--with-nav .dlc-container { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
.page-body--with-nav .entry-content > * { margin-left: 0; }

.section-nav { position: sticky; top: 1.5rem; border-top: 3px solid var(--dlc-yellow); padding-top: 1rem; font-size: 1rem; }
.section-nav__title { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--dlc-muted); margin: 0 0 .5rem; font-weight: 700; }
.section-nav ul { list-style: none; margin: 0; padding: 0; }
.section-nav li { border-bottom: 1px solid var(--dlc-line); }
.section-nav a { display: block; padding: .6rem 0 .6rem .75rem; text-decoration: none; border-left: 3px solid transparent; color: var(--dlc-text); }
.section-nav a:hover { color: var(--dlc-ink); border-left-color: var(--dlc-sage); }
.section-nav a[aria-current="page"] { border-left-color: var(--dlc-yellow); font-weight: 700; color: var(--dlc-ink); }
.section-nav .section-nav__parent a { font-weight: 600; }

@media (max-width: 900px) {
	.page-body--with-nav .dlc-container { grid-template-columns: 1fr; }
	.section-nav { position: static; order: 2; }
}

/* ==========================================================================
   Nieuwsoverzicht
   ========================================================================== */
.post-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.5rem; margin: 0; padding: 0; list-style: none; }
.post-card { position: relative; display: flex; flex-direction: column; border: 1px solid var(--dlc-line); border-top: 4px solid var(--dlc-yellow); background: #fff; padding: 1.5rem; transition: box-shadow .15s, transform .15s; }
.post-card:hover { box-shadow: 0 10px 24px rgba(0,0,0,.08); transform: translateY(-2px); }
.post-card__date { font-size: .9rem; color: var(--dlc-muted); }
.post-card__title { font-size: 1.3rem; line-height: 1.3; margin: .35rem 0 .6rem; }
.post-card__title a { text-decoration: none; }
.post-card__title a::after { content: ""; position: absolute; inset: 0; }
.post-card__excerpt { margin: 0 0 1rem; color: var(--dlc-text); font-size: 1.02rem; }
.post-card__more { margin-top: auto; font-weight: 700; font-size: .95rem; }
.post-card__more::after { content: " →"; }
.post-card__thumb { margin: -1.5rem -1.5rem 1.25rem; aspect-ratio: 16 / 9; overflow: hidden; background: var(--dlc-bg-alt); }
.post-card__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

.page-intro { max-width: var(--dlc-content); margin-bottom: 2.5rem; }

.pagination, .nav-links { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 2.5rem; }
.page-numbers { display: inline-flex; min-width: 44px; min-height: 44px; align-items: center; justify-content: center; padding: 0 .8rem; border: 1px solid var(--dlc-line); text-decoration: none; font-weight: 600; }
.page-numbers.current { background: var(--dlc-yellow); border-color: var(--dlc-yellow); color: var(--dlc-ink); }

.post-navigation { border-top: 1px solid var(--dlc-line); margin-top: 3rem; padding-top: 1.5rem; }
.post-navigation .nav-links { justify-content: space-between; margin-top: 0; }
.post-navigation a { text-decoration: none; display: block; max-width: 360px; }
.post-navigation .meta-nav { display: block; font-size: .85rem; color: var(--dlc-muted); text-transform: uppercase; letter-spacing: .06em; }
.back-link { display: inline-block; margin-top: 2rem; font-weight: 700; }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer { background: var(--dlc-dark); color: #e9e9e4; border-top: 5px solid var(--dlc-yellow); font-size: 1rem; }
.site-footer a { color: #fff; text-decoration-color: var(--dlc-yellow); }
.site-footer__main { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); padding: clamp(2.5rem, 6vw, 4rem) 0; }
.site-footer__brand img { height: 56px; width: auto; display: block; margin-bottom: 1.25rem; }
.site-footer__mission { font-size: 1.1rem; line-height: 1.55; color: #fff; margin: 0; max-width: 460px; }
.site-footer h2 { font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; color: var(--dlc-yellow); margin: 0 0 1rem; font-weight: 700; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: 0 0 .5rem; }
.footer-menu a { text-decoration: none; }
.footer-menu a:hover { text-decoration: underline; text-decoration-color: var(--dlc-yellow); }
.site-footer__bottom { border-top: 1px solid rgba(255,255,255,.15); padding: 1.25rem 0; font-size: .9rem; color: #c9c9c2; display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; justify-content: space-between; }
.site-footer__bottom ul { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.site-footer__bottom li { margin: 0; }
.social-link { display: inline-flex; align-items: center; gap: .5rem; }
.social-link svg { width: 18px; height: 18px; fill: currentColor; }

@media (max-width: 860px) {
	.site-footer__main { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Print
   ========================================================================== */
@media print {
	.site-header nav, .search-panel, .site-footer, .section-nav, .skip-link { display: none !important; }
	.page-hero { background: none; border: 0; }
	a { text-decoration: none; }
}
