/*
Theme Name: Stirea
Theme URI: https://example.com/stirea
Author: Stirea
Description: Temă WordPress pentru site-uri de știri și reviste online. Complet personalizabilă din Customizer: culori, fonturi, layout, antet, ticker de știri de ultimă oră, secțiuni de pe prima pagină, mod întunecat, subsol și rețele sociale.
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: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: stirea
Tags: news, blog, magazine, custom-colors, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready, two-columns, right-sidebar, left-sidebar, grid-layout
*/

/* ---------- Variabile (valorile reale vin din Customizer) ---------- */
:root {
	--st-primary: #c4161c;
	--st-accent: #111827;
	--st-text: #1f2937;
	--st-muted: #6b7280;
	--st-bg: #ffffff;
	--st-surface: #f3f4f6;
	--st-border: #e5e7eb;
	--st-header-bg: #ffffff;
	--st-footer-bg: #111827;
	--st-link: #c4161c;
	--st-container: 1200px;
	--st-sidebar: 320px;
	--st-font-body: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
	--st-font-head: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
	--st-font-size: 17px;
	--st-radius: 6px;
	--st-ticker-speed: 40s;
}

html[data-theme="dark"] {
	--st-text: #e5e7eb;
	--st-bg: #0f172a;
	--st-surface: #1e293b;
	--st-border: #334155;
	--st-header-bg: #0f172a;
	--st-muted: #94a3b8;
	--st-accent: #f1f5f9;
	--st-link: #f87171;
}

/* ---------- Reset și bază ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	background: var(--st-bg);
	color: var(--st-text);
	font-family: var(--st-font-body);
	font-size: var(--st-font-size);
	line-height: 1.7;
	-webkit-font-smoothing: antialiased;
}
img, video, iframe { max-width: 100%; height: auto; }
a { color: var(--st-link); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4, h5, h6 {
	font-family: var(--st-font-head);
	color: var(--st-accent);
	line-height: 1.25;
	margin: 0 0 .6em;
}
p { margin: 0 0 1.2em; }
blockquote {
	margin: 1.5em 0;
	padding: .5em 1.2em;
	border-left: 4px solid var(--st-primary);
	background: var(--st-surface);
	font-style: italic;
}
.screen-reader-text {
	border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%);
	height: 1px; margin: -1px; overflow: hidden; padding: 0;
	position: absolute; width: 1px; word-wrap: normal !important;
}
.screen-reader-text:focus {
	background: #fff; color: #000; clip: auto; clip-path: none; height: auto;
	left: 6px; top: 6px; width: auto; padding: 12px 20px; z-index: 100000;
}
.container { width: 100%; max-width: var(--st-container); margin: 0 auto; padding: 0 20px; }

/* ---------- Bara de sus ---------- */
.topbar { background: var(--st-accent); color: #fff; font-size: 13px; }
html[data-theme="dark"] .topbar { background: var(--st-surface); color: var(--st-text); }
.topbar__inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 36px; flex-wrap: wrap; }
.topbar a { color: inherit; }
.topbar ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 16px; }

