/*
Theme Name: Nord Press 24
Author: Nord Press 24
Description: Temă editorială pentru publicația de știri locale Nord Press 24 (Maramureș). Design preluat din aplicația Lovable: tipografie de ziar, secțiuni, articol principal, căutare, complet adaptată pentru telefon.
Version: 1.0.0
Requires at least: 6.4
Tested up to: 7.1
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: nordpress24
*/

/* ==========================================================================
   Tokens — preluate din aplicația Lovable (src/styles.css)
   ========================================================================== */

:root {
	color-scheme: light;
	--radius: 0.25rem;
	--background: oklch(0.986 0.005 90);
	--foreground: oklch(0.19 0.015 265);
	--primary: oklch(0.47 0.185 25);
	--primary-foreground: oklch(0.99 0.005 90);
	--secondary: oklch(0.28 0.055 258);
	--secondary-foreground: oklch(0.98 0.005 90);
	--muted: oklch(0.955 0.008 90);
	--muted-foreground: oklch(0.48 0.015 265);
	--accent: oklch(0.93 0.02 80);
	--accent-foreground: oklch(0.25 0.03 265);
	--border: oklch(0.88 0.01 85);
	--font-serif: "Playfair Display", Georgia, serif;
	--font-sans: "Source Sans 3", "Helvetica Neue", Arial, sans-serif;
}

/* ==========================================================================
   Bază
   ========================================================================== */

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

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

body {
	margin: 0;
	background-color: var(--background);
	color: var(--foreground);
	font-family: var(--font-sans);
	font-size: 1rem;
	line-height: 1.5;
	font-synthesis-weight: none;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd {
	margin: 0;
}

h1, h2, h3, h4, h5, h6 {
	font-size: inherit;
	font-weight: inherit;
}

h1, h2, h3, h4 {
	font-family: var(--font-serif);
	letter-spacing: -0.015em;
}

a {
	color: inherit;
	text-decoration: inherit;
}

img, svg, video {
	display: block;
	max-width: 100%;
}

img, video {
	height: auto;
}

button, input, textarea, select {
	font: inherit;
	color: inherit;
}

:focus-visible {
	outline: 2px solid var(--primary);
	outline-offset: 2px;
}

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip-path: inset(50%);
	border: 0;
	word-wrap: normal !important;
}

.skip-link:focus {
	top: 1rem;
	left: 1rem;
	z-index: 100000;
	width: auto;
	height: auto;
	margin: 0;
	padding: 0.75rem 1rem;
	clip-path: none;
	background: var(--background);
	color: var(--primary);
	font-weight: 700;
}

/* ==========================================================================
   Utilitare
   ========================================================================== */

.container {
	width: 100%;
	max-width: 72rem;
	margin-inline: auto;
	padding-inline: 1rem;
}

.container--narrow {
	max-width: 48rem;
}

.rubric {
	font-family: var(--font-sans);
	font-size: 0.6875rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

.rule-top {
	border-top: 3px solid var(--foreground);
}

.text-primary {
	color: var(--primary);
}

.empty {
	padding-block: 4rem;
	text-align: center;
	color: var(--muted-foreground);
}

.icon-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.25rem;
	height: 2.25rem;
	padding: 0;
	border: 0;
	border-radius: calc(var(--radius) - 2px);
	background: transparent;
	cursor: pointer;
	transition: background-color 0.15s ease;
}

.icon-button:hover {
	background: var(--accent);
}

/* ==========================================================================
   Antet
   ========================================================================== */

.site-header {
	border-bottom: 1px solid var(--border);
	background: var(--background);
}

.topbar {
	background: var(--secondary);
	color: var(--secondary-foreground);
}

.topbar__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding-block: 0.375rem;
}

.topbar__date {
	opacity: 0.9;
}

.brand {
	padding-block: 1.5rem;
	text-align: center;
}

.brand__link {
	display: inline-flex;
	flex-direction: column;
	align-items: center;
}

.brand__logo {
	width: auto;
	height: 5rem;
}

.brand__tagline {
	display: block;
	margin-top: 0.5rem;
	color: var(--muted-foreground);
}

.mainnav {
	border-top: 3px solid var(--foreground);
	border-bottom: 1px solid var(--border);
}

.mainnav__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
}

.nav-toggle {
	margin-block: 0.375rem;
}

.menu {
	margin: 0;
	padding: 0;
	list-style: none;
}

.menu a {
	display: block;
	font-size: 0.6875rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	transition: color 0.15s ease;
}

.menu a:hover,
.menu .is-active > a,
.menu .current-menu-item > a,
.menu .current-menu-parent > a,
.menu .current-post-ancestor > a {
	color: var(--primary);
}

.menu--primary {
	display: none;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.25rem;
}

.menu--primary a {
	padding: 0.75rem;
}

/* Căutare */

