/*
Theme Name: Daily Lens
Theme URI: https://dailylens.co.uk/
Author: Muse
Author URI: https://dailylens.co.uk/
Description: A clean, fast magazine theme built for Daily Lens — dark navy header with a red accent, strong sans headlines, featured stories and a responsive post grid. No plugin dependencies.
Version: 1.0.0
Requires at least: 5.8
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: daily-lens
Tags: blog, news, magazine, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready, two-columns, right-sidebar
*/

/* ============================================================
   Daily Lens 1.0.0 — base, layout, header, grid, single, footer
   Colours: navy #0F2040 (primary), red #D92323 (accent),
   ink #1A1A1A, muted #5A6472, line #E5E8EC, paper #FFFFFF
   ============================================================ */

:root {
	--dl-navy: #0F2040;
	--dl-navy-dark: #0A1730;
	--dl-navy-light: #1B3468;
	--dl-red: #D92323;
	--dl-ink: #1A1A1A;
	--dl-muted: #5A6472;
	--dl-line: #E5E8EC;
	--dl-paper: #FFFFFF;
	--dl-soft: #F5F6F8;
	--dl-heading: "Archivo", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	--dl-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
	margin: 0;
	background: var(--dl-paper);
	color: var(--dl-ink);
	font-family: var(--dl-sans);
	font-size: 17px;
	line-height: 1.7;
}

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

a { color: var(--dl-navy); text-decoration: none; }
a:hover, a:focus { color: var(--dl-red); text-decoration: underline; }

h1, h2, h3, h4, h5, h6 {
	font-family: var(--dl-heading);
	font-weight: 700;
	line-height: 1.25;
	margin: 0 0 0.6em;
	color: var(--dl-ink);
}

p { margin: 0 0 1.1em; }

ul, ol { margin: 0 0 1.1em; padding-left: 1.4em; }

blockquote {
	margin: 1.2em 0;
	padding: 0.6em 1.2em;
	border-left: 4px solid var(--dl-red);
	background: var(--dl-soft);
	font-size: 1.15em;
}

table { border-collapse: collapse; width: 100%; margin-bottom: 1.2em; }
th, td { border: 1px solid var(--dl-line); padding: 0.5em 0.7em; text-align: left; }

.screen-reader-text {
	position: absolute;
	width: 1px; height: 1px;
	padding: 0; margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap; border: 0;
}
.screen-reader-text:focus {
	position: static;
	width: auto; height: auto;
	clip: auto; white-space: normal;
	background: var(--dl-red);
	color: #fff;
	padding: 0.6em 1em;
}

.skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	background: var(--dl-red);
	color: #fff;
	padding: 0.6em 1em;
	z-index: 100;
	font-weight: 600;
}
.skip-link:focus { left: 0; }

/* ---------- Layout ---------- */
.dl-container {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 20px;
}

.dl-site { min-height: 100vh; display: flex; flex-direction: column; }
.dl-main { flex: 1; padding: 2rem 0 3rem; }

/* ---------- Top bar ---------- */
.dl-topbar {
	background: var(--dl-navy-dark);
	color: rgba(255, 255, 255, 0.85);
	font-size: 0.82rem;
}
.dl-topbar .dl-container {
	display: flex;
	justify-content: space-between;
	gap: 1em;
	padding-top: 0.4em;
	padding-bottom: 0.4em;
}
.dl-topbar .dl-tagline { color: rgba(255, 255, 255, 0.65); }

/* ---------- Header / masthead ---------- */
.dl-header {
	background: var(--dl-navy);
	color: #fff;
	border-bottom: 3px solid var(--dl-red);
}
.dl-header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1.5rem;
	padding-top: 1rem;
	padding-bottom: 1rem;
	flex-wrap: wrap;
}