/* ---------- Antet ---------- */
.site-header { background: var(--st-header-bg); border-bottom: 1px solid var(--st-border); z-index: 50; }
.site-header.is-sticky { position: sticky; top: 0; }
body.admin-bar .site-header.is-sticky { top: 32px; }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 72px; }
.site-branding .site-title { margin: 0; font-size: 1.9rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.site-branding .site-title a { color: var(--st-accent); text-decoration: none; }
.site-branding .site-description { margin: 2px 0 0; font-size: 13px; color: var(--st-muted); }
.custom-logo { max-height: 56px; width: auto; display: block; }
.header-tools { display: flex; align-items: center; gap: 10px; }
.icon-btn {
	background: transparent; border: 1px solid var(--st-border); color: var(--st-accent);
	width: 38px; height: 38px; border-radius: 50%; cursor: pointer; font-size: 16px;
	display: inline-flex; align-items: center; justify-content: center;
}
.icon-btn:hover { background: var(--st-surface); }

.stirea-header-center .site-header__inner { flex-direction: column; padding: 18px 20px 0; gap: 14px; }
.stirea-header-center .site-branding { text-align: center; }
.stirea-header-center .main-navigation { width: 100%; border-top: 1px solid var(--st-border); }
.stirea-header-center .main-navigation ul.menu { justify-content: center; }

/* ---------- Navigare ---------- */
.main-navigation ul { list-style: none; margin: 0; padding: 0; }
.main-navigation ul.menu { display: flex; gap: 4px; flex-wrap: wrap; }
.main-navigation li { position: relative; }
.main-navigation a {
	display: block; padding: 10px 12px; color: var(--st-accent); font-weight: 600;
	font-size: 15px; text-transform: uppercase; letter-spacing: .02em; text-decoration: none;
}
.main-navigation a:hover,
.main-navigation .current-menu-item > a,
.main-navigation .current-cat > a { color: var(--st-primary); }
.main-navigation ul ul {
	position: absolute; left: 0; top: 100%; min-width: 220px; background: var(--st-header-bg);
	border: 1px solid var(--st-border); box-shadow: 0 8px 24px rgba(0,0,0,.12);
	display: none; z-index: 60;
}
.main-navigation li:hover > ul, .main-navigation li:focus-within > ul { display: block; }
.main-navigation ul ul a { text-transform: none; font-weight: 500; }
.main-navigation ul ul ul { left: 100%; top: 0; }
.menu-toggle { display: none; }

/* ---------- Ticker știri de ultimă oră ---------- */
.ticker { background: var(--st-surface); border-bottom: 1px solid var(--st-border); font-size: 14px; }
.ticker__inner { display: flex; align-items: center; gap: 14px; min-height: 40px; }
.ticker__label {
	background: var(--st-primary); color: #fff; font-weight: 700; text-transform: uppercase;
	font-size: 12px; letter-spacing: .06em; padding: 4px 12px; border-radius: 3px; white-space: nowrap;
}
.ticker__track { overflow: hidden; flex: 1; }
.ticker__move { display: flex; width: max-content; animation: stirea-ticker var(--st-ticker-speed) linear infinite; }
.ticker__track:hover .ticker__move { animation-play-state: paused; }
.ticker__list { display: flex; white-space: nowrap; }
.ticker__list a { color: var(--st-text); padding-right: 40px; font-weight: 500; }
.ticker__list a::before { content: "●"; color: var(--st-primary); font-size: 9px; margin-right: 10px; vertical-align: middle; }
@keyframes stirea-ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---------- Layout cu sidebar ---------- */
.site-main-wrap { padding: 32px 0 48px; }
.site-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 40px; }
.stirea-sidebar-right .has-sidebar { grid-template-columns: minmax(0, 1fr) var(--st-sidebar); }
.stirea-sidebar-left .has-sidebar { grid-template-columns: var(--st-sidebar) minmax(0, 1fr); }
.stirea-sidebar-left .has-sidebar .widget-area { order: -1; }

.archive-header { margin-bottom: 28px; padding-bottom: 16px; border-bottom: 3px solid var(--st-primary); }
.archive-header h1 { margin: 0; font-size: 2rem; }
.archive-header .archive-description { color: var(--st-muted); margin-top: 8px; }

