/*
Theme Name: YouDailyNews
Template: blocksy
Description: YouDailyNews child theme for Blocksy. News homepage, footer and schema.
Version: 1.0.0
Text Domain: ydn
*/

/* ---------- Tokens ---------- */
:root {
	--ydn-ink: #0e1116;
	--ydn-text: #262b33;
	--ydn-muted: #5b6370;
	--ydn-line: #e3e5e9;
	--ydn-soft: #f5f5f2;
	--ydn-paper: #ffffff;
	--ydn-red: #c8102e;
	--ydn-red-dark: #a00d25;
	--ydn-tech: #1d4ed8;
	--ydn-ai: #6d28d9;
	--ydn-gaming: #047857;
	--ydn-world: #b45309;
	--ydn-serif: "Source Serif 4", Georgia, "Times New Roman", serif;
	--ydn-sans: "Public Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
	--ydn-max: 1240px;

	/* Blocksy palette and fonts */
	--theme-palette-color-1: var(--ydn-red);
	--theme-palette-color-2: var(--ydn-red-dark);
	--theme-palette-color-3: var(--ydn-text);
	--theme-palette-color-4: var(--ydn-ink);
	--theme-palette-color-5: var(--ydn-line);
	--theme-palette-color-6: var(--ydn-soft);
	--theme-palette-color-7: #fafaf8;
	--theme-palette-color-8: #ffffff;
	--theme-font-family: var(--ydn-sans);
	--theme-text-color: var(--ydn-text);
	--theme-link-initial-color: var(--ydn-red);
	--theme-link-hover-color: var(--ydn-red-dark);
	--theme-headings-color: var(--ydn-ink);
	--theme-normal-container-max-width: var(--ydn-max);
}

