/*
Theme Name: Primăria Pro v5 — Verde
Theme URI: https://euroconsulting.ro
Author: EC Company
Author URI: https://euroconsulting.ro
Description: Child theme v5 pentru instituții publice românești — variantă "Verde & Elegant" cu meniu plutitor peste hero și avizier electronic în 3 coloane. Bazată pe tema-mamă Primăria Pro.
Version: 3.0.0
Requires at least: 6.3
Tested up to: 6.5
Requires PHP: 8.1
Template: primaria-pro
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: primaria-pro-v5
Domain Path: /languages
Tags: government, romanian, municipality, child-theme
*/

/* ================================================================
   PALETĂ VERDE & ELEGANT — suprascrie tokenii temei-mamă
   ================================================================ */
:root {
	--gov-blue:       #2b2b2b;
	--gov-blue-mid:   #1f1f1f;
	--gov-blue-light: #3d3d3d;
	--gov-blue-pale:  #eef7f1;
	--gov-red:        #44B272;
	--gov-red-pale:   #E6F6EC;
	--gov-gold:       #44B272;
	--gov-icon-bg:    #44B272;
	--gov-icon-fg:    #FFFFFF;
}

/* Topbar — gri deschis, iconițe verzi */
.gov-topbar {
	background: #f4f5f4;
	color: var(--text-secondary);
	border-bottom: 1px solid var(--border-light);
}
.gov-topbar a,
.gov-topbar__item {
	color: var(--text-secondary);
}
.gov-topbar a:hover {
	color: var(--gov-red);
}
.gov-topbar__item svg {
	color: var(--gov-red);
	opacity: 1;
}
.gov-topbar__sep {
	background: var(--border);
}
.gov-topbar__a11y button {
	background: rgba(0,0,0,0.05);
	border-color: var(--border);
	color: var(--text-secondary);
}

/* Header — ascuns; conținutul lui (nume instituție, buton Monitorul
   Oficial) e mutat (JS, functions.php) într-un bloc unic în interiorul
   hero-ului: nume (sus) → meniu → butoane hero (jos), toate centrate. */
.gov-header {
	background: transparent;
	box-shadow: none;
	border-bottom: none;
}
.gov-header__inner {
	display: none;
}

/* .gov-hero (părinte) are overflow:hidden — corect pentru imaginea de
   fundal, dar taie orice conținut care depășește cutia hero-ului. Cum meniul
   mobil și dropdown-ul "Monitorul Oficial" trăiesc acum, prin JS, chiar în
   interiorul hero-ului (.v5-hero-stack), un dropdown deschis mai înalt decât
   spațiul rămas era tăiat vizual, cu imaginea de fundal văzându-se peste el.
   isolation:isolate rămâne suficient pentru a izola z-index-urile interne. */
.gov-hero {
	overflow: visible;
}

.v5-hero-stack {
	position: absolute;
	top: 35%;
	left: 50%;
	transform: translate(-50%, -50%);
	z-index: 5;
	width: calc(100% - 40px);
	max-width: var(--container);
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 20px;
}

.v5-hero-stack__name {
	text-align: center;
}
.v5-hero-stack__name .gov-logo__name {
	color: #fff;
	font-size: 2.75rem;
}
.v5-hero-stack__name .gov-logo__meta {
	justify-content: center;
}
.v5-hero-stack__name .gov-logo__judet {
	color: rgba(255,255,255,0.75);
	font-size: 1rem;
}

/* Bara de meniu — card alb plutitor, IDENTIC pe toate paginile (nu doar
   homepage): aceeași formă (colțuri ușor rotunjite, nu complet rotunde),
   aceeași dimensiune (padding, font). Sticky, rămâne vizibilă la scroll. */
.gov-nav-bar {
	position: sticky;
	top: 16px;
	z-index: 50;
	max-width: var(--container);
	margin: 16px auto;
	background: #fff;
	border-radius: var(--radius-lg);
	border-bottom: none;
	box-shadow: var(--shadow-lg);
}
.gov-nav-bar .gov-container {
	padding-block: 14px;
}
.gov-nav > ul > li > a {
	font-size: 1.0625rem;
	padding-block: 10px;
}
/* Pe homepage, bara pornește poziționată de .v5-hero-stack (absolute,
   centrată peste hero), dar rămâne sticky — după ce dai scroll peste
   hero, se "desprinde" și rămâne fixă sus, la fel ca pe restul paginilor. */
.v5-hero-stack .gov-nav-bar {
	width: 100%;
	margin: 0;
}
/* Butonul "Monitorul Oficial", mutat (JS) în dreapta barei de meniu */
.gov-nav-bar .gov-header__actions {
	display: flex;
	align-items: center;
	gap: 12px;
	padding-right: 20px;
}
.gov-nav-bar .gov-header__actions .btn--secondary {
	font-size: 1rem;
	padding: 12px 22px;
}