.dl-brand a { display: inline-flex; align-items: center; gap: 0.7rem; color: #fff; text-decoration: none; }
.dl-brand a:hover, .dl-brand a:focus { color: #fff; text-decoration: none; }
.dl-brand .custom-logo { max-height: 64px; width: auto; display: block; }
.dl-site-title {
	font-family: var(--dl-heading);
	font-size: 2rem;
	font-weight: 700;
	line-height: 1.1;
	margin: 0;
	letter-spacing: 0.01em;
}
.dl-site-title a { color: #fff; }
.dl-site-desc {
	font-size: 0.82rem;
	color: rgba(255, 255, 255, 0.7);
	margin: 0.15em 0 0;
	letter-spacing: 0.04em;
}

.dl-header-search { display: flex; align-items: center; }
.dl-header-search .search-form { display: flex; }
.dl-header-search input[type="search"] {
	border: 1px solid rgba(255, 255, 255, 0.35);
	background: rgba(255, 255, 255, 0.1);
	color: #fff;
	padding: 0.45em 0.7em;
	border-radius: 3px 0 0 3px;
	font-size: 0.9rem;
	width: 170px;
}
.dl-header-search input[type="search"]::placeholder { color: rgba(255, 255, 255, 0.6); }
.dl-header-search button {
	border: 1px solid var(--dl-red);
	background: var(--dl-red);
	color: #fff;
	padding: 0.45em 0.8em;
	border-radius: 0 3px 3px 0;
	cursor: pointer;
	font-weight: 600;
	font-size: 0.9rem;
}
.dl-header-search button:hover { background: #B91C1C; }

/* ---------- Primary navigation ---------- */
.dl-nav {
	background: var(--dl-navy-dark);
}
.dl-nav .dl-container { display: flex; align-items: center; }
.dl-menu-toggle {
	display: none;
	background: none;
	border: 1px solid rgba(255, 255, 255, 0.4);
	color: #fff;
	padding: 0.55em 0.9em;
	margin: 0.5em 0;
	cursor: pointer;
	font-size: 0.95rem;
	border-radius: 3px;
}
.dl-menu-toggle .dl-burger { display: inline-block; margin-right: 0.4em; }

ul.dl-menu, .dl-nav ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
}
.dl-nav ul li { position: relative; }
.dl-nav ul li a {
	display: block;
	color: #fff;
	padding: 0.75em 0.95em;
	font-size: 0.92rem;
	font-weight: 600;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	text-decoration: none;
}
.dl-nav ul li a:hover,
.dl-nav ul li a:focus,
.dl-nav ul li.current-menu-item > a,
.dl-nav ul li.current_page_item > a {
	background: var(--dl-navy-light);
	color: var(--dl-red);
	text-decoration: none;
}
/* Dropdown sub-menus */
.dl-nav ul ul {
	display: none;
	position: absolute;
	left: 0;
	top: 100%;
	min-width: 200px;
	background: var(--dl-navy-dark);
	z-index: 50;
	flex-direction: column;
	box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}
.dl-nav ul li:hover > ul,
.dl-nav ul li:focus-within > ul { display: flex; }
.dl-nav ul ul li a { text-transform: none; font-weight: 500; }

/* ---------- Section headings ---------- */
.dl-section-title {
	font-size: 1.5rem;
	border-bottom: 2px solid var(--dl-navy);
	padding-bottom: 0.4em;
	margin: 0 0 1.2rem;
}
.dl-section-title::after {
	content: "";
	display: block;
	width: 64px;
	border-bottom: 3px solid var(--dl-red);
	margin-top: 0.4em;
}

.dl-archive-title {
	font-size: 2rem;
	margin: 0 0 0.3em;
}
.dl-archive-desc { color: var(--dl-muted); margin-bottom: 1.5rem; }
.dl-archive-head { margin-bottom: 1.8rem; border-bottom: 2px solid var(--dl-navy); padding-bottom: 1rem; }

/* ---------- Featured story (hero) ---------- */
.dl-hero { margin-bottom: 2.2rem; }
.dl-hero-card {
	display: grid;
	grid-template-columns: 1.15fr 1fr;
	background: var(--dl-soft);
	border: 1px solid var(--dl-line);
	overflow: hidden;
}
.dl-hero-card .dl-hero-media { min-height: 320px; }
.dl-hero-card .dl-hero-media img,
.dl-hero-card .dl-hero-media a { display: block; width: 100%; height: 100%; object-fit: cover; }
.dl-hero-card .dl-hero-body { padding: 1.8rem; display: flex; flex-direction: column; justify-content: center; }
.dl-hero-card h2 { font-size: 1.9rem; margin: 0.4em 0 0.5em; }
.dl-hero-card h2 a { color: var(--dl-ink); }
.dl-hero-card h2 a:hover { color: var(--dl-navy); }
.dl-hero-card p { color: var(--dl-muted); }

.dl-cat-label {
	display: inline-block;
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: #fff;
}
.dl-cat-label a {
	display: inline-block;
	background: var(--dl-red);
	color: #fff;
	padding: 0.28em 0.7em;
	border-radius: 2px;
	line-height: 1.4;
}
.dl-cat-label a:hover, .dl-cat-label a:focus {
	background: var(--dl-navy);
	color: #fff;
	text-decoration: none;
}

.dl-meta {
	font-size: 0.85rem;
	color: var(--dl-muted);
	margin: 0 0 0.6em;
}
.dl-meta a { color: var(--dl-muted); }

/* ---------- Post grid / cards ---------- */
.dl-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 1.6rem;
}

.dl-card {
	background: #fff;
	border: 1px solid var(--dl-line);
	border-radius: 4px;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	box-shadow: 0 1px 3px rgba(15, 32, 64, 0.06);
	transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.dl-card:hover { box-shadow: 0 6px 18px rgba(15, 32, 64, 0.14); transform: translateY(-2px); }
.dl-card-media { aspect-ratio: 16 / 9; overflow: hidden; background: var(--dl-soft); }
.dl-card-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dl-card-media a { display: block; width: 100%; height: 100%; }
.dl-card-body { padding: 1.1rem 1.2rem 1.3rem; display: flex; flex-direction: column; flex: 1; }
.dl-card-body h2, .dl-card-body h3 { font-size: 1.2rem; margin: 0.35em 0 0.45em; }
.dl-card-body h2 a, .dl-card-body h3 a { color: var(--dl-ink); }
.dl-card-body h2 a:hover, .dl-card-body h3 a:hover { color: var(--dl-navy); text-decoration: none; }
.dl-card-body p { color: var(--dl-muted); font-size: 0.95rem; margin-bottom: 0.7em; flex: 1; }
.dl-card .dl-meta { margin-bottom: 0.4em; }

.dl-read-more {
	font-size: 0.88rem;
	font-weight: 700;
	color: var(--dl-navy);
	text-transform: uppercase;
	letter-spacing: 0.05em;
}
.dl-read-more:hover { color: var(--dl-red); }

/* ---------- Pagination ---------- */
.dl-pagination { margin: 2.4rem 0 0; text-align: center; }
.dl-pagination .page-numbers {
	display: inline-block;
	padding: 0.45em 0.85em;
	margin: 0 0.15em;
	border: 1px solid var(--dl-line);
	border-radius: 3px;
	color: var(--dl-navy);
	font-weight: 600;
}
.dl-pagination .page-numbers:hover { border-color: var(--dl-navy); text-decoration: none; }
.dl-pagination .page-numbers.current { background: var(--dl-navy); border-color: var(--dl-navy); color: #fff; }

/* ---------- Single post ---------- */
.dl-single { max-width: 780px; margin: 0 auto; }
.dl-single-title { font-size: 2.4rem; margin: 0.3em 0 0.4em; }
.dl-single .dl-meta { font-size: 0.92rem; border-bottom: 1px solid var(--dl-line); padding-bottom: 1rem; margin-bottom: 1.4rem; }
.dl-featured { margin: 0 0 1.6rem; }
.dl-featured img { width: 100%; border-radius: 4px; }
.dl-featured figcaption { font-size: 0.85rem; color: var(--dl-muted); margin-top: 0.5em; }
.dl-content { font-size: 1.06rem; }
.dl-content img { border-radius: 4px; }
.dl-content a { text-decoration: underline; }
.dl-content h2 { font-size: 1.6rem; margin-top: 1.4em; }
.dl-content h3 { font-size: 1.3rem; margin-top: 1.2em; }

.dl-tags { margin: 1.8rem 0; font-size: 0.9rem; color: var(--dl-muted); }
.dl-tags a {
	display: inline-block;
	border: 1px solid var(--dl-line);
	border-radius: 20px;
	padding: 0.2em 0.8em;
	margin: 0 0.3em 0.3em 0;
	color: var(--dl-navy);
	text-decoration: none;
}
.dl-tags a:hover { border-color: var(--dl-red); color: var(--dl-red); }

.dl-post-nav {
	display: flex;
	justify-content: space-between;
	gap: 1rem;
	border-top: 1px solid var(--dl-line);
	border-bottom: 1px solid var(--dl-line);
	padding: 1rem 0;
	margin: 1.5rem 0;
}
.dl-post-nav a { font-weight: 600; }
.dl-post-nav .dl-next { text-align: right; }

/* ---------- Pages ---------- */
.dl-page { max-width: 780px; margin: 0 auto; }
.dl-page-title { font-size: 2.2rem; margin-bottom: 0.6em; }

/* ---------- Sidebar & widgets ---------- */
/* Two columns only when the sidebar widget area actually has widgets;
   otherwise the article stays centred at reading width. */
.dl-layout:has(> .dl-sidebar) {
	display: grid;
	grid-template-columns: 1fr 300px;
	gap: 2.5rem;
	align-items: start;
}
.dl-sidebar .widget {
	margin-bottom: 2rem;
	border: 1px solid var(--dl-line);
	border-radius: 4px;
	padding: 1.2rem;
	background: var(--dl-soft);
}
.dl-sidebar .widget-title {
	font-size: 1.1rem;
	border-bottom: 2px solid var(--dl-red);
	padding-bottom: 0.4em;
	margin-bottom: 0.8em;
}
.dl-sidebar ul { list-style: none; padding: 0; margin: 0; }
.dl-sidebar ul li { padding: 0.35em 0; border-bottom: 1px solid var(--dl-line); }
.dl-sidebar ul li:last-child { border-bottom: 0; }

/* ---------- Comments ---------- */
.dl-comments { margin-top: 2.5rem; border-top: 1px solid var(--dl-line); padding-top: 1.5rem; }
.dl-comments h2 { font-size: 1.4rem; }
.comment-list { list-style: none; padding: 0; margin: 0 0 1.5rem; }
.comment-list .comment { border: 1px solid var(--dl-line); border-radius: 4px; padding: 1rem; margin-bottom: 1rem; }
.comment-list .children { list-style: none; padding-left: 1.5rem; margin-top: 1rem; }
.comment-meta { font-size: 0.85rem; color: var(--dl-muted); margin-bottom: 0.5em; }
.comment-form label { display: block; font-weight: 600; margin-bottom: 0.3em; }
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea,
.search-form input[type="search"],
.dl-sidebar input[type="text"] {
	width: 100%;
	border: 1px solid var(--dl-line);
	border-radius: 3px;
	padding: 0.55em 0.7em;
	font-size: 1rem;
	font-family: var(--dl-sans);
}
.comment-form input[type="submit"],
.search-form input[type="submit"],
.search-form button[type="submit"] {
	background: var(--dl-navy);
	color: #fff;
	border: 0;
	border-radius: 3px;
	padding: 0.6em 1.2em;
	font-weight: 700;
	cursor: pointer;
}
.comment-form input[type="submit"]:hover { background: var(--dl-navy-light); }

/* ---------- Search ---------- */
.dl-search-form { display: flex; gap: 0.5em; max-width: 480px; margin: 1rem 0 2rem; }
.dl-search-form input[type="search"] { flex: 1; border: 1px solid var(--dl-line); border-radius: 3px; padding: 0.55em 0.7em; font-size: 1rem; }

/* ---------- Footer ---------- */
.dl-footer {
	background: var(--dl-navy);
	color: rgba(255, 255, 255, 0.85);
	margin-top: auto;
}
.dl-footer a { color: #fff; }
.dl-footer a:hover { color: var(--dl-red); }
.dl-footer-inner {
	display: grid;
	grid-template-columns: 1.4fr 1fr 1fr;
	gap: 2rem;
	padding-top: 2.5rem;
	padding-bottom: 2rem;
}
.dl-footer h3, .dl-footer .dl-widget-title {
	color: #fff;
	font-size: 1.05rem;
	border-bottom: 2px solid var(--dl-red);
	display: inline-block;
	padding-bottom: 0.35em;
	margin-bottom: 0.9em;
}
.dl-footer ul { list-style: none; margin: 0; padding: 0; }
.dl-footer ul li { padding: 0.25em 0; }
.dl-footer .dl-footer-brand .dl-site-title { font-size: 1.5rem; }
.dl-footer .dl-site-desc { color: rgba(255, 255, 255, 0.65); }
.dl-footer-bottom {
	border-top: 1px solid rgba(255, 255, 255, 0.15);
	padding: 1rem 0;
	font-size: 0.85rem;
	color: rgba(255, 255, 255, 0.65);
	text-align: center;
}

/* ---------- Misc / WordPress core ---------- */
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.alignleft { float: left; margin: 0 1.2em 1em 0; }
.alignright { float: right; margin: 0 0 1em 1.2em; }
.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: 0.85rem; color: var(--dl-muted); }
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.8rem; }

.dl-empty { text-align: center; padding: 3rem 1rem; color: var(--dl-muted); }
.dl-empty h2 { font-size: 1.6rem; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
	.dl-grid { grid-template-columns: repeat(2, 1fr); }
	.dl-hero-card { grid-template-columns: 1fr; }
	.dl-hero-card .dl-hero-media { min-height: 240px; }
	.dl-layout { grid-template-columns: 1fr; }
	.dl-footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
	body { font-size: 16px; }
	.dl-grid { grid-template-columns: 1fr; }
	.dl-header-inner { flex-direction: column; align-items: flex-start; gap: 0.8rem; }
	.dl-header-search { width: 100%; }
	.dl-header-search .search-form { width: 100%; }
	.dl-header-search input[type="search"] { flex: 1; width: auto; }
	.dl-site-title { font-size: 1.7rem; }
	.dl-single-title { font-size: 1.9rem; }
	.dl-hero-card h2 { font-size: 1.5rem; }
	.dl-footer-inner { grid-template-columns: 1fr; }

	/* Mobile menu: toggle shows/hides the nav list */
	.dl-menu-toggle { display: inline-block; }
	.dl-nav .dl-container { flex-direction: column; align-items: stretch; }
	.dl-nav ul.dl-menu,
	.dl-nav ul.menu {
		display: none;
		flex-direction: column;
		width: 100%;
	}
	.dl-nav.toggled ul.dl-menu,
	.dl-nav.toggled ul.menu { display: flex; }
	.dl-nav ul li a { padding: 0.7em 0.2em; border-top: 1px solid rgba(255, 255, 255, 0.08); }
	.dl-nav ul ul { position: static; display: none; box-shadow: none; }
	.dl-nav ul li:hover > ul { display: none; }
	.dl-nav ul li.menu-item-has-children > a::after { content: " +"; color: var(--dl-red); }
}

/* No-JS fallback: if JS is off, the checkbox-free toggle cannot open the menu,
   so keep the menu visible when the toggle is focused via keyboard. */
@media (max-width: 768px) {
	.dl-nav:focus-within ul.dl-menu { display: flex; }
}
