/* MWD Magazine Blog v1.0.0 */

:root {
	--mwd-accent: #c8102e;
	--mwd-cols: 3;
	--mwd-heading-font: Georgia, "Times New Roman", serif;
}

.mwd-magazine-wrap {
	width: 100%;
}

.mwd-mag {
	max-width: 1200px;
	margin: 0 auto;
	padding: 2.5rem 1.25rem 4rem;
	box-sizing: border-box;
}

.mwd-mag *,
.mwd-mag *::before,
.mwd-mag *::after {
	box-sizing: border-box;
}

/* ---- Masthead ------------------------------------------------------- */

.mwd-mag__masthead {
	margin-bottom: 2.5rem;
	padding-bottom: 1.25rem;
	border-bottom: 3px solid #141414;
}

.mwd-mag__title {
	font-family: var(--mwd-heading-font);
	font-size: clamp(2rem, 5vw, 3.25rem);
	line-height: 1.05;
	letter-spacing: -0.02em;
	margin: 0;
}

.mwd-mag__subtitle {
	margin: 0.6rem 0 0;
	color: #6b6b6b;
	font-size: 1.05rem;
	max-width: 62ch;
}

.mwd-mag__empty {
	color: #6b6b6b;
	font-size: 1.05rem;
}

/* ---- Hero ----------------------------------------------------------- */

.mwd-mag__hero {
	display: grid;
	grid-template-columns: 1.6fr 1fr;
	gap: 1.75rem;
	margin-bottom: 3rem;
}

.mwd-mag__hero-side {
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
}

/* ---- Card (comun) --------------------------------------------------- */

.mwd-card {
	display: flex;
	flex-direction: column;
}

.mwd-card__thumb {
	display: block;
	overflow: hidden;
	border-radius: 10px;
	background: #ececf0;
	aspect-ratio: 16 / 10;
}

.mwd-card__thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.5s ease;
}

.mwd-card:hover .mwd-card__thumb img {
	transform: scale(1.05);
}

.mwd-card__thumb-ph {
	display: block;
	width: 100%;
	height: 100%;
	background: linear-gradient(135deg, #e9e9ee, #d5d5dd);
}

.mwd-card__body {
	padding: 0.9rem 0 0;
}

.mwd-card__cat {
	display: inline-block;
	margin-bottom: 0.45rem;
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--mwd-accent);
	text-decoration: none;
}

.mwd-card__cat:hover {
	text-decoration: underline;
}

.mwd-card__title {
	font-family: var(--mwd-heading-font);
	line-height: 1.2;
	font-weight: 700;
	margin: 0 0 0.5rem;
}

.mwd-card__title a {
	color: #141414;
	text-decoration: none;
}

.mwd-card__title a:hover {
	color: var(--mwd-accent);
}

.mwd-card__excerpt {
	margin: 0 0 0.6rem;
	color: #555;
	font-size: 0.95rem;
	line-height: 1.55;
}

.mwd-card__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.75rem;
	font-size: 0.8rem;
	color: #8a8a8a;
}

.mwd-card__meta span + span::before {
	content: "•";
	margin-right: 0.75rem;
	color: #ccc;
}

/* ---- Variante ------------------------------------------------------- */

.mwd-card--hero .mwd-card__thumb {
	aspect-ratio: 16 / 9;
	border-radius: 12px;
}

.mwd-card--hero .mwd-card__title {
	font-size: clamp(1.6rem, 3vw, 2.3rem);
}

.mwd-card--hero .mwd-card__excerpt {
	font-size: 1.05rem;
}

.mwd-card--side {
	flex-direction: row;
	gap: 1rem;
	align-items: flex-start;
}

.mwd-card--side .mwd-card__thumb {
	flex: 0 0 42%;
	aspect-ratio: 4 / 3;
}

.mwd-card--side .mwd-card__body {
	padding: 0.1rem 0 0;
}

.mwd-card--side .mwd-card__title {
	font-size: 1.05rem;
	margin-bottom: 0.35rem;
}

.mwd-card--default .mwd-card__title {
	font-size: 1.25rem;
}

/* ---- Grilă ---------------------------------------------------------- */

.mwd-mag__grid {
	display: grid;
	grid-template-columns: repeat(var(--mwd-cols), 1fr);
	gap: 2.25rem 1.75rem;
	margin-bottom: 3rem;
}

.mwd-mag__grid--compact {
	grid-template-columns: repeat(4, 1fr);
	gap: 1.5rem;
}

/* ---- Secțiuni pe categorii ------------------------------------------ */

.mwd-mag__section {
	margin: 3rem 0;
}

.mwd-mag__section-title {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	font-family: var(--mwd-heading-font);
	font-size: 1.5rem;
	margin: 0 0 1.4rem;
	padding-bottom: 0.5rem;
	border-bottom: 2px solid #ececec;
}

.mwd-mag__section-title::before {
	content: "";
	width: 0.5rem;
	height: 1.4rem;
	background: var(--mwd-accent);
	border-radius: 2px;
}

