/*
Theme Name: Smart Instal
Theme URI: https://smart-greenenergy.ro/
Author: Smart Instal SRL
Description: Temă bloc (FSE) pentru site-ul Smart Instal – energie verde, Deva.
Version: 0.3.0
Requires at least: 6.6
Requires PHP: 8.2
License: GPL-2.0-or-later
Text Domain: smartge
*/

/* Culorile, fonturile și spațierea sunt în theme.json. Aici: doar ce nu se poate exprima acolo. */

html { scroll-behavior: smooth; scroll-padding-top: 7rem; }
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { transition: none !important; animation: none !important; }
}
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }

/* ---------- Header ---------- */
.smartge-header { position: sticky; top: 0; z-index: 50; transition: box-shadow .2s ease; box-shadow: 0 1px 0 var(--wp--preset--color--line); }
.admin-bar .smartge-header { top: var(--wp-admin--admin-bar--height, 0); }
/* Header-ul pe toată lățimea, dar conținutul aliniat la coloana de 1200px a paginii. */
.smartge-topbar, .smartge-mainbar {
	padding-left: max(var(--wp--preset--spacing--50), calc((100% - 1200px) / 2)) !important;
	padding-right: max(var(--wp--preset--spacing--50), calc((100% - 1200px) / 2)) !important;
}
.smartge-logo { margin: 0; flex-shrink: 0; }

/* „Acasă” e redundant pe prima pagină (logo-ul duce acolo); în meniul mobil deschis rămâne vizibil. */
body.home .smartge-header .wp-block-navigation__container > .smartge-nav-home { display: none; }
body.home .smartge-header .wp-block-navigation__responsive-container.is-menu-open .smartge-nav-home { display: flex; }
.smartge-logo img { height: 64px; width: auto; display: block; }

.smartge-header .wp-block-navigation-item__content { padding: .35rem 0; position: relative; }
.smartge-header .wp-block-navigation .wp-block-navigation-item__content::after {
	content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
	background: var(--wp--preset--color--green-bright); transform: scaleX(0); transform-origin: left; transition: transform .2s ease;
}
.smartge-header .wp-block-navigation-item:hover > .wp-block-navigation-item__content::after,
.smartge-header .wp-block-navigation-item__content[aria-current]::after { transform: scaleX(1); }
.smartge-header .wp-block-navigation__submenu-container .wp-block-navigation-item__content::after { display: none; }

/* Submeniuri */
.smartge-header .wp-block-navigation__submenu-container {
	border: 1px solid var(--wp--preset--color--line) !important; border-radius: 12px;
	box-shadow: var(--wp--preset--shadow--lift); padding: .5rem !important; min-width: 270px !important;
}
.smartge-header .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
	padding: .5rem .75rem !important; border-radius: 8px; font-weight: 500; font-family: var(--wp--preset--font-family--body);
}
.smartge-header .wp-block-navigation__submenu-container .wp-block-navigation-item__content:hover { background: var(--wp--preset--color--blue-light); }

.smartge-header-phone {
	display: inline-flex; align-items: center; gap: .4rem; white-space: nowrap; text-decoration: none;
	font-family: var(--wp--preset--font-family--heading); font-weight: 700; color: var(--wp--preset--color--navy);
}
.smartge-header-phone svg { color: var(--wp--preset--color--green); }
.smartge-header-cta .wp-block-button__link { white-space: nowrap; }

@media (max-width: 1180px) { .smartge-header-phone span { display: none; } }
@media (max-width: 781px) {
	.smartge-logo img { height: 46px; }
	.smartge-hide-mobile { display: none; }
	.smartge-header-cta { display: none; }
	.smartge-header-phone span { display: inline; }
}

