/*
 Theme Name:   Gazetar Sport
 Theme URI:    https://gazetar.eu/
 Description:  Temă child pentru GeneratePress cu aspect de site de știri sportive: header închis, bară „Ultima oră”, etichete de categorie, carduri în grilă și tipografie condensată.
 Author:       Vas
 Template:     generatepress
 Version:      1.2.2
 Requires at least: 6.0
 Requires PHP: 7.4
 License:      GNU General Public License v2 or later
 Text Domain:  gazetar-sport
*/

/* ==========================================================
   1. Variabile
   ========================================================== */
:root {
	--gs-accent: #e10600;          /* roșu „sport” – se schimbă din Customizer */
	--gs-accent-dark: #a80400;
	--gs-dark: #0e1116;            /* header / footer */
	--gs-dark-2: #181c23;
	--gs-bg: #eef0f3;              /* fundal pagină */
	--gs-card: #ffffff;
	--gs-text: #15181d;
	--gs-muted: #6b7280;
	--gs-line: #dfe3e8;
	--gs-radius: 6px;
	--gs-shadow: 0 1px 2px rgba(0,0,0,.06), 0 4px 14px rgba(0,0,0,.06);
	--gs-font-head: "Oswald", "Arial Narrow", Arial, sans-serif;
	--gs-font-body: "Roboto", -apple-system, "Segoe UI", Arial, sans-serif;
}

/* ==========================================================
   2. Bază
   ========================================================== */
/* Mărimile sunt în rem ca să urmeze <meta name="text-scale"> și setările de font ale sistemului.
   style.css se încarcă după CSS-ul GeneratePress, deci înlocuiește valorile în px din Customizer. */
body {
	background: var(--gs-bg);
	color: var(--gs-text);
	font-family: var(--gs-font-body);
	font-size: 1.0625rem;
	line-height: 1.65;
}

h1, h2, h3, h4, h5, h6,
.main-title,
.main-navigation .main-nav ul li a,
.widget-title,
.page-header .page-title,
.nav-links,
button, .button, input[type="submit"] {
	font-family: var(--gs-font-head);
	letter-spacing: .01em;
}

h1 { font-size: 2.25rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.375rem; }
h1, h2, h3 { font-weight: 700; text-transform: uppercase; line-height: 1.15; }

a { color: var(--gs-accent); }
a:hover, a:focus { color: var(--gs-accent-dark); }

:focus-visible { outline: 3px solid var(--gs-accent); outline-offset: 2px; }

/* ==========================================================
   3. Bara „Ultima oră” (ticker)
   ========================================================== */