.search-form {
	align-items: center;
	gap: 0.5rem;
}

.search-input {
	width: 100%;
	height: 2.25rem;
	padding-inline: 0.75rem;
	border: 1px solid var(--border);
	border-radius: 0;
	background: var(--background);
	font-size: 0.875rem;
	-webkit-appearance: none;
	appearance: none;
}

.search-input:focus-visible {
	outline: none;
	border-color: var(--primary);
	box-shadow: 0 0 0 3px color-mix(in oklch, var(--primary) 22%, transparent);
}

.search-button {
	display: inline-flex;
	flex-shrink: 0;
	align-items: center;
	justify-content: center;
	width: 2.25rem;
	height: 2.25rem;
	padding: 0;
	border: 0;
	border-radius: calc(var(--radius) - 2px);
	background: var(--secondary);
	color: var(--secondary-foreground);
	cursor: pointer;
	transition: opacity 0.15s ease;
}

.search-button:hover {
	opacity: 0.85;
}

.header-search {
	display: none;
	padding-block: 0.5rem;
}

.header-search .search-input {
	width: 10rem;
}

.drawer-search,
.page-search {
	display: flex;
}

.drawer-search {
	margin-top: 1rem;
}

.page-search {
	max-width: 24rem;
	margin: 1.5rem auto 0;
}

@media (min-width: 640px) {
	.brand__logo {
		height: 7rem;
	}
}

@media (min-width: 1024px) {
	.nav-toggle {
		display: none;
	}

	.menu--primary,
	.header-search {
		display: flex;
	}
}

@media (min-width: 1280px) {
	.header-search .search-input {
		width: 14rem;
	}
}

/* Meniu mobil */

.drawer {
	position: fixed;
	inset: 0;
	z-index: 1000;
}

.drawer__overlay {
	position: absolute;
	inset: 0;
	background: rgb(0 0 0 / 0.5);
}

.drawer__panel {
	position: absolute;
	top: 0;
	bottom: 0;
	left: 0;
	display: flex;
	flex-direction: column;
	width: 18rem;
	max-width: 85vw;
	padding: 1.25rem 1rem;
	overflow-y: auto;
	background: var(--background);
	box-shadow: 0 10px 30px rgb(0 0 0 / 0.2);
	animation: np24-slide-in 0.2s ease-out;
}

.drawer__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
}

.drawer__title {
	font-family: var(--font-serif);
	font-size: 1.25rem;
	font-weight: 600;
}

.menu--drawer {
	display: flex;
	flex-direction: column;
	margin-top: 1.5rem;
}

.menu--drawer a {
	padding-block: 0.75rem;
}

.has-drawer {
	overflow: hidden;
}

.admin-bar .drawer {
	top: 46px;
}

@media (min-width: 783px) {
	.admin-bar .drawer {
		top: 32px;
	}
}

@keyframes np24-slide-in {
	from {
		transform: translateX(-100%);
	}
}

@media (prefers-reduced-motion: reduce) {
	.drawer__panel {
		animation: none;
	}
}

/* ==========================================================================
   Conținut
   ========================================================================== */

.site-main {
	padding-block: 2rem;
}

.site-main--article {
	padding-block: 2.5rem;
}

.home-banner {
	padding-top: 1.5rem;
}

.home-banner img {
	width: 100%;
	border: 1px solid var(--border);
}

.home-top {
	display: grid;
	gap: 2.5rem;
}

.home-latest__title {
	padding-top: 0.5rem;
	padding-bottom: 0.75rem;
}

.home-section {
	margin-top: 3.5rem;
}

.section-head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 1rem;
	padding-top: 0.5rem;
}

.section-head h2 {
	font-size: 1.5rem;
	line-height: 2rem;
	font-weight: 700;
}

.section-head a {
	flex-shrink: 0;
}

.grid {
	display: grid;
	gap: 1.5rem;
	margin-top: 1rem;
}

.grid--listing {
	margin-top: 2rem;
}

