/*
Theme Name: Lajme
Theme URI: https://lajme.titani-ks.com
Description: Child theme of ColorMag for the Lajme news portal — dark navy header, red accents, dense news layout (Sinjali / Express / Telegrafi style).
Author: Titani
Template: colormag
Version: 1.2.0
Text Domain: lajme
*/

:root {
	--navy: #0a1f33;
	--navy-2: #071627;
	--navy-3: #0e2c47;
	--red: #d92323;
	--red-dark: #b51c1c;
	--ink: #14181d;
	--muted: #5b6570;
	--line: #e3e6ea;
	--bg: #f3f4f6;
	--card: #ffffff;
}

body {
	font-family: 'Inter', -apple-system, "Segoe UI", Roboto, sans-serif;
	background: var(--bg);
	color: var(--ink);
}

h1, h2, h3, h4, h5,
.cm-site-title, .cm-post-title, .entry-title {
	font-family: 'Archivo', 'Inter', sans-serif;
}

/* ============ TOP UTILITY BAR (child-injected) ============ */
.lajme-topbar {
	background: var(--navy-2);
	color: #cfd9e4;
	font-size: 12.5px;
	border-bottom: 1px solid rgba(255,255,255,.08);
}
.lajme-topbar__in {
	max-width: 1240px;
	margin: 0 auto;
	padding: 7px 15px;
	display: flex;
	justify-content: space-between;
	gap: 16px;
}
.lajme-topbar__date { font-weight: 600; color: #e8eef5; text-transform: capitalize; }
.lajme-topbar__tag { color: #8fa2b5; }
@media (max-width: 640px) { .lajme-topbar__tag { display: none; } }

/* ============ TOP UTILITY BAR ============ */
.cm-top-bar {
	background: var(--navy-2) !important;
	color: #cfd9e4;
	font-size: 12.5px;
	border-bottom: 1px solid rgba(255,255,255,.08);
}
.cm-top-bar a { color: #e8eef5; }
.cm-top-bar .date-in-header { color: #cfd9e4; font-weight: 500; }

/* ============ HEADER / WORDMARK ============ */
.cm-header, .cm-main-header {
	background: var(--navy) !important;
}
.cm-header {
	border-bottom: 4px solid var(--red);
}
.cm-site-title {
	font-size: 46px !important;
	font-weight: 900 !important;
	letter-spacing: .5px;
	text-transform: uppercase;
	line-height: 1;
	margin: 0;
}
.cm-site-title a {
	color: #ffffff !important;
	text-decoration: none;
}
.cm-site-title a::after {
	content: ".";
	color: var(--red);
}
.cm-site-description { color: #a9bccd; font-size: 13px; }

/* ============ PRIMARY NAV (sticky) ============ */
#cm-primary-nav, .cm-primary-nav {
	background: var(--navy-2) !important;
	border-top: 1px solid rgba(255,255,255,.07);
}
.cm-header .cm-primary-nav {
	position: sticky;
	top: 0;
	z-index: 999;
}
#cm-primary-nav .cm-menu-primary-container > ul > li > a,
.cm-primary-nav ul li a {
	color: #ffffff !important;
	font-family: 'Archivo', sans-serif;
	font-weight: 700;
	font-size: 13.5px;
	text-transform: uppercase;
	letter-spacing: .4px;
	padding: 13px 15px;
}
#cm-primary-nav .cm-menu-primary-container > ul > li > a:hover,
.cm-primary-nav ul li a:hover,
#cm-primary-nav ul li.current-menu-item > a,
.cm-primary-nav ul li.current-menu-item > a {
	background: var(--red) !important;
	color: #ffffff !important;
}
#cm-primary-nav .cm-menu-primary-container > ul > li:first-child > a {
	background: var(--red);
}

/* ColorMag breaking-news bar (if enabled) — match scheme */
.breaking-news, .cm-breaking-news {
	background: #ffffff;
	border-bottom: 1px solid var(--line);
}
.breaking-news .break-news-title, .cm-breaking-news .break-news-title {
	background: var(--red) !important;
	color: #fff !important;
	font-family: 'Archivo', sans-serif;
	text-transform: uppercase;
}

/* ============ CONTENT FRAME ============ */
.cm-content { background: var(--bg); }
.inner-wrap { max-width: 1240px; }

/* ============ TICKER (front page) ============ */
.lajme-ticker {
	display: flex;
	align-items: stretch;
	background: #ffffff;
	border: 1px solid var(--line);
	border-left: none;
	margin: 14px 0 0;
	overflow: hidden;
}
.lajme-ticker__label {
	background: var(--red);
	color: #fff;
	font-family: 'Archivo', sans-serif;
	font-weight: 800;
	font-size: 13px;
	text-transform: uppercase;
	letter-spacing: .5px;
	display: flex;
	align-items: center;
	padding: 9px 14px;
	white-space: nowrap;
}
.lajme-ticker__track {
	overflow: hidden;
	flex: 1;
	display: flex;
	align-items: center;
}
.lajme-ticker__list {
	display: inline-flex;
	gap: 42px;
	white-space: nowrap;
	padding-left: 18px;
	margin: 0;
	list-style: none;
	animation: lajme-ticker-scroll 45s linear infinite;
}
.lajme-ticker__list li::before {
	content: "•";
	color: var(--red);
	font-weight: 900;
	margin-right: 8px;
}
.lajme-ticker__list a {
	color: var(--ink);
	font-size: 13.5px;
	font-weight: 600;
	text-decoration: none;
}
.lajme-ticker__list a:hover { color: var(--red); }
@keyframes lajme-ticker-scroll {
	0% { transform: translateX(0); }
	100% { transform: translateX(-50%); }
}
.lajme-ticker:hover .lajme-ticker__list { animation-play-state: paused; }

/* ============ HERO ============ */
.lajme-hero {
	display: grid;
	grid-template-columns: 2fr 1fr;
	gap: 18px;
	margin: 18px 0 8px;
}
.lajme-hero__main {
	position: relative;
	display: block;
	border-radius: 4px;
	overflow: hidden;
	background: var(--navy);
	min-height: 380px;
}
.lajme-hero__main img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	position: absolute;
	inset: 0;
}
.lajme-hero__overlay {
	position: absolute;
	inset: auto 0 0 0;
	padding: 46px 22px 18px;
	background: linear-gradient(transparent, rgba(4, 14, 24, .92));
	color: #fff;
}
.lajme-hero__overlay h2 {
	font-size: 29px;
	font-weight: 800;
	line-height: 1.18;
	margin: 8px 0 6px;
	color: #fff;
}
.lajme-cat-tag {
	display: inline-block;
	background: var(--red);
	color: #fff !important;
	font-family: 'Archivo', sans-serif;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .6px;
	padding: 3px 8px;
	border-radius: 2px;
	text-decoration: none;
}
.lajme-meta { color: #8fa2b5; font-size: 12px; }
.lajme-hero__overlay .lajme-meta { color: #b9c8d8; }

.lajme-hero__side {
	display: grid;
	grid-template-rows: repeat(4, 1fr);
	gap: 12px;
}
.lajme-mini {
	display: grid;
	grid-template-columns: 108px 1fr;
	gap: 12px;
	background: var(--card);
	border: 1px solid var(--line);
	border-radius: 4px;
	overflow: hidden;
	text-decoration: none;
}
.lajme-mini img { width: 108px; height: 100%; object-fit: cover; display: block; }
.lajme-mini__body { padding: 9px 10px 9px 0; }
.lajme-mini__body h3 {
	font-size: 14.5px;
	font-weight: 700;
	line-height: 1.3;
	margin: 4px 0 0;
	color: var(--ink);
}
.lajme-mini:hover h3 { color: var(--red); }

/* ============ MAIN + SIDEBAR ============ */
.lajme-main-grid {
	display: grid;
	grid-template-columns: 1fr 320px;
	gap: 22px;
	margin: 14px 0 6px;
	align-items: start;
}
.lajme-section { margin: 26px 0 0; }
.lajme-section__head {
	border-bottom: 3px solid var(--navy);
	margin-bottom: 16px;
	position: relative;
}
.lajme-section__head::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: -3px;
	width: 74px;
	height: 3px;
	background: var(--red);
}
.lajme-section__head h2 {
	font-size: 21px;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: .3px;
	margin: 0 0 8px;
	color: var(--navy);
}
.lajme-section__head h2 a { color: var(--navy); text-decoration: none; }
.lajme-section__head h2 a:hover { color: var(--red); }

.lajme-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 16px;
}
.lajme-grid--4 { grid-template-columns: repeat(4, 1fr); }
.lajme-card {
	background: var(--card);
	border: 1px solid var(--line);
	border-radius: 4px;
	overflow: hidden;
	text-decoration: none;
	display: block;
}
.lajme-card img { width: 100%; height: auto; display: block; }
.lajme-card__body { padding: 11px 13px 13px; }
.lajme-card__body h3 {
	font-size: 16.5px;
	font-weight: 700;
	line-height: 1.32;
	margin: 7px 0 6px;
	color: var(--ink);
}
.lajme-card:hover h3 { color: var(--red); }
.lajme-card p { color: var(--muted); font-size: 13.5px; line-height: 1.5; margin: 0; }

.lajme-list-item {
	display: grid;
	grid-template-columns: 92px 1fr;
	gap: 12px;
	padding: 11px 0;
	border-bottom: 1px solid var(--line);
	text-decoration: none;
}
.lajme-list-item img { width: 92px; height: 66px; object-fit: cover; border-radius: 3px; }
.lajme-list-item h3 { font-size: 15.5px; font-weight: 700; margin: 3px 0 4px; color: var(--ink); line-height: 1.3; }
.lajme-list-item:hover h3 { color: var(--red); }

/* Sidebar blocks */
.lajme-side-block {
	background: var(--card);
	border: 1px solid var(--line);
	border-radius: 4px;
	padding: 15px 16px;
	margin-bottom: 18px;
}
.lajme-side-block__title {
	font-size: 16px;
	font-weight: 800;
	text-transform: uppercase;
	color: var(--navy);
	border-bottom: 3px solid var(--navy);
	padding-bottom: 8px;
	margin: 0 0 12px;
	position: relative;
}
.lajme-side-block__title::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: -3px;
	width: 52px;
	height: 3px;
	background: var(--red);
}
.lajme-mostread { list-style: none; margin: 0; padding: 0; counter-reset: mr; }
.lajme-mostread li {
	counter-increment: mr;
	display: grid;
	grid-template-columns: 40px 1fr;
	gap: 10px;
	padding: 10px 0;
	border-bottom: 1px solid var(--line);
}
.lajme-mostread li:last-child { border-bottom: none; }
.lajme-mostread li::before {
	content: counter(mr);
	font-family: 'Archivo', sans-serif;
	font-size: 30px;
	font-weight: 900;
	line-height: 1;
	color: var(--red);
}
.lajme-mostread a {
	font-size: 14.5px;
	font-weight: 600;
	line-height: 1.35;
	color: var(--ink);
	text-decoration: none;
	align-self: center;
}
.lajme-mostread a:hover { color: var(--red); }

/* ============ HOUSE ADS ============ */
.portal-ad-wrap { max-width: 1240px; margin: 14px auto; padding: 0 15px; }
.portal-ad-wrap--inarticle { padding: 0; margin: 18px 0; }
.portal-ad {
	position: relative;
	background: linear-gradient(135deg, var(--navy) 0%, var(--navy-3) 100%);
	border: 1px solid var(--navy-2);
	border-radius: 4px;
	color: #fff;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	padding: 20px 16px;
	overflow: hidden;
}
.portal-ad::before {
	content: "";
	position: absolute;
	top: 0; left: 0; right: 0;
	height: 4px;
	background: var(--red);
}
.portal-ad__label {
	position: absolute;
	top: 10px;
	left: 10px;
	background: var(--red);
	color: #fff;
	font-size: 9.5px;
	font-weight: 700;
	letter-spacing: 1.2px;
	text-transform: uppercase;
	padding: 2px 7px;
	border-radius: 2px;
}
.portal-ad__title {
	font-family: 'Archivo', sans-serif;
	font-size: 30px;
	font-weight: 900;
	letter-spacing: 1px;
	line-height: 1.1;
	color: #fff;
}
.portal-ad__sub { color: #b9c8d8; font-size: 13px; margin-top: 6px; }
.portal-ad__mail {
	color: #fff;
	font-weight: 700;
	font-size: 14.5px;
	text-decoration: underline;
	text-decoration-color: var(--red);
	text-decoration-thickness: 2px;
	margin-top: 2px;
}
.portal-ad--leaderboard { min-height: 110px; }
.portal-ad--leaderboard .portal-ad__title { font-size: 34px; }
.portal-ad--box { min-height: 250px; }
.portal-ad--box .portal-ad__title { font-size: 27px; }
.portal-ad--wide { min-height: 120px; }
.portal-ad--wide .portal-ad__title { font-size: 32px; }
.portal-ad--inarticle { min-height: 110px; }

/* ============ SINGLE / ARCHIVE polish ============ */
.cm-single-post .entry-title, .single .entry-title {
	font-weight: 800;
	line-height: 1.2;
	color: var(--navy);
}
.cm-category-links a, .cm-post-categories a {
	background: var(--red) !important;
	color: #fff !important;
}
a { color: var(--navy-3); }
a:hover { color: var(--red); }

/* ============ FOOTER ============ */
.cm-footer, #cm-footer {
	background: var(--navy-2) !important;
	color: #a9bccd;
}
.cm-footer a { color: #e8eef5; }
.cm-footer a:hover { color: var(--red); }
.cm-footer-bar { border-top: 4px solid var(--red); }

/* ============ RESPONSIVE ============ */
@media (max-width: 980px) {
	.lajme-grid--4 { grid-template-columns: repeat(2, 1fr); }
	.lajme-main-grid { grid-template-columns: 1fr; }
	.lajme-hero { grid-template-columns: 1fr; }
	.lajme-hero__main { min-height: 300px; }
	.lajme-hero__side { grid-template-rows: none; }
}
@media (max-width: 640px) {
	.cm-site-title { font-size: 34px !important; }
	.lajme-grid { grid-template-columns: 1fr; }
	.lajme-grid--4 { grid-template-columns: 1fr; }
	.lajme-hero__overlay h2 { font-size: 22px; }
	.portal-ad__title, .portal-ad--leaderboard .portal-ad__title { font-size: 24px; }
	#cm-primary-nav .cm-menu-primary-container > ul { overflow-x: auto; white-space: nowrap; }
}

/* ============ MOBILE: FACEBOOK-STYLE FEED (<=480px) ============ */
.lajme-feed-ad { display: none; }

@media (max-width: 480px) {
	/* Single column everywhere — nothing squeezed side by side. */
	.lajme-main-grid { grid-template-columns: 1fr !important; gap: 0; margin-top: 6px; }
	.lajme-grid, .lajme-grid--2, .lajme-grid--4 { grid-template-columns: 1fr !important; gap: 14px; }
	.lajme-hero { grid-template-columns: 1fr !important; gap: 12px; margin-top: 12px; }
	.lajme-hero__side { grid-template-rows: none; gap: 12px; }

	/* Feed cards: white card, photo on top, headline BELOW the photo on white. */
	.lajme-card, .lajme-mini, .lajme-hero__main {
		border-radius: 8px;
		border: 1px solid var(--line);
		box-shadow: 0 1px 2px rgba(16, 24, 40, .08);
		background: #fff;
	}

	/* Hero becomes a feed card — no more text overlay on the photo. */
	.lajme-hero__main {
		position: static;
		min-height: 0;
		overflow: hidden;
		text-decoration: none;
	}
	.lajme-hero__main img {
		position: static;
		width: 100%;
		height: auto;
		aspect-ratio: 900 / 560;
		object-fit: cover;
	}
	.lajme-hero__overlay {
		position: static;
		display: block;
		background: none;
		color: var(--ink);
		padding: 12px 14px 14px;
	}
	.lajme-hero__overlay h2 {
		font-size: 21px;
		line-height: 1.25;
		color: var(--ink);
		margin: 7px 0 6px;
	}
	.lajme-hero__overlay .lajme-meta { color: var(--muted); }

	/* Regular section cards. */
	.lajme-card img { width: 100%; height: auto; aspect-ratio: 480 / 300; object-fit: cover; }
	.lajme-card__body { padding: 12px 14px 14px; }
	.lajme-card__body h3 { font-size: 19px; line-height: 1.3; }
	.lajme-meta { color: var(--muted); }

	/* Hero side stories become full-width feed cards too. */
	.lajme-mini { grid-template-columns: 1fr; }
	.lajme-mini img { width: 100%; height: auto; aspect-ratio: 480 / 300; object-fit: cover; }
	.lajme-mini__body { padding: 11px 14px 13px; }
	.lajme-mini__body h3 { font-size: 18px; }

	/* Sidebar stacks BELOW the feed, full width. */
	.lajme-sidebar { margin-top: 22px; }
	.lajme-sidebar .portal-ad { width: 100%; }
	.lajme-side-block { margin-top: 14px; }

	/* In-feed ad cards (mobile only), like sponsored posts. */
	.lajme-feed-ad { display: block; margin: 14px 0; }
	.lajme-feed-ad .portal-ad { border-radius: 8px; }

	/* Header leaderboard becomes a centered mobile banner. */
	.portal-ad-wrap { padding: 0 10px; margin: 10px auto; }
	.portal-ad--leaderboard { min-height: 92px; }
	.portal-ad--leaderboard .portal-ad__title { font-size: 22px; }
	.portal-ad--box { min-height: 250px; width: 100%; }

	/* Category nav: one horizontally scrollable strip (classic ColorMag
	   header markup: #cm-primary-nav + .cm-menu-primary-container > ul).
	   Hamburger hidden; items keep their natural width and scroll. */
	.cm-header .cm-menu-toggle { display: none !important; }
	#cm-primary-nav .cm-menu-primary-container {
		display: block !important;
		flex: 1 1 auto;
		min-width: 0;
	}
	#cm-primary-nav .cm-menu-primary-container > ul {
		display: flex !important;
		flex-wrap: nowrap !important;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: none;
		white-space: nowrap;
		margin: 0;
	}
	#cm-primary-nav .cm-menu-primary-container > ul::-webkit-scrollbar { display: none; }
	#cm-primary-nav .cm-menu-primary-container > ul > li { flex: 0 0 auto; padding: 0; }
	#cm-primary-nav .cm-menu-primary-container > ul > li > a { padding: 13px 13px; font-size: 13px; }

	/* Compact ticker + wordmark. */
	.lajme-ticker { margin-top: 10px; }
	.lajme-ticker__label { padding: 8px 10px; font-size: 12px; }
	.cm-site-title { font-size: 30px !important; }
	.lajme-section { margin-top: 20px; }
	.lajme-section__head h2 { font-size: 19px; }
}