.mwd-mag__section-title a {
	color: inherit;
	text-decoration: none;
}

.mwd-mag__section-title a:hover {
	color: var(--mwd-accent);
}

/* ---- Paginare ------------------------------------------------------- */

.mwd-mag__pagination {
	margin-top: 2.5rem;
	padding-top: 1.5rem;
	border-top: 1px solid #ececec;
}

.mwd-mag__pagination .nav-links {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	justify-content: center;
}

.mwd-mag__pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.5rem;
	height: 2.5rem;
	padding: 0 0.75rem;
	border: 1px solid #ddd;
	border-radius: 8px;
	color: #141414;
	text-decoration: none;
	font-size: 0.95rem;
	transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.mwd-mag__pagination .page-numbers:hover {
	border-color: var(--mwd-accent);
	color: var(--mwd-accent);
}

.mwd-mag__pagination .page-numbers.current {
	background: var(--mwd-accent);
	border-color: var(--mwd-accent);
	color: #fff;
}

/* ---- Responsive ----------------------------------------------------- */

@media (max-width: 900px) {
	.mwd-mag__hero {
		grid-template-columns: 1fr;
	}
	.mwd-mag__grid {
		grid-template-columns: repeat(2, 1fr);
	}
	.mwd-mag__grid--compact {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 560px) {
	.mwd-mag {
		padding: 1.75rem 1rem 3rem;
	}
	.mwd-mag__grid,
	.mwd-mag__grid--compact {
		grid-template-columns: 1fr;
	}
	.mwd-card--side {
		flex-direction: row;
	}
}

/* ==================================================================== *
 *  Articol individual (single) — layout de revistă
 * ==================================================================== */

.mwd-single-wrap {
	width: 100%;
}

.mwd-single {
	max-width: 1100px;
	margin: 0 auto;
	padding: 0 1.25rem;
	box-sizing: border-box;
}

.mwd-single *,
.mwd-single *::before,
.mwd-single *::after {
	box-sizing: border-box;
}

/* ---- Hero ----------------------------------------------------------- */

.mwd-single__hero {
	position: relative;
	margin: 2rem auto 2.5rem;
	border-radius: 16px;
	overflow: hidden;
}

.mwd-single__hero--image {
	min-height: 60vh;
	max-height: 620px;
	display: flex;
	align-items: flex-end;
}

.mwd-single__hero-bg {
	position: absolute;
	inset: 0;
	z-index: 0;
}

.mwd-single__hero-bg img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.mwd-single__hero--image::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	background: linear-gradient(180deg, rgba(0, 0, 0, 0) 30%, rgba(0, 0, 0, 0.15) 55%, rgba(0, 0, 0, 0.82) 100%);
}

.mwd-single__hero-inner {
	position: relative;
	z-index: 2;
	width: 100%;
	padding: 2.5rem;
}

.mwd-single__hero--image .mwd-single__hero-inner {
	color: #fff;
}

.mwd-single__hero--plain {
	text-align: center;
	border-radius: 0;
	padding-bottom: 1.5rem;
	border-bottom: 3px solid #141414;
	margin-bottom: 2.5rem;
}

.mwd-single__hero--plain .mwd-single__hero-inner {
	padding: 2.5rem 0 0;
}

.mwd-single__hero--plain .mwd-single__byline {
	justify-content: center;
}

.mwd-single__cat {
	display: inline-block;
	margin-bottom: 0.75rem;
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	text-decoration: none;
	color: var(--mwd-accent);
}

.mwd-single__hero--image .mwd-single__cat {
	color: #fff;
	background: var(--mwd-accent);
	padding: 0.3rem 0.7rem;
	border-radius: 4px;
}

.mwd-single__title {
	font-family: var(--mwd-heading-font);
	font-size: clamp(1.9rem, 4.5vw, 3.4rem);
	line-height: 1.08;
	letter-spacing: -0.02em;
	margin: 0;
}

.mwd-single__subtitle {
	margin: 0.9rem 0 0;
	font-size: clamp(1.05rem, 2vw, 1.3rem);
	line-height: 1.5;
	opacity: 0.92;
	max-width: 60ch;
}

.mwd-single__hero--plain .mwd-single__subtitle {
	margin-left: auto;
	margin-right: auto;
	color: #555;
}

.mwd-single__byline {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	margin-top: 1.5rem;
}

.mwd-single__avatar {
	border-radius: 50%;
}

.mwd-single__byline-text {
	display: flex;
	flex-direction: column;
	line-height: 1.35;
	font-size: 0.9rem;
}

.mwd-single__author {
	font-weight: 700;
}

.mwd-single__metaline {
	opacity: 0.8;
	font-size: 0.82rem;
}

/* ---- Conținut ------------------------------------------------------- */

.mwd-single__content {
	max-width: 720px;
	margin: 0 auto;
	font-size: 1.125rem;
	line-height: 1.8;
	color: #262626;
}