/* ---------- Cardurile de articole ---------- */
.post-grid { display: grid; grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); gap: 28px; }
.has-sidebar .post-grid { --cols: min(var(--cols-sb, 2), var(--cols, 3)); }
.card { display: flex; flex-direction: column; background: transparent; }
.card__img { display: block; overflow: hidden; border-radius: var(--st-radius); aspect-ratio: 3 / 2; background: var(--st-surface); }
.card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; display: block; }
.card:hover .card__img img { transform: scale(1.04); }
.card__img .no-thumb { width: 100%; height: 100%; background: linear-gradient(135deg, var(--st-surface), var(--st-border)); }
.card__body { padding-top: 12px; }
.card__title { font-size: 1.2rem; margin: 6px 0 8px; }
.card__title a { color: var(--st-accent); }
.card__title a:hover { color: var(--st-primary); text-decoration: none; }
.card__excerpt { color: var(--st-muted); font-size: .93rem; margin: 0 0 8px; }
.meta { font-size: 13px; color: var(--st-muted); display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; }
.meta a { color: var(--st-muted); }
.badge {
	display: inline-block; background: var(--st-primary); color: #fff !important; font-size: 11px; font-weight: 700;
	text-transform: uppercase; letter-spacing: .05em; padding: 2px 9px; border-radius: 3px; text-decoration: none !important;
}

.post-grid.is-list { grid-template-columns: 1fr; gap: 24px; }
.post-grid.is-list .card { flex-direction: row; gap: 20px; align-items: flex-start; }
.post-grid.is-list .card__img { flex: 0 0 280px; }
.post-grid.is-list .card__body { padding-top: 0; }