body {
	background: var(--ydn-paper);
	color: var(--ydn-text);
	font-family: var(--ydn-sans);
	-webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4,
.entry-title, .page-title {
	font-family: var(--ydn-serif);
	color: var(--ydn-ink);
	letter-spacing: -0.01em;
}

.ydn-wrap {
	max-width: var(--ydn-max);
	margin: 0 auto;
	padding: 0 16px;
}
@media (min-width: 768px) {
	/* Content edge lines up with the Blocksy header container (max 1240px). */
	.ydn-wrap { padding: 0 28px; max-width: calc(var(--ydn-max) + 56px); }
}

.ydn-visually-hidden {
	position: absolute !important;
	width: 1px; height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

/* ---------- Top bar + header ---------- */
.ydn-topbar {
	background: var(--ydn-ink);
	color: #d5d8de;
	font-size: 13px;
	line-height: 1;
}
.ydn-topbar__inner {
	display: flex;
	justify-content: space-between;
	gap: 16px;
	padding-top: 9px;
	padding-bottom: 9px;
}
.ydn-topbar__date { font-weight: 600; color: #fff; }
@media (max-width: 640px) {
	.ydn-topbar__tag { display: none; }
}

.ct-header [data-row="middle"] {
	border-bottom: 3px solid var(--ydn-ink);
}
.ct-header .site-title,
.ct-header .site-title a {
	font-family: var(--ydn-serif) !important;
	font-weight: 800 !important;
	font-size: 30px !important;
	letter-spacing: -0.02em;
	color: var(--ydn-ink) !important;
}
.ct-header .site-description { display: none; }
.ct-header .menu > li > a {
	font-family: var(--ydn-sans);
	font-weight: 700;
	font-size: 14px;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--ydn-ink);
}
.ct-header .menu > li > a:hover,
.ct-header .menu > .current-menu-item > a {
	color: var(--ydn-red);
}

/* ---------- Breadcrumbs ---------- */
.ydn-crumbs {
	font-size: 13px;
	color: var(--ydn-muted);
	padding-top: 18px;
}
.ydn-crumbs a { color: var(--ydn-muted); text-decoration: none; }
.ydn-crumbs a:hover { color: var(--ydn-red); }
.ydn-crumbs .separator { margin: 0 6px; }

/* ---------- Homepage ---------- */
.ydn-home { padding-bottom: 56px; }

.ydn-masthead {
	padding: 28px 0 22px;
	border-bottom: 1px solid var(--ydn-line);
}
.ydn-masthead__title {
	font-size: clamp(28px, 4vw, 44px);
	line-height: 1.1;
	margin: 0 0 10px;
	font-weight: 800;
	max-width: 22ch;
}
.ydn-masthead__dek {
	font-size: 17px;
	line-height: 1.55;
	color: var(--ydn-muted);
	max-width: 68ch;
	margin: 0 0 18px;
}
.ydn-masthead__nav {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}
.ydn-masthead__nav a {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 8px 14px 8px 12px;
	border: 1px solid var(--ydn-line);
	border-radius: 999px;
	font-weight: 700;
	font-size: 14px;
	color: var(--ydn-ink);
	text-decoration: none;
	transition: border-color .15s, color .15s;
}
.ydn-masthead__nav a:hover { border-color: var(--ydn-red); color: var(--ydn-red); }
.ydn-masthead__nav svg { width: 18px; height: 18px; }

.ydn-label {
	font-family: var(--ydn-sans);
	font-size: 13px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--ydn-red);
	margin: 0 0 12px;
	padding-bottom: 8px;
	border-bottom: 2px solid var(--ydn-ink);
}

.ydn-top { padding: 28px 0 8px; }
.ydn-top__grid {
	display: grid;
	gap: 28px;
	grid-template-columns: 1fr;
}
@media (min-width: 900px) {
	.ydn-top__grid { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
	.ydn-top__river { grid-column: 2; grid-row: 1 / span 2; }
	.ydn-top__second { grid-column: 1; }
}
@media (min-width: 1100px) {
	.ydn-top__grid { grid-template-columns: minmax(0, 1.9fr) minmax(0, 1fr) minmax(0, 0.9fr); }
	.ydn-top__second { grid-column: 2; grid-row: 1; }
	.ydn-top__river { grid-column: 3; grid-row: 1; }
}
.ydn-top__second {
	display: grid;
	gap: 18px;
	align-content: start;
}
@media (min-width: 900px) and (max-width: 1099px) {
	.ydn-top__second { grid-template-columns: 1fr 1fr; }
}

.ydn-river { list-style: none; margin: 0; padding: 0; counter-reset: r; }
.ydn-river li {
	padding: 12px 0;
	border-bottom: 1px solid var(--ydn-line);
	display: grid;
	gap: 4px;
}
.ydn-river li:first-child { padding-top: 0; }
.ydn-river time { font-size: 12px; font-weight: 700; color: var(--ydn-red); text-transform: uppercase; letter-spacing: .04em; }
.ydn-river a {
	font-family: var(--ydn-serif);
	font-weight: 700;
	font-size: 16px;
	line-height: 1.3;
	color: var(--ydn-ink);
	text-decoration: none;
}
.ydn-river a:hover { color: var(--ydn-red); }

/* Cards */
.ydn-card { position: relative; }
.ydn-card__media { display: block; overflow: hidden; border-radius: 4px; background: var(--ydn-soft); }
.ydn-card__img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.ydn-card__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
	font-size: 12px;
	color: var(--ydn-muted);
	margin: 10px 0 6px;
}
.ydn-kicker {
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.07em;
	text-decoration: none;
	color: var(--ydn-red);
}
.ydn-kicker--tech { color: var(--ydn-tech); }
.ydn-kicker--ai { color: var(--ydn-ai); }
.ydn-kicker--gaming { color: var(--ydn-gaming); }
.ydn-kicker--world { color: var(--ydn-world); }
.ydn-card__title { margin: 0; line-height: 1.22; font-weight: 700; }
.ydn-card__title a { color: var(--ydn-ink); text-decoration: none; }
.ydn-card__title a:hover { color: var(--ydn-red); }
.ydn-card__title a::after { content: ""; position: absolute; inset: 0; }
.ydn-card__meta a { position: relative; z-index: 1; }
.ydn-card__dek { margin: 8px 0 0; color: var(--ydn-muted); font-size: 15px; line-height: 1.5; }

.ydn-card--lead .ydn-card__title { font-size: clamp(26px, 3vw, 36px); line-height: 1.12; font-weight: 800; }
.ydn-card--lead .ydn-card__dek { font-size: 17px; }
.ydn-card--card .ydn-card__title { font-size: 19px; }
.ydn-card--compact {
	display: grid;
	grid-template-columns: 1fr 112px;
	gap: 14px;
	align-items: start;
	padding-bottom: 18px;
	border-bottom: 1px solid var(--ydn-line);
}
.ydn-card--compact:last-child { border-bottom: 0; }
.ydn-card--compact .ydn-card__media { grid-column: 2; grid-row: 1; }
.ydn-card--compact .ydn-card__body { grid-column: 1; grid-row: 1; }
.ydn-card--compact .ydn-card__img { aspect-ratio: 3 / 2; }
.ydn-card--compact .ydn-card__meta { margin-top: 0; }
.ydn-card--compact .ydn-card__title { font-size: 17px; }

/* Sections */
.ydn-section { padding: 36px 0 8px; }
.ydn-section__head {
	display: grid;
	grid-template-columns: 1fr auto;
	align-items: end;
	gap: 4px 16px;
	border-top: 3px solid var(--ydn-ink);
	padding-top: 14px;
	margin-bottom: 20px;
}
.ydn-section__title { margin: 0; font-size: 26px; line-height: 1.2; }
.ydn-section__title a { display: inline-flex; align-items: center; gap: 10px; color: var(--ydn-ink); text-decoration: none; }
.ydn-section__title a:hover { color: var(--ydn-red); }
.ydn-section__dek { grid-column: 1; margin: 0; color: var(--ydn-muted); font-size: 15px; }
.ydn-more {
	grid-column: 2;
	grid-row: 1 / span 2;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-weight: 700;
	font-size: 14px;
	text-decoration: none;
	color: var(--ydn-red);
	white-space: nowrap;
}
.ydn-section--tech .ydn-section__title svg { color: var(--ydn-tech); }
.ydn-section--ai .ydn-section__title svg { color: var(--ydn-ai); }
.ydn-section--gaming .ydn-section__title svg { color: var(--ydn-gaming); }
.ydn-section--world .ydn-section__title svg { color: var(--ydn-world); }
.ydn-section__grid {
	display: grid;
	gap: 28px 24px;
	grid-template-columns: 1fr;
}
@media (min-width: 640px) { .ydn-section__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .ydn-section__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 560px) {
	.ydn-section__head { grid-template-columns: 1fr; }
	.ydn-more { grid-column: 1; grid-row: auto; margin-top: 6px; }
}

.ydn-about { margin-top: 44px; }
.ydn-about .ydn-about__inner {
	background: var(--ydn-soft);
	border-left: 4px solid var(--ydn-red);
	max-width: var(--ydn-max);
	width: calc(100% - 32px);
	padding: 26px 24px;
	border-radius: 4px;
}
@media (min-width: 768px) {
	.ydn-about .ydn-about__inner { width: calc(100% - 56px); padding: 30px 32px; }
}
.ydn-about h2 { margin: 0 0 10px; font-size: 24px; }
.ydn-about p { margin: 0 0 10px; max-width: 75ch; line-height: 1.6; }
.ydn-about p:last-child { margin-bottom: 0; }

.ydn-empty { color: var(--ydn-muted); font-size: 15px; margin: 0; }
.ydn-empty--big {
	font-family: var(--ydn-serif);
	font-size: 22px;
	color: var(--ydn-ink);
	padding: 32px 0;
	border-bottom: 1px solid var(--ydn-line);
}

/* ---------- Articles ---------- */
.single-post .entry-content {
	font-size: 18px;
	line-height: 1.7;
}
.single-post .entry-content h2 { font-size: 26px; margin-top: 1.6em; }
.single-post .entry-content h3 { font-size: 21px; }
.single-post .entry-content a { text-decoration: underline; text-underline-offset: 3px; }
.single-post .entry-content blockquote {
	border-left: 4px solid var(--ydn-red);
	margin-left: 0;
	padding-left: 18px;
	font-family: var(--ydn-serif);
	font-size: 21px;
}
.single-post .page-title { font-size: clamp(30px, 4.2vw, 46px); line-height: 1.12; font-weight: 800; }
.entry-meta, .entry-meta a { font-size: 14px; }

/* ---------- Footer ---------- */
.ydn-footer {
	background: var(--ydn-ink);
	color: #c4c8d0;
	padding: 44px 0 18px;
	margin-top: 40px;
	font-size: 15px;
}
.ydn-footer a { color: #e7e9ee; text-decoration: none; }
.ydn-footer a:hover { color: #fff; text-decoration: underline; }
.ydn-footer__grid {
	display: grid;
	gap: 30px;
	grid-template-columns: 1fr;
}
@media (min-width: 768px) {
	.ydn-footer__grid { grid-template-columns: 2fr 1fr 1fr; }
}
.ydn-footer__logo {
	font-family: var(--ydn-serif);
	font-weight: 800;
	font-size: 28px;
	color: #fff !important;
	letter-spacing: -0.02em;
}
.ydn-footer__logo span { color: #fff; }
.ydn-footer__logo b { color: #ff4d63; font-weight: 800; }
.ydn-footer__brand p { margin: 10px 0 0; max-width: 46ch; line-height: 1.6; }
.ydn-footer__col h2 {
	font-family: var(--ydn-sans);
	font-size: 13px;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: #fff;
	margin: 0 0 12px;
}
.ydn-footer .ydn-footer__col ul,
.ydn-footer .ydn-footer__col ul.menu {
	display: block !important;
	list-style: none;
	margin: 0;
	padding: 0;
}
.ydn-footer .ydn-footer__col li {
	display: block;
	margin: 0 0 9px;
	padding: 0;
	white-space: nowrap;
}
.ydn-footer .ydn-footer__col li a { display: inline; padding: 0; }
.ydn-footer__legal {
	border-top: 1px solid #2a2f38;
	margin-top: 32px;
	padding-top: 16px;
	font-size: 13px;
}
.ydn-footer__legal p { margin: 0; }
