/*
Theme Name: Sienergia
Theme URI: https://www.sienergia.it
Author: Sienergia s.r.l. – Gruppo D'Agostino
Description: Tema del nuovo sito Sienergia. Leggero, responsive, modificabile dall'editor a blocchi (Aspetto → Editor).
Version: 0.1.0
Requires at least: 6.5
Requires PHP: 7.4
License: GPLv2 or later
Text Domain: sienergia
*/

/* ---- Base ---- */
body { -webkit-font-smoothing: antialiased; }
:where(.wp-site-blocks) > * { margin-block-start: 0; }
img { max-width: 100%; height: auto; }

/* ---- Barra superiore ---- */
.sx-topbar a { color: inherit; text-decoration: none; }
.sx-topbar a:hover { color: #fff; }

/* ---- Header ---- */
.sx-header { border-bottom: 1px solid var(--wp--preset--color--line); }
.sx-header .wp-block-navigation a:hover { color: var(--wp--preset--color--green); }
.sx-header .wp-block-site-logo img { height: 52px; width: auto; }

/* ---- Bottoni ---- */
.wp-block-button__link { transition: background-color .15s, border-color .15s; }
.is-style-outline > .wp-block-button__link,
.wp-block-button__link.is-style-outline {
	border: 2px solid var(--wp--preset--color--line-strong) !important;
	color: var(--wp--preset--color--ink) !important;
	background: #fff !important;
}
.is-style-outline > .wp-block-button__link:hover { border-color: var(--wp--preset--color--green) !important; }

/* ---- Etichette / badge ---- */
.sx-badge {
	display: inline-block; font-size: 14px; font-weight: 600;
	color: var(--wp--preset--color--green); background: var(--wp--preset--color--green-soft);
	padding: 6px 12px; border-radius: 999px;
}
.sx-kicker { font-size: 13px !important; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }

/* ---- Lista con spunte ---- */
.sx-checks { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px 20px; }
.sx-checks li { padding-left: 26px; position: relative; color: var(--wp--preset--color--muted); }
.sx-checks li::before {
	content: ""; position: absolute; left: 0; top: .2em; width: 18px; height: 18px;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231f7a2e' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") no-repeat center / contain;
}

/* ---- Card ---- */
.sx-card { border: 1px solid var(--wp--preset--color--line); border-radius: 20px; background: #fff; }
.sx-card--featured { border: 2px solid var(--wp--preset--color--green); background: var(--wp--preset--color--green-tint); position: relative; }
.sx-card .sx-price { background: var(--wp--preset--color--surface); border-radius: 12px; }
.sx-card--featured .sx-price { background: #fff; }
.sx-card > .wp-block-buttons { margin-top: auto; }
.sx-ribbon {
	position: absolute; top: -13px; right: 22px; margin: 0 !important;
	background: var(--wp--preset--color--sun); color: #3a2a00; font-size: 12px; font-weight: 700;
	padding: 4px 10px; border-radius: 999px;
}
.sx-shadow { box-shadow: 0 10px 40px rgba(16,33,47,.08); }

/* ---- Passi del prezzo ---- */
.sx-step { border-radius: 14px; }
.sx-step .sx-num {
	width: 38px; height: 38px; flex: none; border-radius: 50%; color: #fff;
	display: grid; place-items: center; font-weight: 700; margin: 0;
}

/* ---- Tile "Cosa ti serve" ---- */
.sx-tile { border: 1px solid var(--wp--preset--color--line); border-radius: 16px; min-height: 120px; transition: border-color .15s, box-shadow .15s; }
.sx-tile:hover { border-color: var(--wp--preset--color--green); box-shadow: 0 6px 20px rgba(16,33,47,.06); }
.sx-tile a { color: var(--wp--preset--color--ink); text-decoration: none; font-weight: 600; }
.sx-tile a::after { content: ""; position: absolute; inset: 0; }
.sx-tile { position: relative; }
.sx-icon svg { display: block; }

/* ---- Footer ---- */
.sx-footer a { color: #b9cbdb; text-decoration: none; }
.sx-footer a:hover { color: #fff; text-decoration: underline; }
.sx-footer .sx-logo-box { background: #fff; border-radius: 12px; padding: 10px 14px; display: inline-block; }
.sx-footer .sx-logo-box img { height: 40px; width: auto; display: block; }
.sx-portale a { display: inline-flex; align-items: center; gap: 12px; background: #fff; color: var(--wp--preset--color--ink) !important; border-radius: 12px; padding: 10px 16px; min-height: 48px; text-decoration: none !important; }
.sx-portale img { height: 32px; width: auto; }

/* ---- Barra azioni fissa su telefono ---- */
.sx-sticky { display: none; }

/* ---- Moduli (contratto, area clienti) ---- */
.sx-form label { display: block; font-weight: 600; margin: 0 0 6px; }
.sx-form input, .sx-form select, .sx-form textarea {
	width: 100%; min-height: 48px; padding: 10px 14px; font: inherit;
	border: 1.5px solid var(--wp--preset--color--line-strong); border-radius: 12px; background: #fff;
}
.sx-form input:focus, .sx-form select:focus, .sx-form textarea:focus { outline: 3px solid var(--wp--preset--color--green-soft); border-color: var(--wp--preset--color--green); }

/* ---- Responsive ---- */
@media (max-width: 781px) {
	.sx-topbar .sx-hide-s, .sx-header .sx-hide-s { display: none !important; }
	.sx-sticky {
		display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; gap: 10px;
		background: #fff; border-top: 1px solid var(--wp--preset--color--line); padding: 10px 14px;
	}
	.sx-sticky .wp-block-button { flex: 1; }
	.sx-sticky .wp-block-button__link { width: 100%; }
	body { padding-bottom: 72px; }
}

/* Avviso "sito in costruzione" visibile solo nella copia di lavoro */
.sx-staging-note { background: #fff4d6; color: #5a4300; text-align: center; font-size: 14px; padding: 6px 12px; }

/* Voce "Area clienti" nel menu: solo su telefono (su desktop c'è il bottone) */
@media (min-width: 782px) { .wp-block-navigation .sx-show-s { display: none !important; } }
.sx-plain { list-style: none; padding-left: 0 !important; margin: 0; display: flex; flex-direction: column; gap: 8px; }

/* ---- Sezioni home ---- */
.sx-hero { background: linear-gradient(180deg,#f1f8ee 0%,#ffffff 100%); padding-top: clamp(40px,6vw,64px); padding-bottom: clamp(48px,6vw,72px); }
.sx-hero-cols { gap: 48px; align-items: center; }
.sx-hero-text { display: flex; flex-direction: column; gap: 22px; }
.sx-hero-text > * { margin: 0 !important; }
.sx-hero-text .sx-badge { align-self: flex-start; }
.sx-lead { font-size: var(--wp--preset--font-size--large); color: var(--wp--preset--color--muted); max-width: 34em; }
.sx-btn-lg .wp-block-button__link { font-size: 17px; padding: 16px 28px; }
.sx-price-card { background: #fff; border-radius: 24px; padding: 28px; display: flex; flex-direction: column; gap: 10px; }
.sx-price-card > * { margin: 0 !important; }
.sx-card-label { font-size: 14px; font-weight: 600; color: var(--wp--preset--color--subtle); margin-bottom: 6px !important; }
.sx-step { padding: 14px 16px; gap: 14px !important; align-items: center !important; }
.sx-step p { margin: 0; }
.sx-step--blue { background: var(--wp--preset--color--blue-soft); } .sx-step--blue .sx-num { background: var(--wp--preset--color--blue); }
.sx-step--green { background: #eef7ec; } .sx-step--green .sx-num { background: var(--wp--preset--color--green); }
.sx-step--navy { background: var(--wp--preset--color--surface); } .sx-step--navy .sx-num { background: var(--wp--preset--color--navy); }
.sx-small { font-size: 14px; color: var(--wp--preset--color--muted); }
p.sx-small { color: var(--wp--preset--color--subtle); }
.sx-muted { color: var(--wp--preset--color--muted); font-size: 17px; }
.sx-subtle { color: var(--wp--preset--color--subtle); }

.sx-section { padding-top: var(--wp--preset--spacing--50); padding-bottom: var(--wp--preset--spacing--50); }
.sx-section > * + * { margin-top: 32px !important; }
.sx-section-head { gap: 16px; }
.sx-section-head p { margin: 0; }
.sx-section-head .wp-block-group { gap: 8px; }
.sx-dark { background: var(--wp--preset--color--navy); color: #fff; }
.sx-dark h2, .sx-dark h3 { color: #fff; }
.sx-dark .sx-why p { color: var(--wp--preset--color--on-navy); font-size: 15px; }
.sx-why h3 { font-size: 19px; margin: 10px 0 6px; }
.sx-why p { margin: 0; }
.sx-soft { background: var(--wp--preset--color--surface); }

.sx-grid-3, .sx-grid-4, .sx-grid-5, .sx-grid-6 { gap: 20px; }
.sx-card { padding: 26px; gap: 14px !important; }
.sx-card > * { margin: 0 !important; }
.sx-card .sx-price { padding: 14px 16px; font-size: 15px; line-height: 1.7; }
.sx-card .sx-muted { font-size: 15px; }
.sx-card .wp-block-buttons { margin-top: auto !important; padding-top: 4px; }
.sx-kicker--blue { color: #0079a8; } .sx-kicker--green { color: var(--wp--preset--color--green); } .sx-kicker--orange { color: #b5541b; }

.sx-tile { padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.sx-tile p { margin: 0; }
.sx-desk { background: #fff; border-radius: 16px; padding: 20px; margin: 0 !important; color: var(--wp--preset--color--muted); }
.sx-desk strong { color: var(--wp--preset--color--ink); font-family: var(--wp--preset--font-family--heading); font-size: 18px; }

@media (max-width: 781px) {
	.sx-hero-cols { gap: 28px; }
}