/* ---------- Etichete secțiuni ---------- */
.smartge-eyebrow {
	font-family: var(--wp--preset--font-family--heading); font-size: .8rem !important; font-weight: 700;
	letter-spacing: .14em; text-transform: uppercase; color: var(--wp--preset--color--green); margin-bottom: 0 !important;
}
.smartge-eyebrow.is-on-dark { color: var(--wp--preset--color--sun); }
.smartge-eyebrow::before { content: ""; display: inline-block; width: 1.6rem; height: 2px; background: currentColor; vertical-align: middle; margin-right: .6rem; }
.has-text-align-center.smartge-eyebrow::after { content: ""; display: inline-block; width: 1.6rem; height: 2px; background: currentColor; vertical-align: middle; margin-left: .6rem; }

/* ---------- Hero + cifre ---------- */
.smartge-hero .wp-block-cover__image-background { object-position: 70% center; }
.smartge-stats-wrap { margin-top: -3.5rem !important; position: relative; z-index: 2; }
.smartge-stat__num {
	font-family: var(--wp--preset--font-family--heading); font-weight: 800; line-height: 1;
	font-size: clamp(2rem, 4vw, 2.75rem); color: var(--wp--preset--color--blue); margin: 0;
}
.smartge-stats > .wp-block-group { border-left: 3px solid var(--wp--preset--color--green-bright); padding-left: 1rem; }

/* ---------- Carduri ---------- */
.smartge-card { position: relative; height: 100%; transition: box-shadow .25s ease, transform .25s ease, border-color .25s ease; }
.smartge-card:hover, .smartge-card:focus-within { box-shadow: var(--wp--preset--shadow--lift) !important; transform: translateY(-3px); }
.smartge-card .wp-block-heading a { text-decoration: none; color: inherit; }
.smartge-card .wp-block-heading a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; } /* tot cardul e clicabil */
.smartge-card:hover .wp-block-heading a { color: var(--wp--preset--color--blue); }
.smartge-card--row:hover { border-color: var(--wp--preset--color--blue) !important; }
.smartge-card--photo img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; display: block; }
.smartge-card--photo { overflow: hidden; }