.v5-hero-stack .gov-hero__actions {
	justify-content: center;
	margin: 0;
}
.gov-nav > ul > li > a {
	color: var(--text-primary);
	border-right: none;
}
.gov-nav > ul > li > a:hover,
.gov-nav > ul > li.current-menu-item > a,
.gov-nav > ul > li.current-menu-ancestor > a {
	background: transparent;
	color: var(--gov-red);
}
.gov-nav > ul > li.current-menu-item > a {
	border-bottom: 3px solid var(--gov-red);
	margin-bottom: -3px;
}
.gov-nav .sub-menu {
	border-top: 3px solid var(--gov-red);
}
.gov-nav .sub-menu li a:hover {
	background: var(--gov-red-pale);
	color: var(--gov-red);
}

/* Butonul "Monitorul Oficial" — pastilă verde, complet rotunjită */
.btn--secondary {
	background: var(--gov-red);
	color: #fff;
	border-color: var(--gov-red);
	border-radius: 999px;
}
.btn--secondary:hover {
	background: #2f9d64;
	color: #fff;
	border-color: #2f9d64;
}

/* Ascunde butonul "Servicii Online" — rămâne doar Monitorul Oficial */
.gov-header__actions > a.btn--primary {
	display: none;
}

/* Caseta de căutare din hero — eliminată */
.gov-hero__search {
	display: none;
}

/* Căutarea din antet — doar lupă; click deschide caseta ca bandă sub tot
   meniul (la fel ca la v4) */
.gov-header__search {
	flex: 0 0 auto;
	max-width: none;
	display: flex;
	align-items: center;
	margin-right: 12px;
	/* fără position:relative — dropdown-ul (.is-open) se poziționează
	   față de <.gov-nav-bar> (sticky, declarat mai sus), nu față de
	   iconiță, altfel ar apărea doar sub lupă, nu sub tot meniul. */
}
.gov-search-form {
	border: none;
	background: transparent;
	display: flex;
	align-items: center;
	height: 100%;
}
.gov-search-form input {
	display: none;
}
.gov-search-form button {
	background: #1a1a1a;
	color: #fff;
	width: 44px;
	height: 44px;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	border-radius: var(--radius);
}
.gov-search-form button:hover {
	background: var(--gov-red);
	color: #fff;
}
.gov-header__search.is-open .gov-search-form {
	position: absolute;
	top: 100%;
	left: 50%;
	transform: translateX(-50%);
	margin-top: 10px;
	background: #fff;
	border: 1px solid var(--border-light);
	box-shadow: var(--shadow-lg);
	border-radius: var(--radius-lg);
	padding: 16px 24px;
	display: flex;
	align-items: center;
	gap: 10px;
	z-index: 998;
	width: 90vw;
	max-width: 900px;
}
.gov-header__search.is-open .gov-search-form input {
	display: block;
	flex: 1;
	min-width: 0;
	border: 1.5px solid var(--border);
	border-radius: var(--radius);
	padding: 10px 14px;
	font-size: var(--text-base);
	color: var(--text-primary);
}
.gov-header__search.is-open .gov-search-form button {
	background: var(--gov-red);
	color: #fff;
	border-radius: var(--radius);
	padding: 10px 18px;
}
.gov-header__search.is-open .gov-search-form button:hover {
	background: #2f9d64;
	color: #fff;
}

/* Titlu, eyebrow, descriere originale din hero — eliminate. Rămâne doar
   blocul centrat cu numele instituției + meniu + butoane (v5-hero-stack) */
.gov-hero__eyebrow,
.gov-hero__title,
.gov-hero__desc {
	display: none;
}

/* Hero — overlay închis (ca fâșia foto cu titlu din tema de referință) */
.gov-hero__overlay {
	background: linear-gradient(180deg, rgba(20,20,20,0.55) 0%, rgba(20,20,20,0.75) 100%);
}
.gov-hero__label { color: var(--gov-red); }
.gov-hero__title { color: #fff; }
.gov-hero__title em { color: var(--gov-red); }
.gov-hero__desc { color: rgba(255,255,255,0.85); }

/* ================================================================
   AVIZIER ELECTRONIC — 3 coloane (Anunțuri / Hotărâri / Dispoziții),
   coloana din mijloc pe fundal negru cu accent verde în colț
   ================================================================ */
.v5-avizier {
	padding: 50px 0 60px;
	background: var(--surface);
}
.v5-avizier__grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 24px;
}
.v5-avizier__col {
	border: 1px dashed var(--border);
	border-radius: var(--radius-md);
	padding: 28px 24px;
	text-align: center;
	position: relative;
}
.v5-avizier__col--dark {
	background: #1c1c1c;
	border: 1px solid #1c1c1c;
}
.v5-avizier__col--dark::before {
	content: '';
	position: absolute;
	top: 14px;
	left: 14px;
	width: 22px;
	height: 22px;
	border-top: 2px solid var(--gov-red);
	border-left: 2px solid var(--gov-red);
}
.v5-avizier__icon {
	width: 40px;
	height: 40px;
	margin: 0 auto 12px;
	color: var(--gov-red);
}
.v5-avizier__icon svg { width: 100%; height: 100%; }
.v5-avizier__title {
	font-size: 18px;
	font-weight: 700;
	color: var(--gov-red);
	margin-bottom: 18px;
}
.v5-avizier__list {
	list-style: none;
	padding: 0;
	margin: 0;
	text-align: center;
}
.v5-avizier__list li {
	padding: 10px 0;
	border-bottom: 1px dashed var(--border);
	font-size: 14px;
}
.v5-avizier__col--dark .v5-avizier__list li {
	border-bottom-color: rgba(255,255,255,0.15);
}
.v5-avizier__list li:last-child { border-bottom: none; }
.v5-avizier__list a {
	color: var(--text-primary);
	text-decoration: none;
}
.v5-avizier__col--dark .v5-avizier__list a {
	color: rgba(255,255,255,0.85);
}
.v5-avizier__list a:hover { color: var(--gov-red); }
.v5-avizier__empty {
	color: var(--text-muted);
	font-size: 13px;
	font-style: italic;
}