/* ---------- Hero ---------- */
.hero { padding: 28px 0 0; }
.hero__grid { display: grid; grid-template-columns: 2fr 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 12px; height: 520px; }
.hero__item { position: relative; overflow: hidden; border-radius: var(--st-radius); background: #000; min-height: 0; }
.hero__item:first-child { grid-row: 1 / span 2; }
.hero__item img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: .88; transition: transform .5s ease, opacity .3s; }
.hero__item:hover img { transform: scale(1.04); opacity: .75; }
.hero__item .no-thumb { width: 100%; height: 100%; background: linear-gradient(135deg, #1f2937, #374151); }
.hero__caption {
	position: absolute; left: 0; right: 0; bottom: 0; padding: 40px 18px 16px;
	background: linear-gradient(to top, rgba(0,0,0,.85), rgba(0,0,0,0)); color: #fff;
}
.hero__caption h2 { color: #fff; margin: 6px 0 0; font-size: 1.05rem; }
.hero__item:first-child .hero__caption h2 { font-size: 1.9rem; }
.hero__caption a { color: #fff; text-decoration: none; }
.hero__link { position: absolute; inset: 0; z-index: 1; }
.hero__caption .badge { position: relative; z-index: 2; }

/* ---------- Secțiuni pe categorii ---------- */
.section-block { margin-top: 44px; }
.section-title {
	display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px;
	border-bottom: 2px solid var(--st-border); position: relative;
}
.section-title h2 { margin: 0; font-size: 1.15rem; text-transform: uppercase; letter-spacing: .04em; padding-bottom: 10px; border-bottom: 3px solid var(--st-primary); margin-bottom: -2px; }
.section-title a.more { font-size: 13px; font-weight: 600; }

/* ---------- Articol individual ---------- */
.entry-header { margin-bottom: 20px; }
.entry-title { font-size: 2.4rem; margin: 10px 0 14px; }
.entry-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; font-size: 14px; color: var(--st-muted); }
.entry-meta img { border-radius: 50%; vertical-align: middle; }
.entry-thumb { margin: 0 0 26px; }
.entry-thumb img { width: 100%; border-radius: var(--st-radius); display: block; }
.entry-thumb figcaption { font-size: 13px; color: var(--st-muted); margin-top: 6px; }
.entry-content { font-size: 1.08rem; }
.entry-content > * + * { margin-top: 0; }
.entry-content h2 { margin-top: 1.6em; }
.entry-content h3 { margin-top: 1.4em; }
.entry-content img { border-radius: var(--st-radius); }
.entry-content .alignwide { max-width: 100%; }
.entry-content .alignleft { float: left; margin: .3em 1.4em 1em 0; }
.entry-content .alignright { float: right; margin: .3em 0 1em 1.4em; }
.entry-content .aligncenter { display: block; margin-left: auto; margin-right: auto; }
.wp-caption, .wp-block-image figcaption { font-size: 13px; color: var(--st-muted); }
.entry-footer { margin-top: 30px; padding-top: 18px; border-top: 1px solid var(--st-border); }
.tags a {
	display: inline-block; border: 1px solid var(--st-border); color: var(--st-text); padding: 2px 12px;
	border-radius: 30px; font-size: 13px; margin: 0 6px 6px 0;
}
.tags a:hover { background: var(--st-primary); color: #fff; border-color: var(--st-primary); text-decoration: none; }
.share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 22px 0; }
.share strong { font-size: 14px; margin-right: 4px; }
.share a {
	background: var(--st-surface); color: var(--st-text); padding: 6px 14px; border-radius: 30px;
	font-size: 13px; font-weight: 600; text-decoration: none;
}
.share a:hover { background: var(--st-primary); color: #fff; }
.author-box { display: flex; gap: 18px; padding: 22px; background: var(--st-surface); border-radius: var(--st-radius); margin: 30px 0; }
.author-box img { border-radius: 50%; flex-shrink: 0; }
.author-box h4 { margin: 0 0 4px; }
.author-box p { margin: 0; color: var(--st-muted); font-size: .95rem; }
.related { margin-top: 40px; }

/* ---------- Paginare ---------- */
.pagination, .navigation.pagination { margin-top: 40px; }
.nav-links { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.page-numbers {
	padding: 7px 14px; border: 1px solid var(--st-border); border-radius: var(--st-radius);
	color: var(--st-text); font-weight: 600; font-size: 14px; text-decoration: none;
}
.page-numbers.current, a.page-numbers:hover { background: var(--st-primary); border-color: var(--st-primary); color: #fff; text-decoration: none; }

/* ---------- Sidebar și widgeturi ---------- */
.widget { margin-bottom: 34px; }
.widget-title {
	font-size: 1.05rem; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 16px;
	padding-bottom: 8px; border-bottom: 3px solid var(--st-primary); display: inline-block;
}
.widget ul { list-style: none; margin: 0; padding: 0; }
.widget li { padding: 8px 0; border-bottom: 1px solid var(--st-border); font-size: .96rem; }
.widget li:last-child { border-bottom: 0; }
.widget a { color: var(--st-text); }
.widget a:hover { color: var(--st-primary); }
.search-form { display: flex; gap: 6px; }
.search-form label { flex: 1; }
.search-field, input[type="text"], input[type="email"], input[type="url"], input[type="search"], textarea {
	width: 100%; padding: 10px 14px; border: 1px solid var(--st-border); border-radius: var(--st-radius);
	background: var(--st-bg); color: var(--st-text); font: inherit;
}
.search-submit, .button, input[type="submit"], button.submit {
	background: var(--st-primary); color: #fff; border: 0; padding: 10px 20px; border-radius: var(--st-radius);
	cursor: pointer; font-weight: 600; font-family: inherit;
}
.search-submit:hover, .button:hover, input[type="submit"]:hover { filter: brightness(.9); text-decoration: none; }

/* ---------- Comentarii ---------- */
.comments-area { margin-top: 44px; }
.comments-title { font-size: 1.4rem; }
.comment-list { list-style: none; padding: 0; margin: 0 0 30px; }
.comment-list .children { list-style: none; padding-left: 28px; }
.comment-body { padding: 18px 0; border-bottom: 1px solid var(--st-border); }
.comment-author img { border-radius: 50%; float: left; margin-right: 12px; }
.comment-metadata { font-size: 12px; color: var(--st-muted); }
.comment-metadata a { color: var(--st-muted); }
.comment-content { clear: both; padding-top: 8px; }
.comment-form p { margin-bottom: 14px; }

/* ---------- Subsol ---------- */
.site-footer { background: var(--st-footer-bg); color: #cbd5e1; margin-top: 40px; }
.site-footer a { color: #e2e8f0; }
.site-footer .widget-title { color: #fff; }
.site-footer .widget li { border-color: rgba(255,255,255,.12); }
.site-footer .widget a { color: #cbd5e1; }
.footer-widgets { display: grid; grid-template-columns: repeat(var(--fcols, 3), minmax(0, 1fr)); gap: 40px; padding: 50px 0 20px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); padding: 18px 0; font-size: 14px; }
.footer-bottom__inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; }
.footer-bottom ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 16px; flex-wrap: wrap; }
.social-links { display: flex; gap: 8px; flex-wrap: wrap; }
.social-links a {
	background: rgba(255,255,255,.1); color: #fff !important; padding: 4px 12px; border-radius: 30px;
	font-size: 12px; font-weight: 600; text-decoration: none;
}
.social-links a:hover { background: var(--st-primary); }
.topbar .social-links a { background: rgba(255,255,255,.14); }

.back-to-top {
	position: fixed; right: 20px; bottom: 20px; width: 44px; height: 44px; border-radius: 50%;
	background: var(--st-primary); color: #fff; border: 0; cursor: pointer; font-size: 18px;
	opacity: 0; visibility: hidden; transition: opacity .25s; z-index: 80;
}
.back-to-top.is-visible { opacity: 1; visibility: visible; }

.no-results { text-align: center; padding: 60px 0; }
.error-404 { text-align: center; padding: 70px 0; }
.error-404 h1 { font-size: 6rem; color: var(--st-primary); margin: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
	.stirea-sidebar-right .has-sidebar, .stirea-sidebar-left .has-sidebar { grid-template-columns: minmax(0, 1fr); }
	.post-grid { --cols: 2; }
	.hero__grid { grid-template-columns: 1fr 1fr; grid-template-rows: 2fr 1fr 1fr; height: 640px; }
	.hero__item:first-child { grid-column: 1 / span 2; grid-row: 1; }
	.footer-widgets { --fcols: 2; }
}
@media (max-width: 782px) {
	body.admin-bar .site-header.is-sticky { top: 46px; }
}
@media (max-width: 768px) {
	.menu-toggle { display: inline-flex; }
	.main-navigation { position: absolute; left: 0; right: 0; top: 100%; background: var(--st-header-bg); border-bottom: 1px solid var(--st-border); display: none; }
	.main-navigation.is-open { display: block; }
	.main-navigation ul.menu { flex-direction: column; padding: 8px 20px 16px; gap: 0; }
	.main-navigation ul ul { position: static; display: block; box-shadow: none; border: 0; padding-left: 14px; }
	.site-header { position: relative; }
	.site-header.is-sticky { position: sticky; }
	.stirea-header-center .main-navigation { position: absolute; }
	.site-header__inner { flex-wrap: nowrap; }
	.stirea-header-center .site-header__inner { flex-direction: row; padding: 0 20px; }
	.stirea-header-center .site-branding { text-align: left; }
	.post-grid, .post-grid.is-list { --cols: 1; grid-template-columns: 1fr; }
	.post-grid.is-list .card { flex-direction: column; }
	.post-grid.is-list .card__img { flex: none; width: 100%; }
	.hero__grid { grid-template-columns: 1fr; grid-template-rows: none; height: auto; }
	.hero__item, .hero__item:first-child { grid-column: auto; grid-row: auto; aspect-ratio: 16 / 10; }
	.hero__item:first-child .hero__caption h2 { font-size: 1.4rem; }
	.entry-title { font-size: 1.8rem; }
	.footer-widgets { --fcols: 1; }
	.ticker__label { font-size: 11px; padding: 3px 8px; }
}
@media (prefers-reduced-motion: reduce) {
	.ticker__move { animation: none; }
	.card__img img, .hero__item img { transition: none; }
}
@media print {
	.site-header, .topbar, .ticker, .site-footer, .widget-area, .share, .related, .comments-area, .back-to-top { display: none !important; }
}