@media (min-width: 640px) {
	.grid--3,
	.grid--4 {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.grid--related {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (min-width: 1024px) {
	.home-top {
		grid-template-columns: 2fr 1fr;
	}

	.home-latest {
		padding-left: 2rem;
		border-left: 1px solid var(--border);
	}

	.grid--3 {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.grid--4 {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}

/* Carduri de articol */

.card__link {
	display: block;
}

.card__link:hover .card__title,
.card__link:focus-visible .card__title {
	color: var(--primary);
}

.card__rubric {
	display: block;
}

.card__title {
	font-weight: 700;
	transition: color 0.15s ease;
}

.card__excerpt,
.card__meta {
	color: var(--muted-foreground);
}

.card__meta {
	font-size: 0.75rem;
	line-height: 1rem;
}

.cover {
	width: 100%;
	object-fit: cover;
	object-position: 50% 30%;
	background: var(--accent);
}

.cover--16x9 {
	aspect-ratio: 16 / 9;
}

.cover--3x2 {
	aspect-ratio: 3 / 2;
}

.cover--thumb {
	flex-shrink: 0;
	width: 6rem;
	height: 6rem;
}

.cover--empty {
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--accent-foreground);
}

.cover--empty span {
	opacity: 0.6;
}

.card--lead .card__rubric {
	margin-top: 1rem;
}

.card--lead .card__title {
	margin-top: 0.5rem;
	font-size: 1.875rem;
	line-height: 1.25;
}

.card--lead .card__excerpt {
	margin-top: 0.75rem;
}

.card--lead .card__meta {
	margin-top: 0.75rem;
}

.card--tile {
	padding-top: 1rem;
	border-top: 1px solid var(--border);
}

.card--tile .card__rubric {
	margin-top: 0.75rem;
}

.card--tile .card__title,
.card--row .card__title {
	margin-top: 0.25rem;
	font-size: 1.125rem;
	line-height: 1.375;
}

.card--tile .card__excerpt,
.card--row .card__excerpt {
	display: -webkit-box;
	overflow: hidden;
	-webkit-box-orient: vertical;
	font-size: 0.875rem;
	line-height: 1.25rem;
}

.card--tile .card__excerpt {
	margin-top: 0.5rem;
	-webkit-line-clamp: 3;
	line-clamp: 3;
}

.card--tile .card__meta,
.card--row .card__meta {
	margin-top: 0.5rem;
}

.card--row {
	padding-block: 1rem;
	border-top: 1px solid var(--border);
}

.card--row .card__link {
	display: flex;
	align-items: flex-start;
	gap: 1rem;
}

.card__body {
	flex: 1;
	min-width: 0;
}

.card--row .card__excerpt {
	margin-top: 0.25rem;
	-webkit-line-clamp: 2;
	line-clamp: 2;
}

@media (min-width: 640px) {
	.card--lead .card__title {
		font-size: 2.25rem;
	}

	.cover--thumb {
		width: 7rem;
		height: 7rem;
	}
}

/* Antet de pagină (secțiuni, știri, căutare) */

.page-head {
	padding-top: 0.75rem;
}

.page-head__title {
	font-size: 2.25rem;
	line-height: 2.5rem;
	font-weight: 900;
}

.page-head__title--sm {
	font-size: 1.875rem;
	line-height: 2.25rem;
}

.page-head__desc {
	max-width: 42rem;
	margin-top: 0.5rem;
	color: var(--muted-foreground);
}

.search-results {
	margin-top: 2rem;
}

/* Pagina de articol */

.article__title {
	margin-top: 0.75rem;
	font-size: 1.875rem;
	line-height: 1.25;
	font-weight: 900;
}

.article__lede {
	margin-top: 1rem;
	padding-left: 1rem;
	border-left: 4px solid var(--primary);
	color: var(--muted-foreground);
	font-size: 1.125rem;
	line-height: 1.75rem;
}

.article__meta {
	margin-top: 1.25rem;
	padding-block: 0.75rem;
	border-block: 1px solid var(--border);
	color: var(--muted-foreground);
	font-size: 0.75rem;
	line-height: 1rem;
}

.article__figure {
	margin-top: 1.5rem;
}

.article__image--tall,
.article-body figure img {
	width: auto;
	max-height: 40rem;
	margin-inline: auto;
}

.article__figure figcaption {
	margin-top: 0.5rem;
	color: var(--muted-foreground);
	font-size: 0.8125rem;
}

.related {
	margin-top: 3.5rem;
}

.related h2 {
	padding-top: 0.5rem;
	font-size: 1.5rem;
	line-height: 2rem;
	font-weight: 700;
}

@media (min-width: 640px) {
	.article__title {
		font-size: 3rem;
		line-height: 1.15;
	}
}

/* Textul articolului (conținut din editor) */

.article-body {
	margin-top: 2rem;
}

.article-body::after {
	content: "";
	display: table;
	clear: both;
}

.article-body p,
.article-body ul,
.article-body ol {
	margin-bottom: 1.15rem;
	font-size: 1.0625rem;
	line-height: 1.75;
}

.article-body > p:first-of-type {
	font-size: 1.1875rem;
	line-height: 1.7;
}

.article-body ul,
.article-body ol {
	margin-top: 0;
	padding-left: 1.5rem;
}

.article-body li + li {
	margin-top: 0.25rem;
}

.article-body h2 {
	margin: 2.25rem 0 0.75rem;
	font-size: 1.625rem;
	line-height: 1.3;
	font-weight: 700;
}

.article-body h3 {
	margin: 2rem 0 0.5rem;
	font-size: 1.3125rem;
	line-height: 1.35;
	font-weight: 700;
}

.article-body h4 {
	margin: 1.75rem 0 0.5rem;
	font-size: 1.125rem;
	font-weight: 700;
}

.article-body a {
	color: var(--primary);
	text-decoration: underline;
	text-underline-offset: 3px;
}

.article-body strong,
.article-body b {
	font-weight: 700;
}

.article-body blockquote {
	margin: 2rem 0;
	padding: 0.25rem 0 0.25rem 1.25rem;
	border-left: 4px solid var(--primary);
	font-family: var(--font-serif);
	font-size: 1.25rem;
	font-style: italic;
	line-height: 1.6;
}

.article-body blockquote p {
	margin-bottom: 0.5rem;
	font-size: inherit;
	line-height: inherit;
}

.article-body blockquote cite {
	display: block;
	margin-top: 0.5rem;
	color: var(--muted-foreground);
	font-family: var(--font-sans);
	font-size: 0.6875rem;
	font-style: normal;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

.article-body figure {
	margin: 2rem 0;
}

.article-body figcaption,
.article-body .wp-element-caption {
	margin-top: 0.5rem;
	color: var(--muted-foreground);
	font-size: 0.8125rem;
	line-height: 1.5;
	text-align: left;
}

.article-body hr {
	margin: 2.5rem 0;
	border: 0;
	border-top: 1px solid var(--border);
}

.article-body .wp-block-table {
	overflow-x: auto;
}

.article-body table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.9375rem;
}

.article-body th,
.article-body td {
	padding: 0.5rem 0.75rem;
	border: 1px solid var(--border);
	text-align: left;
}

.article-body th {
	background: var(--muted);
}

.article-body iframe {
	max-width: 100%;
}

.article-body .alignleft {
	float: left;
	max-width: 50%;
	margin: 0.25rem 1.5rem 1rem 0;
}

.article-body .alignright {
	float: right;
	max-width: 50%;
	margin: 0.25rem 0 1rem 1.5rem;
}

.article-body .aligncenter {
	margin-inline: auto;
}

.article-body .aligncenter img {
	margin-inline: auto;
}

.post-pages {
	margin-top: 1.5rem;
}

/* Paginare */

.pagination {
	margin-top: 2.5rem;
	padding-top: 1rem;
	border-top: 3px solid var(--foreground);
}

.pagination .nav-links {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 0.25rem;
}

.pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.25rem;
	height: 2.25rem;
	padding-inline: 0.625rem;
	border: 1px solid var(--border);
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	transition: color 0.15s ease, border-color 0.15s ease;
}

.pagination a.page-numbers:hover {
	border-color: var(--primary);
	color: var(--primary);
}

.pagination .page-numbers.current {
	border-color: var(--secondary);
	background: var(--secondary);
	color: var(--secondary-foreground);
}

.pagination .page-numbers.dots {
	border-color: transparent;
}

/* 404 */

.notfound {
	padding-block: 6rem;
	text-align: center;
}

.notfound__title {
	margin-top: 0.75rem;
	font-size: 1.875rem;
	line-height: 2.25rem;
	font-weight: 700;
}

.notfound__text {
	margin-top: 0.75rem;
	color: var(--muted-foreground);
}

.notfound__home {
	display: inline-block;
	margin-top: 1.5rem;
}

/* ==========================================================================
   Subsol
   ========================================================================== */

.site-footer {
	margin-top: 4rem;
	border-top: 1px solid var(--border);
	background: var(--secondary);
	color: var(--secondary-foreground);
}

.footer-grid {
	display: grid;
	gap: 2rem;
	padding-block: 3rem;
}

.footer-brand {
	font-family: var(--font-serif);
	font-size: 1.5rem;
	line-height: 2rem;
	font-weight: 900;
}

.footer-brand span {
	opacity: 0.7;
}

.footer-about {
	max-width: 20rem;
	margin-top: 0.75rem;
	font-size: 0.875rem;
	line-height: 1.25rem;
	opacity: 0.8;
}

.footer-heading {
	opacity: 0.7;
}

.footer-list {
	margin: 0.75rem 0 0;
	padding: 0;
	list-style: none;
	font-size: 0.875rem;
	line-height: 1.25rem;
}

.footer-list li + li {
	margin-top: 0.5rem;
}

.footer-list a {
	opacity: 0.85;
	transition: opacity 0.15s ease;
}

.footer-list a:hover {
	opacity: 1;
}

.footer-list--contact {
	opacity: 0.85;
}

.footer-list--contact a {
	opacity: 1;
	text-decoration: underline;
	text-underline-offset: 4px;
}

.footer-bottom {
	padding-block: 1rem;
	border-top: 1px solid rgb(255 255 255 / 0.1);
	font-size: 0.75rem;
	line-height: 1rem;
	text-align: center;
	opacity: 0.7;
}

@media (min-width: 640px) {
	.footer-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}