.gs-ticker {
	background: var(--gs-accent);
	color: #fff;
	font-family: var(--gs-font-head);
	font-size: 0.875rem;
	text-transform: uppercase;
	overflow: hidden;
}
.gs-ticker__inner {
	display: flex;
	align-items: center;
	max-width: var(--gs-container, 1200px);
	margin: 0 auto;
	min-height: 2.4rem;
}
.gs-ticker__label {
	flex: 0 0 auto;
	background: var(--gs-dark);
	padding: 0 16px;
	height: 100%;
	display: flex;
	align-items: center;
	gap: 8px;
	font-weight: 700;
	letter-spacing: .06em;
	position: relative;
	z-index: 2;
}
.gs-ticker__label::before {
	content: "";
	width: 8px; height: 8px;
	border-radius: 50%;
	background: var(--gs-accent);
	animation: gs-pulse 1.4s infinite;
}
.gs-ticker__track {
	flex: 1;
	overflow: hidden;
	position: relative;
	mask-image: linear-gradient(90deg, transparent, #000 30px, #000 calc(100% - 30px), transparent);
}
.gs-ticker__list {
	display: inline-flex;
	gap: 40px;
	white-space: nowrap;
	margin: 0;
	padding: 0 0 0 20px;
	list-style: none;
	animation: gs-scroll var(--gs-ticker-speed, 45s) linear infinite;
}
.gs-ticker:hover .gs-ticker__list,
.gs-ticker:focus-within .gs-ticker__list { animation-play-state: paused; }
.gs-ticker__list li { margin: 0; }
.gs-ticker__list li::before { content: "▸ "; opacity: .7; }
.gs-ticker a { color: #fff; text-decoration: none; }
.gs-ticker a:hover { text-decoration: underline; }

@keyframes gs-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes gs-pulse { 0%,100% { opacity: 1; } 50% { opacity: .25; } }

@media (prefers-reduced-motion: reduce) {
	.gs-ticker__list { animation: none; }
	.gs-ticker__track { overflow-x: auto; }
}

/* ==========================================================
   4. Header + meniu
   ========================================================== */
.site-header {
	background: var(--gs-dark);
	color: #fff;
	border-bottom: 4px solid var(--gs-accent);
}
.site-header .inside-header { padding-top: 18px; padding-bottom: 18px; }
.main-title { font-size: 2.125rem; font-weight: 700; text-transform: uppercase; line-height: 1; }
.main-title a, .main-title a:hover { color: #fff; }
.site-description { color: #9aa3af; font-size: 0.8125rem; text-transform: uppercase; letter-spacing: .08em; }

.main-navigation,
.main-navigation ul ul { background: var(--gs-dark-2); }
.main-navigation .main-nav ul li a,
.main-navigation .menu-toggle,
.main-navigation .menu-bar-items { color: #e5e7eb; }
.main-navigation .main-nav ul li a {
	text-transform: uppercase;
	font-weight: 500;
	font-size: 0.9375rem;
	letter-spacing: .04em;
	position: relative;
}
.main-navigation .main-nav ul li:not(.menu-item-has-children) > a::after {
	content: "";
	position: absolute;
	left: 20px; right: 20px; bottom: 0;
	height: 3px;
	background: var(--gs-cat, var(--gs-accent));
	transform: scaleX(0);
	transition: transform .2s;
}
.main-navigation .main-nav ul li:hover > a,
.main-navigation .main-nav ul li.current-menu-item > a,
.main-navigation .main-nav ul li.current-menu-ancestor > a { color: #fff; background: transparent; }
.main-navigation .main-nav ul li:hover > a::after,
.main-navigation .main-nav ul li.current-menu-item > a::after { transform: scaleX(1); }
.main-navigation .main-nav ul ul li a { font-size: 0.875rem; }
.main-navigation .main-nav ul ul li a:hover { background: var(--gs-cat, var(--gs-accent)); color: var(--gs-cat-text, #fff); }

/* Meniul în header (navigation float) */
.site-header .main-navigation { background: transparent; }

/* ==========================================================
   5. Layout general – fără „cutii” albe pe fundalul gri
   ========================================================== */
.separate-containers .inside-article,
.separate-containers .comments-area,
.separate-containers .page-header,
.separate-containers .paging-navigation,
.one-container .site-content,
.inside-page-header {
	background: var(--gs-card);
	border-radius: var(--gs-radius);
	box-shadow: var(--gs-shadow);
}

.page-header {
	border-left: 6px solid var(--gs-accent);
}
.page-header .page-title { font-size: 1.875rem; margin: 0; }
.taxonomy-description { color: var(--gs-muted); margin-top: 6px; }

/* ==========================================================
   6. Arhive / prima pagină – grilă de carduri
   ========================================================== */
.gs-grid .site-main {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 24px;
	align-items: start;
}
.gs-grid .site-main > *:not(article) { grid-column: 1 / -1; }
.gs-grid.separate-containers .site-main > article { margin-bottom: 0; }

.gs-grid .site-main > article .inside-article {
	padding: 0;
	overflow: hidden;
	height: 100%;
	display: flex;
	flex-direction: column;
	border-top: 4px solid var(--gs-cat, var(--gs-accent));
	transition: transform .2s, box-shadow .2s;
}
.gs-grid .site-main > article .inside-article:hover {
	transform: translateY(-3px);
	box-shadow: 0 6px 24px rgba(0,0,0,.12);
}
.gs-grid .site-main > article .post-image {
	margin: 0 !important;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background: var(--gs-dark-2);
}
/* Linkul din jurul imaginii e inline în GeneratePress; fără display:block,
   height:100% pe img nu are efect și imaginile mai late rămân cu bandă goală dedesubt. */
.gs-grid .site-main > article .post-image a {
	display: block;
	width: 100%;
	height: 100%;
}
.gs-grid .site-main > article .post-image img {
	display: block;
	width: 100% !important;
	height: 100% !important;
	max-width: none;
	object-fit: cover;
	object-position: center 30%;
	transition: transform .35s;
}
.gs-grid .site-main > article:hover .post-image img { transform: scale(1.04); }

.gs-grid .site-main > article .entry-header,
.gs-grid .site-main > article .entry-summary,
.gs-grid .site-main > article .entry-content,
.gs-grid .site-main > article footer.entry-meta { padding: 0 18px; }
.gs-grid .site-main > article .entry-header { padding-top: 16px; }
.gs-grid .site-main > article .entry-title { font-size: 1.25rem; margin-bottom: 6px; }
.gs-grid .site-main > article .entry-summary { font-size: 0.9375rem; color: #3d434c; margin-top: 8px; }
.gs-grid .site-main > article .entry-summary p { margin-bottom: 0; }
.gs-grid .site-main > article footer.entry-meta { margin-top: auto; padding-bottom: 16px; padding-top: 12px; }
.gs-grid .site-main > article .read-more-container { display: none; }

/* Cardul principal (primul articol de pe prima pagină) */
.gs-grid.home:not(.paged) .site-main > article:first-of-type { grid-column: 1 / -1; }
.gs-grid.home:not(.paged) .site-main > article:first-of-type .inside-article {
	display: grid;
	grid-template-columns: 1.6fr 1fr;
	background: var(--gs-dark);
	color: #e5e7eb;
}
.gs-grid.home:not(.paged) .site-main > article:first-of-type .post-image { grid-row: 1 / span 3; aspect-ratio: auto; min-height: 380px; }
.gs-grid.home:not(.paged) .site-main > article:first-of-type .entry-header { padding: 32px 28px 0; }
.gs-grid.home:not(.paged) .site-main > article:first-of-type .entry-title { font-size: 2.125rem; }
.gs-grid.home:not(.paged) .site-main > article:first-of-type .entry-title a { color: #fff; }
.gs-grid.home:not(.paged) .site-main > article:first-of-type .entry-summary { color: #c7cbd1; font-size: 1.0625rem; padding: 0 28px; }
.gs-grid.home:not(.paged) .site-main > article:first-of-type footer.entry-meta { padding: 16px 28px 28px; }
.gs-grid.home:not(.paged) .site-main > article:first-of-type .entry-meta,
.gs-grid.home:not(.paged) .site-main > article:first-of-type .entry-meta a { color: #9aa3af; }

/* Titluri articole */
.entry-title a { color: var(--gs-text); text-decoration: none; }
.entry-title a:hover { color: var(--gs-accent); }

/* Meta */
.entry-meta { font-size: 0.8125rem; color: var(--gs-muted); text-transform: uppercase; letter-spacing: .03em; }
.entry-meta a { color: var(--gs-muted); }
.entry-meta a:hover { color: var(--gs-accent); }
.gs-grid footer.entry-meta .cat-links,
.gs-grid footer.entry-meta .tags-links { display: none; } /* categoria e deja în etichetă */

/* ==========================================================
   7. Eticheta de categorie
   ========================================================== */
.gs-badge {
	display: inline-block;
	background: var(--gs-cat, var(--gs-accent));
	color: var(--gs-cat-text, #fff) !important;
	font-family: var(--gs-font-head);
	font-size: 0.75rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: .08em;
	line-height: 1;
	padding: 6px 9px 5px;
	border-radius: 2px;
	text-decoration: none;
	margin-bottom: 10px;
}
.gs-badge:hover { filter: brightness(.85); }

/* ==========================================================
   8. Articol individual
   ========================================================== */
.single .inside-article { padding-top: 0; overflow: hidden; }
.single .featured-image.page-header-image-single,
.single .inside-article > .featured-image {
	margin: 0 -40px 28px;
}
.single .featured-image img { width: 100%; max-height: 520px; object-fit: cover; }
.single .entry-header { padding-top: 32px; }
.single .featured-image + .entry-header,
.single .post-image + .entry-header { padding-top: 0; }
.single .entry-title { font-size: 2.625rem; margin-bottom: 12px; }
.single .entry-header .entry-meta { border-bottom: 1px solid var(--gs-line); padding-bottom: 14px; margin-bottom: 24px; }

.single .entry-content > p:first-of-type { font-size: 1.1875rem; font-weight: 500; }
.entry-content h2 { font-size: 1.625rem; border-left: 5px solid var(--gs-accent); padding-left: 12px; margin-top: 1.6em; }
.entry-content h3 { font-size: 1.3125rem; }
.entry-content blockquote {
	border-left: 5px solid var(--gs-accent);
	background: #f7f8fa;
	font-family: var(--gs-font-head);
	font-size: 1.375rem;
	font-style: normal;
	text-transform: none;
	padding: 18px 22px;
}
.entry-content table { border-collapse: collapse; font-size: 0.9375rem; }
.entry-content table th { background: var(--gs-dark); color: #fff; font-family: var(--gs-font-head); text-transform: uppercase; font-weight: 500; }
.entry-content table th, .entry-content table td { border: 1px solid var(--gs-line); padding: 8px 10px; }
.entry-content table tr:nth-child(even) td { background: #f7f8fa; }

.single footer.entry-meta .cat-links a,
.single footer.entry-meta .tags-links a {
	display: inline-block;
	background: var(--gs-bg);
	color: var(--gs-text);
	padding: 3px 8px;
	border-radius: 3px;
	margin: 2px 2px 2px 0;
	text-decoration: none;
}
.single footer.entry-meta .cat-links a:hover,
.single footer.entry-meta .tags-links a:hover { background: var(--gs-accent); color: #fff; }
.single footer.entry-meta .cat-links a[class*="gs-cat-"] { background: var(--gs-cat); color: var(--gs-cat-text, #fff); }
.single footer.entry-meta .cat-links a[class*="gs-cat-"]:hover { filter: brightness(.85); }

.post-navigation .nav-previous, .post-navigation .nav-next { font-family: var(--gs-font-head); text-transform: uppercase; }

/* ==========================================================
   9. Sidebar
   ========================================================== */
.sidebar .widget {
	background: var(--gs-card);
	border-radius: var(--gs-radius);
	box-shadow: var(--gs-shadow);
	padding: 22px;
}
.widget-title {
	font-size: 1.0625rem !important;
	text-transform: uppercase;
	font-weight: 700;
	padding-bottom: 10px;
	margin-bottom: 16px !important;
	border-bottom: 2px solid var(--gs-line);
	position: relative;
}
.widget-title::after {
	content: "";
	position: absolute;
	left: 0; bottom: -2px;
	width: 48px; height: 2px;
	background: var(--gs-accent);
}
.sidebar .widget ul li { border-bottom: 1px solid var(--gs-line); padding: 8px 0; margin: 0; }
.sidebar .widget ul li:last-child { border-bottom: 0; }
.sidebar .widget ul li a { color: var(--gs-text); text-decoration: none; font-weight: 500; }
.sidebar .widget ul li a:hover { color: var(--gs-accent); }

/* Widget „Articole recente” numerotat – stil „Cele mai citite” */
.sidebar .widget_recent_entries ul { counter-reset: gs; }
.sidebar .widget_recent_entries ul li { counter-increment: gs; display: flex; gap: 12px; align-items: baseline; }
.sidebar .widget_recent_entries ul li::before {
	content: counter(gs);
	font-family: var(--gs-font-head);
	font-size: 1.625rem;
	font-weight: 700;
	color: var(--gs-accent);
	min-width: 22px;
	line-height: 1;
}

/* ==========================================================
   10. Butoane, formulare, paginare
   ========================================================== */
button, .button, input[type="submit"], .wp-block-button__link {
	background: var(--gs-accent);
	color: #fff;
	text-transform: uppercase;
	border-radius: 3px;
	font-weight: 600;
}
button:hover, .button:hover, input[type="submit"]:hover, .wp-block-button__link:hover { background: var(--gs-dark); color: #fff; }

.paging-navigation .nav-links { display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; }
.paging-navigation .nav-links > * {
	display: inline-block;
	min-width: 40px;
	padding: 8px 12px;
	text-align: center;
	background: var(--gs-bg);
	color: var(--gs-text);
	border-radius: 3px;
	text-decoration: none;
}
.paging-navigation .nav-links .current,
.paging-navigation .nav-links a:hover { background: var(--gs-accent); color: #fff; }

/* ==========================================================
   11. Footer
   ========================================================== */
.site-footer .footer-widgets { background: var(--gs-dark-2); color: #c7cbd1; border-top: 4px solid var(--gs-accent); }
.site-footer .footer-widgets a { color: #fff; }
.site-footer .footer-widgets .widget-title { color: #fff; border-bottom-color: #2c323c; }
.site-info { background: var(--gs-dark); color: #8b939e; font-size: 0.8125rem; }
.site-info a { color: #c7cbd1; }

/* ==========================================================
   12. Responsive
   ========================================================== */
@media (max-width: 1024px) {
	.gs-grid .site-main { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 768px) {
	body { font-size: 1rem; }
	.gs-grid .site-main { grid-template-columns: 1fr; gap: 16px; }
	.gs-grid.home:not(.paged) .site-main > article:first-of-type .inside-article { display: flex; }
	.gs-grid.home:not(.paged) .site-main > article:first-of-type .post-image { min-height: 0; aspect-ratio: 16/9; }
	.gs-grid.home:not(.paged) .site-main > article:first-of-type .entry-title { font-size: 1.625rem; }
	.single .entry-title { font-size: 1.875rem; }
	.single .featured-image.page-header-image-single,
	.single .inside-article > .featured-image { margin: 0 -30px 20px; }
	.main-title { font-size: 1.625rem; }
	.gs-ticker__label span { display: none; }
	.gs-ticker__label { padding: 0 12px; }
}