.smartge-icon { display: block; flex-shrink: 0; }
.smartge-icon-wrap {
	width: 56px; height: 56px; border-radius: 14px; display: grid; place-items: center; flex-shrink: 0;
	background: var(--wp--preset--color--green-light); color: var(--wp--preset--color--green);
	transition: background .25s ease, color .25s ease;
}
.smartge-icon-wrap.is-blue { width: 48px; height: 48px; background: var(--wp--preset--color--blue-light); color: var(--wp--preset--color--blue); }
.smartge-card:hover .smartge-icon-wrap { background: var(--wp--preset--color--green); color: #fff; }
.smartge-card:hover .smartge-icon-wrap.is-blue { background: var(--wp--preset--color--blue); }

.smartge-card__more {
	display: inline-flex; align-items: center; gap: .35rem; margin-top: .25rem;
	font-family: var(--wp--preset--font-family--heading); font-weight: 650; font-size: .9rem; color: var(--wp--preset--color--blue);
}
.smartge-card__more svg { transition: transform .2s ease; }
.smartge-card:hover .smartge-card__more svg { transform: translateX(4px); }

/* „De ce noi” */
.smartge-check { display: flex; gap: .6rem; align-items: center; }
.smartge-check::before {
	content: "✓"; flex-shrink: 0; width: 1.75rem; height: 1.75rem; border-radius: 50%; display: grid; place-items: center;
	background: var(--wp--preset--color--green); color: #fff; font-size: .95rem;
}

.smartge-photo-accent { position: relative; isolation: isolate; }
.smartge-photo-accent::before {
	content: ""; position: absolute; inset: 1.25rem -1.25rem -1.25rem 1.25rem; border-radius: 16px; z-index: -1;
	background: var(--wp--preset--color--green-light);
}

/* ---------- Bandă titlu + breadcrumb ---------- */
.smartge-band { background-color: var(--wp--preset--color--navy); }
.smartge-band .wp-block-post-title { margin-bottom: .25rem; }
.smartge-band__lead { color: #dfe8f6 !important; max-width: 60ch; }
.smartge-breadcrumb { font-size: .85rem; color: #c9d6ea; display: flex; flex-wrap: wrap; gap: .4rem; }
.smartge-breadcrumb a { color: #fff; text-decoration: none; opacity: .85; }
.smartge-breadcrumb a:hover { opacity: 1; text-decoration: underline; }
.smartge-breadcrumb .sep { opacity: .6; }

/* ---------- Pagină detaliu: conținut + coloană laterală ---------- */
.smartge-prose > h2 { padding-top: .25rem; }
.smartge-prose > h2::after {
	content: ""; display: block; width: 3rem; height: 3px; border-radius: 2px; margin-top: .6rem;
	background: var(--wp--preset--color--green-bright);
}
.smartge-prose ul:not(.wp-block-gallery) li::marker { color: var(--wp--preset--color--green); }
.smartge-sticky { position: sticky; top: 8rem; }
@media (max-width: 781px) { .smartge-sticky { position: static; } }

.smartge-cta-box { box-shadow: var(--wp--preset--shadow--lift); background-image: radial-gradient(120% 80% at 100% 0%, rgba(76,194,58,.28) 0%, transparent 60%); }
.smartge-cta-box__phone { display: flex; align-items: center; gap: .5rem; margin: 0; font-family: var(--wp--preset--font-family--heading); font-weight: 800; font-size: 1.35rem; }
.smartge-cta-box__phone a { text-decoration: none; }
.smartge-cta-box__phone svg { color: var(--wp--preset--color--green-bright); }

.smartge-subnav { border: 1px solid var(--wp--preset--color--line); border-radius: 16px; padding: .75rem; }
.smartge-subnav__title { margin: .25rem .5rem .5rem; font-family: var(--wp--preset--font-family--heading); font-weight: 700; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; }
.smartge-subnav__title a { text-decoration: none; color: var(--wp--preset--color--muted); }
.smartge-subnav ul { list-style: none; margin: 0; padding: 0; }
.smartge-subnav li a {
	display: flex; align-items: center; gap: .65rem; padding: .55rem .6rem; border-radius: 10px;
	text-decoration: none; color: var(--wp--preset--color--contrast); font-size: .95rem; line-height: 1.3;
}
.smartge-subnav li a svg { color: var(--wp--preset--color--green); }
.smartge-subnav li a:hover { background: var(--wp--preset--color--surface); }
.smartge-subnav li.is-current a { background: var(--wp--preset--color--blue-light); color: var(--wp--preset--color--blue-dark); font-weight: 650; }

/* ---------- Diverse ---------- */
.smartge-plain-list { list-style: none; padding-left: 0; }
.smartge-plain-list li { margin-bottom: .4em; }
.smartge-plain-list a { text-decoration: none; opacity: .85; }
.smartge-plain-list a:hover { opacity: 1; text-decoration: underline; }

.wp-block-gallery.has-nested-images figure.wp-block-image img { aspect-ratio: 4 / 3; object-fit: cover; border-radius: 12px; }
.wp-block-gallery.has-nested-images figure.wp-block-image { transition: transform .25s ease; }
.wp-block-gallery.has-nested-images figure.wp-block-image:hover { transform: scale(1.02); }

.wp-block-table { border-radius: 12px; overflow: hidden; border: 1px solid var(--wp--preset--color--line); }
.wp-block-table table { border-collapse: collapse; width: 100%; }
.wp-block-table th { background: var(--wp--preset--color--navy); color: #fff; text-align: left; font-family: var(--wp--preset--font-family--heading); font-weight: 600; }
.wp-block-table td, .wp-block-table th { border: 0; border-bottom: 1px solid var(--wp--preset--color--line); padding: .7em .9em; }
.wp-block-table tbody tr:nth-child(even) { background: var(--wp--preset--color--surface); }
.wp-block-table tbody tr:last-child td { border-bottom: 0; }

.wp-block-file { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; padding: 1rem 1.25rem; border: 1px solid var(--wp--preset--color--line); border-radius: 12px; background: var(--wp--preset--color--surface); }
.wp-block-file a:first-child { font-weight: 600; }
.wp-block-file .wp-block-file__button { border-radius: 999px; padding: .55rem 1.2rem; }

.wp-block-button.is-style-outline > .wp-block-button__link { border-width: 2px; box-shadow: none; }

/* ---------- Formular Contact Form 7 ---------- */
.smartge-form-card > .wp-block-post-content > :first-child { margin-top: 0; }
.smartge-form-card h2 { margin-bottom: .25rem; }
.smartge-form-card h2::after { content: ""; display: block; width: 3rem; height: 3px; border-radius: 2px; margin-top: .6rem; background: var(--wp--preset--color--green-bright); }

.smartge-form { display: grid; gap: 1.1rem; margin-top: 1.5rem; }
.smartge-form__row { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 1.1rem; }
.smartge-form label { display: grid; gap: .4rem; margin: 0; }
.smartge-form label > span:first-child { font-family: var(--wp--preset--font-family--heading); font-weight: 600; font-size: .9rem; color: var(--wp--preset--color--navy); }
.wpcf7-form input:not([type="checkbox"]):not([type="submit"]), .wpcf7-form select, .wpcf7-form textarea {
	width: 100%; box-sizing: border-box; padding: .8rem 1rem; font: inherit; font-size: 1rem; color: var(--wp--preset--color--contrast);
	border: 1px solid var(--wp--preset--color--line); border-radius: 12px; background: var(--wp--preset--color--surface);
	transition: border-color .2s ease, background .2s ease, box-shadow .2s ease;
}
.wpcf7-form ::placeholder { color: #8a95a5; }
.wpcf7-form input:hover, .wpcf7-form select:hover, .wpcf7-form textarea:hover { border-color: #b9c6d8; }
.wpcf7-form input:focus, .wpcf7-form select:focus, .wpcf7-form textarea:focus {
	border-color: var(--wp--preset--color--blue); background: #fff; outline: none;
	box-shadow: 0 0 0 4px var(--wp--preset--color--blue-light);
}
.wpcf7-form select {
	appearance: none; cursor: pointer; padding-right: 2.5rem;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232F63B8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
	background-repeat: no-repeat; background-position: right .9rem center; background-size: 1.1rem;
}
.wpcf7-form textarea { min-height: 8.5rem; resize: vertical; }
.smartge-form__gdpr { font-size: .88rem; color: var(--wp--preset--color--muted); }
.smartge-form__gdpr .wpcf7-list-item { margin: 0; }
.smartge-form__gdpr label { display: flex; gap: .6rem; align-items: flex-start; }
.smartge-form__gdpr input[type="checkbox"] { width: 1.15rem; height: 1.15rem; margin-top: .15rem; accent-color: var(--wp--preset--color--green); flex-shrink: 0; }
.smartge-form__submit { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.25rem; }
.smartge-form__submit > span:last-child { font-size: .85rem; color: var(--wp--preset--color--muted); }
.wpcf7-form input[type="submit"] {
	background: var(--wp--preset--color--green); color: #fff; border: 0; border-radius: 999px; cursor: pointer;
	padding: 1rem 2.2rem; font-family: var(--wp--preset--font-family--heading); font-weight: 650; font-size: 1rem;
	box-shadow: var(--wp--preset--shadow--soft); transition: background .2s ease, transform .2s ease;
}
.wpcf7-form input[type="submit"]:hover { background: var(--wp--preset--color--blue-dark); transform: translateY(-1px); }
.wpcf7-form .wpcf7-spinner { margin: 0; }
.wpcf7-not-valid-tip { font-size: .85rem; margin-top: .3rem; }
.wpcf7-form .wpcf7-not-valid { border-color: #c62828 !important; }
.wpcf7 form .wpcf7-response-output { margin: 1.25rem 0 0; padding: .9rem 1.1rem; border-radius: 12px; font-size: .95rem; }
.wpcf7 form.sent .wpcf7-response-output { background: var(--wp--preset--color--green-light); border-color: var(--wp--preset--color--green); }

/* ---------- Carduri contact ---------- */
.smartge-contact-hero {
	border-radius: 20px; padding: 1.75rem; color: #fff; box-shadow: var(--wp--preset--shadow--lift);
	background: var(--wp--preset--color--navy) radial-gradient(120% 90% at 100% 0%, rgba(76,194,58,.35) 0%, transparent 60%);
}
.smartge-contact-hero__label { margin: 0 0 .35rem; font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--wp--preset--color--sun); font-family: var(--wp--preset--font-family--heading); }
.smartge-contact-hero__phone { display: flex; align-items: center; gap: .6rem; margin: 0; font-family: var(--wp--preset--font-family--heading); font-weight: 800; font-size: clamp(1.6rem, 3vw, 2rem); }
.smartge-contact-hero__phone a { color: #fff; text-decoration: none; }
.smartge-contact-hero__phone svg { color: var(--wp--preset--color--green-bright); }
.smartge-contact-hero__actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.1rem; }
.smartge-pill {
	display: inline-flex; align-items: center; gap: .45rem; padding: .6rem 1.1rem; border-radius: 999px; text-decoration: none;
	font-family: var(--wp--preset--font-family--heading); font-weight: 650; font-size: .92rem;
	background: #fff; color: var(--wp--preset--color--navy); transition: transform .2s ease;
}
.smartge-pill.is-wa { background: #1f8f4e; color: #fff; }
.smartge-pill:hover { transform: translateY(-2px); }

.smartge-contact-list { list-style: none; margin: 0; padding: .5rem 1.25rem; background: #fff; border-radius: 20px; box-shadow: var(--wp--preset--shadow--soft); }
.smartge-contact-list li { display: flex; gap: 1rem; align-items: flex-start; padding: 1rem 0; border-bottom: 1px solid var(--wp--preset--color--line); }
.smartge-contact-list li:last-child { border-bottom: 0; }
.smartge-contact-list li > div { display: grid; gap: .15rem; font-size: .95rem; line-height: 1.5; }
.smartge-contact-list strong { font-family: var(--wp--preset--font-family--heading); color: var(--wp--preset--color--navy); font-size: .9rem; }
.smartge-contact-list span { color: var(--wp--preset--color--muted); }
.smartge-contact-list a { text-decoration: none; font-weight: 600; }

/* Hartă cu încărcare la cerere (consimțământ) */
.smartge-map {
	aspect-ratio: 16 / 6; min-height: 280px; display: grid; place-items: center; text-align: center;
	background: #fff radial-gradient(var(--wp--preset--color--line) 1px, transparent 1px) 0 0 / 18px 18px;
	border: 1px solid var(--wp--preset--color--line); box-shadow: var(--wp--preset--shadow--soft);
	border-radius: 20px; padding: 1.5rem;
}
.smartge-map iframe { width: 100%; height: 100%; border: 0; border-radius: 16px; }
.smartge-map.is-loaded { padding: 0; }
.smartge-map button { border: 0; cursor: pointer; }

/* Buton WhatsApp flotant (doar mobil/tabletă) */
.smartge-wa-float {
	position: fixed; right: 16px; bottom: 16px; z-index: 60;
	width: 56px; height: 56px; border-radius: 50%;
	display: none; place-items: center;
	background: #1f8f4e; color: #fff; box-shadow: 0 6px 18px rgb(0 0 0 / .25);
}
.smartge-wa-float svg { width: 30px; height: 30px; fill: currentColor; }
@media (max-width: 960px) { .smartge-wa-float { display: grid; } }

/* Focus vizibil (accesibilitate) */
:where(a, button, input, select, textarea, summary):focus-visible {
	outline: 3px solid var(--wp--preset--color--sun);
	outline-offset: 2px;
}

.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;
}