.mwd-single__content > p:first-of-type::first-letter {
	float: left;
	font-family: var(--mwd-heading-font);
	font-size: 3.6rem;
	line-height: 0.82;
	padding: 0.1em 0.12em 0 0;
	color: var(--mwd-accent);
}

.mwd-single__content p {
	margin: 0 0 1.4rem;
}

.mwd-single__content h2,
.mwd-single__content h3,
.mwd-single__content h4 {
	font-family: var(--mwd-heading-font);
	line-height: 1.25;
	margin: 2.4rem 0 1rem;
}

.mwd-single__content h2 {
	font-size: 1.9rem;
}

.mwd-single__content h3 {
	font-size: 1.45rem;
}

.mwd-single__content a {
	color: var(--mwd-accent);
	text-decoration: underline;
	text-underline-offset: 2px;
}

.mwd-single__content img,
.mwd-single__content figure {
	max-width: 100%;
	height: auto;
	border-radius: 12px;
	margin: 1.75rem 0;
}

.mwd-single__content figure img {
	margin: 0;
}

.mwd-single__content figcaption {
	margin-top: 0.5rem;
	font-size: 0.85rem;
	color: #888;
	text-align: center;
}

.mwd-single__content blockquote {
	margin: 2rem 0;
	padding: 0.4rem 0 0.4rem 1.5rem;
	border-left: 4px solid var(--mwd-accent);
	font-family: var(--mwd-heading-font);
	font-size: 1.35rem;
	font-style: italic;
	line-height: 1.5;
	color: #1a1a1a;
}

.mwd-single__content ul,
.mwd-single__content ol {
	margin: 0 0 1.4rem;
	padding-left: 1.4rem;
}

.mwd-single__content li {
	margin-bottom: 0.5rem;
}

.mwd-single__content pre {
	overflow: auto;
	padding: 1rem 1.25rem;
	border-radius: 10px;
	background: #1e1e24;
	color: #f4f4f5;
	font-size: 0.9rem;
	line-height: 1.6;
	margin: 1.75rem 0;
}

.mwd-single__content :not(pre) > code {
	background: #f1f1f4;
	padding: 0.1em 0.4em;
	border-radius: 4px;
	font-size: 0.92em;
}

.mwd-single__pagelinks {
	margin: 1.5rem 0;
	font-weight: 600;
}

/* ---- Tag-uri -------------------------------------------------------- */

.mwd-single__tags {
	max-width: 720px;
	margin: 2.5rem auto 0;
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.mwd-single__tag {
	font-size: 0.85rem;
	color: #555;
	text-decoration: none;
	background: #f2f2f5;
	padding: 0.35rem 0.75rem;
	border-radius: 999px;
	transition: background 0.2s ease, color 0.2s ease;
}

.mwd-single__tag:hover {
	background: var(--mwd-accent);
	color: #fff;
}

/* ---- Caseta de autor ------------------------------------------------ */

.mwd-single__author-box {
	max-width: 720px;
	margin: 2.5rem auto 0;
	display: flex;
	gap: 1.25rem;
	align-items: flex-start;
	padding: 1.5rem;
	background: #f7f7f9;
	border-radius: 14px;
}

.mwd-single__author-avatar {
	border-radius: 50%;
	flex: 0 0 auto;
}

.mwd-single__author-name {
	font-family: var(--mwd-heading-font);
	margin: 0 0 0.4rem;
	font-size: 1.15rem;
}

.mwd-single__author-bio {
	margin: 0;
	color: #555;
	font-size: 0.95rem;
	line-height: 1.6;
}

/* ---- Articole similare ---------------------------------------------- */

.mwd-single__related {
	margin-top: 3.5rem;
	padding-top: 2.5rem;
	border-top: 1px solid #ececec;
}

.mwd-single__related .mwd-mag__grid {
	grid-template-columns: repeat(3, 1fr);
	margin-bottom: 0;
}

.mwd-single__related .mwd-mag__section-title::before {
	content: "";
	width: 0.5rem;
	height: 1.4rem;
	background: var(--mwd-accent);
	border-radius: 2px;
}

/* ---- Comentarii ----------------------------------------------------- */

.mwd-single__comments {
	max-width: 720px;
	margin: 3rem auto 0;
	padding: 0 1.25rem;
}

/* ---- Responsive ----------------------------------------------------- */

@media (max-width: 900px) {
	.mwd-single__related .mwd-mag__grid {
		grid-template-columns: repeat(2, 1fr);
	}
	.mwd-single__hero-inner {
		padding: 1.75rem;
	}
}

@media (max-width: 560px) {
	.mwd-single__hero--image {
		min-height: 48vh;
	}
	.mwd-single__related .mwd-mag__grid {
		grid-template-columns: 1fr;
	}
	.mwd-single__content {
		font-size: 1.05rem;
	}
	.mwd-single__author-box {
		flex-direction: column;
	}
}