@media (max-width: 900px) {
	.v5-avizier__grid { grid-template-columns: 1fr; }
}

/* ================================================================
   FOOTER — gri închis, accente verzi
   ================================================================ */
.gov-footer {
	background: #3a3a3a;
	border-top: 3px solid var(--gov-red);
}
.gov-footer h5 {
	color: #fff;
	position: relative;
	padding-bottom: 10px;
}
.gov-footer h5::after {
	content: '';
	position: absolute;
	bottom: 0;
	left: 0;
	width: 40px;
	height: 2px;
	background: var(--gov-red);
}
.gov-footer__col a,
.gov-footer__contact-item-text {
	color: rgba(255,255,255,0.75);
}
.gov-footer__col a:hover { color: var(--gov-red); }
.gov-footer__col ul { list-style: none; padding: 0; }
.gov-footer__col li {
	padding-left: 18px;
	position: relative;
}
.gov-footer__col li::before {
	content: '›';
	position: absolute;
	left: 0;
	color: var(--gov-red);
	font-weight: 700;
}
.gov-footer__logo-name,
.gov-footer__tagline { color: #fff; }
.gov-footer__divider { background: rgba(255,255,255,0.1); }
.gov-footer__copyright,
.gov-footer__credit { color: rgba(255,255,255,0.6); }
.gov-footer__legal a { color: rgba(255,255,255,0.75); }

/* Carduri servicii — contur verde la hover (nu negru) */
.gov-service-card:hover {
	border-color: var(--gov-red);
}
.gov-service-card::before {
	background: var(--gov-red);
}
.gov-footer__legal a:hover { color: var(--gov-red); }

/* Iconițe documente (transparență, financiar, formulare) — fundal verde,
   iconiță/text alb. Suprascrie regulile "fixe" ale părintelui (culori
   FIXE, independente de Personalizare) — child theme-ul se încarcă după,
   deci câștigă la egalitate de specificitate. */
.gov-doc-item__icon,
.gov-doc-item__icon--pdf,
.gov-doc-item__icon--doc,
.gov-doc-item__icon--xls,
.gov-fin-doc__icon,
.gov-formular-row__icon {
	background: var(--gov-red) !important;
	color: #fff;
}
.gov-schedule__hours.gov-schedule__hours--closed,
.gov-schedule__row--today .gov-schedule__hours.gov-schedule__hours--closed {
	color: var(--gov-red) !important;
}

/* Butonul "ANUNȚURI" din ticker — verde, ca Monitorul Oficial */
.gov-announcements__label {
	background: var(--gov-red);
	color: #fff;
}

/* Iconițe placeholder — liste mici (anunțuri, arhive) — gri închis,
   iconiță verde (verdele rămâne doar accent, nu fundal masiv) */
.gov-news-item__img-placeholder {
	background: #2b2b2b !important;
}
.gov-news-item__img-placeholder svg {
	stroke: var(--gov-red);
	color: var(--gov-red);
	opacity: 1;
}

/* Placeholder carduri mari (featured, proiecte) — fără iconiță, doar
   fotografia din hero cu overlay gri închis (nu negru pur, ton unitar cu
   restul temei), foarte estompată */
.gov-news-card__img-placeholder svg,
.gov-project-card__img-placeholder svg {
	display: none;
}
.gov-news-card__img-placeholder,
.gov-project-card__img-placeholder {
	background-image:
		linear-gradient(rgba(43,43,43,0.65), rgba(43,43,43,0.65)),
		var(--v5-placeholder-bg, none) !important;
	background-size: cover;
	background-position: center;
}

/* Iconița centrată vertical față de tot blocul de text (chiar dacă
   titlul are 2-3 rânduri) */
.gov-news-item {
	align-items: center;
	box-shadow: none;
}
/* Hover — doar schimbare de culoare pe titlu, fără umbră/fundal */
.gov-news-item:hover {
	box-shadow: none;
	background: transparent;
}
.gov-news-item:hover .gov-news-item__title {
	color: var(--gov-red);
}

/* Pagina de căutare (search.php) — titlul rezultatului devine verde la
   hover. Body-ul primește automat clasa "search" pe pagina de rezultate. */
body.search h3 a:hover {
	color: var(--gov-red);
}
