/* ============================================================
   General Group — foglio di stile unico
   Mobile-first, alto contrasto (blu scuro / bianco / verde)
   ============================================================ */

:root {
  --primary: #00529b;
  --primary-dark: #003b71;
  --accent: #447b2d;            /* NextEra forest-green */
  --accent-dark: #355e21;
  --ne-forest: #447b2d;         /* NextEra forest-green (links/accents) */
  --ne-green-bright: #8cca5d;   /* NextEra bright green (logo/stat) */
  --ne-teal: #0073a8;           /* NextEra teal */
  --ne-dark: #0c2739;           /* NextEra dark navy */
  --ne-charcoal: #404040;       /* NextEra charcoal (body/menu text) */
  --ne-dim: #666666;            /* NextEra dim-gray (muted text) */
  --text: #1a2733;
  --text-light: #46586a;
  --bg: #ffffff;
  --bg-alt: #f2f2f2;            /* NextEra white-smoke */
  --border: #d7e1ea;
  --max-w: 1140px;
  --radius: 10px;
  --shadow: 0 2px 12px rgba(0, 59, 113, 0.10);
  --font-main: Arial, "Helvetica Neue", Helvetica, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

/* Hide the vertical scrollbar (scrolling still works) */
html { scrollbar-width: none; }          /* Firefox */
html { -ms-overflow-style: none; }       /* old Edge / IE */
html::-webkit-scrollbar { width: 0; height: 0; display: none; } /* Chrome, Edge, Safari */

body {
  font-family: var(--font-main);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--primary); }
a:hover { color: var(--primary-dark); }

h1, h2, h3, h4 { line-height: 1.25; color: var(--primary-dark); }
h1 { font-size: clamp(1.75rem, 4.5vw, 2.75rem); }
h2 { font-size: clamp(1.45rem, 3.5vw, 2.1rem); }
h3 { font-size: 1.2rem; }

.container { max-width: var(--max-w); margin: 0 auto; padding: 0 1.25rem; }

section { padding: 3rem 0; }
section.alt { background: var(--bg-alt); }

.section-intro { max-width: 760px; margin: 0.75rem 0 2rem; color: var(--text-light); }

/* ---------- Header / nav ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 6px rgba(0, 59, 113, 0.08);
}

.nav-inner {
  max-width: 1600px;
  margin: 0 auto;
  padding: 0.55rem clamp(1rem, 3vw, 3.5rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; }
.brand img { height: 64px; width: auto; }
.brand-name { font-family: var(--font-main); font-weight: 700; font-size: 1.15rem; color: var(--ne-dark); letter-spacing: 0.01em; }

.nav-toggle {
  display: block;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 0.5rem;
}
.nav-toggle span {
  display: block;
  width: 26px;
  height: 3px;
  margin: 5px 0;
  background: var(--primary-dark);
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

.nav-menu {
  list-style: none;
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow);
  padding: 0.5rem 0 1rem;
}
.nav-menu.open { display: block; }

.nav-menu > li > a {
  display: block;
  padding: 0.8rem 1.5rem;
  font-family: var(--font-main);
  font-weight: 600;
  font-size: 0.97rem;
  text-decoration: none;
  color: var(--ne-charcoal);
}
.nav-menu > li > a:hover { color: var(--ne-forest); background: var(--bg-alt); }

.sub-menu {
  list-style: none;
  background: var(--bg-alt);
}
.sub-menu a {
  display: block;
  padding: 0.65rem 2.5rem;
  text-decoration: none;
  color: var(--text-light);
  font-size: 0.97rem;
}
.sub-menu a:hover { color: var(--primary); }

.nav-cta a {
  display: block;
  margin: 0.75rem 1.5rem 0;
  padding: 0.7rem 1.2rem;
  background: var(--accent);
  color: #fff !important;
  font-weight: 700;
  text-align: center;
  border-radius: var(--radius);
  text-decoration: none;
}
.nav-menu > li.nav-cta > a:hover { background: var(--accent-dark); color: #fff; }

@media (min-width: 920px) {
  .nav-toggle { display: none; }
  .nav-menu {
    display: flex !important;
    position: static;
    align-items: center;
    border: 0;
    box-shadow: none;
    padding: 0;
    background: none;
  }
  .nav-menu > li { position: relative; }
  .nav-menu > li > a { padding: 1.05rem 0.95rem; }
  .nav-menu > li > a:hover { background: none; color: var(--ne-forest); text-decoration: underline; text-underline-offset: 5px; }
  .sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 240px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 0 0 var(--radius) var(--radius);
    box-shadow: var(--shadow);
    padding: 0.4rem 0;
  }
  .sub-menu a { padding: 0.6rem 1.2rem; }
  li.has-sub:hover .sub-menu, li.has-sub:focus-within .sub-menu { display: block; }
  .nav-cta a { margin: 0; padding: 0.55rem 1.1rem; }
}

/* ---------- Breadcrumb ---------- */

.breadcrumb {
  background: var(--bg-alt);
  padding: 0.6rem 0;
  font-size: 0.9rem;
}
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 0.35rem; }
.breadcrumb li + li::before { content: "›"; margin-right: 0.35rem; color: var(--text-light); }
.breadcrumb a { text-decoration: none; }
.breadcrumb [aria-current] { color: var(--text-light); }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  background:
    linear-gradient(rgba(12, 39, 57, 0.35), rgba(12, 39, 57, 0.55)),
    url("../images/pannelli-solari-al-sole.jpg") center/cover no-repeat;
  color: #fff;
  padding: clamp(3rem, 7vw, 5.5rem) 0;
}
.hero-frame {
  max-width: 880px;
  margin: 0 auto;
  text-align: center;
  background: rgba(12, 39, 57, 0.55);
  -webkit-backdrop-filter: blur(7px);
  backdrop-filter: blur(7px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  padding: clamp(2rem, 4vw, 3.25rem) clamp(1.25rem, 4vw, 3rem);
}
.hero h1 { color: #fff; }
.hero p { max-width: 640px; margin: 1rem auto 0; font-size: 1.1rem; }
.hero .btn-group { justify-content: center; margin-top: 1.75rem; }

.page-hero {
  background: var(--primary-dark);
  color: #fff;
  padding: 2.75rem 0;
}
.page-hero h1 { color: #fff; }
.page-hero p { max-width: 720px; margin-top: 0.75rem; color: #d9e6f2; font-size: 1.1rem; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  padding: 0.8rem 1.7rem;
  border-radius: var(--radius);
  font-weight: 700;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  font-size: 1rem;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); color: #fff; }
.btn-outline { border-color: #fff; color: #fff; }
.btn-outline:hover { background: rgba(255, 255, 255, 0.15); color: #fff; }
.btn-blue { background: var(--primary); color: #fff; }
.btn-blue:hover { background: var(--primary-dark); color: #fff; }
.btn-group { display: flex; flex-wrap: wrap; gap: 0.8rem; }

/* ---------- Stats ---------- */

.stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-top: 2.5rem;
}
@media (min-width: 760px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stat {
  background: rgba(12, 39, 57, 0.5);
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius);
  padding: 1.1rem;
  text-align: center;
}
.stat strong { display: block; font-size: 1.85rem; line-height: 1.12; font-weight: 700; color: var(--ne-green-bright); }
.stat span { font-size: 0.9rem; color: #eaf1f6; }

/* ---------- Cards ---------- */

.cards {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .cards.cols-3 { grid-template-columns: repeat(3, 1fr); } }

.card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}
.card img { width: 100%; height: 200px; object-fit: cover; }
.card-body { padding: 1.3rem; display: flex; flex-direction: column; flex: 1; }
.card-body p { color: var(--text-light); margin: 0.6rem 0 1rem; flex: 1; }
.card-body .btn { align-self: flex-start; }

/* ---------- Services (NextEra "Ready to Deliver" style) ---------- */

.services-nextera { padding: clamp(3rem, 6vw, 4.5rem) 0; background: var(--bg-alt); }
.services-nextera .section-head { max-width: 760px; margin: 0 auto 2.5rem; text-align: center; }
.services-nextera h2 {
  font-family: var(--font-main);
  color: var(--ne-dark);
  font-size: clamp(1.7rem, 3.2vw, 2.15rem);
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.services-nextera .section-intro { color: var(--ne-dim); }

/* Alternating full-width rows, come la sezione "Ready to Deliver" di NextEra:
   un cerchio grande per riga, testo a fianco, righe pari specchiate. */
.services-nextera .container { max-width: none; width: 90%; padding: 0; }

.svc-grid {
  display: flex;
  flex-direction: column;
  gap: clamp(2.5rem, 5vw, 4.5rem);
}

.svc-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.5rem;
}
.svc-item img {
  flex: 0 0 auto;
  width: clamp(160px, 24vw, 300px);
  height: clamp(160px, 24vw, 300px);
  object-fit: cover;
  border-radius: 50%;
  background: var(--bg-alt);
}
.svc-body { flex: 0 1 auto; max-width: 42rem; }
.svc-body h3 {
  font-family: var(--font-main);
  color: var(--ne-dark);
  font-size: clamp(1.25rem, 2vw, 1.6rem);
  font-weight: 700;
  margin-bottom: 0.35rem;
}
.svc-body p { color: var(--ne-dim); font-size: 1rem; line-height: 1.55; margin-bottom: 0.5rem; }

@media (min-width: 640px) {
  .svc-item {
    flex-direction: row;
    justify-content: center;
    text-align: left;
    gap: clamp(1.5rem, 4vw, 4rem);
  }
  .svc-item:nth-child(even) { flex-direction: row-reverse; }
}
.svc-link {
  font-family: var(--font-main);
  color: var(--ne-forest);
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.svc-link::after { content: "→"; transition: transform 0.2s; }
.svc-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.svc-link:hover::after { transform: translateX(3px); }

/* ---------- Benefits / checklist ---------- */

.benefits {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
  margin-top: 1.5rem;
}
@media (min-width: 700px) { .benefits { grid-template-columns: repeat(2, 1fr); } }

.benefit {
  display: flex;
  gap: 0.9rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem;
}
.benefit p { color: var(--text-light); font-size: 0.97rem; }

ul.check { list-style: none; margin: 1rem 0; }
ul.check li { padding-left: 1.8rem; position: relative; margin-bottom: 0.55rem; }
ul.check li::before {
  content: "";
  position: absolute;
  left: 0.15rem;
  top: 0.5em;
  width: 0.65em;
  height: 0.32em;
  border-left: 3px solid var(--accent);
  border-bottom: 3px solid var(--accent);
  transform: rotate(-45deg);
}

/* ---------- Steps ---------- */

.steps {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
  counter-reset: step;
  margin-top: 1.5rem;
}
@media (min-width: 700px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .steps { grid-template-columns: repeat(4, 1fr); } }

.step {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem 1.2rem;
}
.step::before {
  counter-increment: step;
  content: counter(step);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  font-size: 1.15rem;
  margin-bottom: 0.8rem;
}
.step p { color: var(--text-light); font-size: 0.97rem; }

/* ---------- Two-column text + image ---------- */

.split {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr;
  align-items: center;
}
@media (min-width: 880px) { .split { grid-template-columns: 1fr 1fr; } }
.split img { border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; object-fit: cover; }

/* ---------- Prose ---------- */

.prose { max-width: 800px; }
.prose p { margin-bottom: 1rem; }
.prose h2 { margin: 2rem 0 0.75rem; }
.prose h3 { margin: 1.5rem 0 0.5rem; }
.prose ul, .prose ol { margin: 0 0 1rem 1.4rem; }
.prose li { margin-bottom: 0.4rem; }
.page-nav {
  margin-top: 1.5rem;
  padding: 0.75rem 1rem;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.95rem;
}
.page-nav a { font-weight: 500; }

/* ---------- Accordion (FAQ) ---------- */

.accordion { max-width: 820px; }
.accordion-item { border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 0.8rem; background: var(--bg); }
.accordion-button {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.2rem;
  background: none;
  border: 0;
  font: inherit;
  font-weight: 600;
  color: var(--primary-dark);
  text-align: left;
  cursor: pointer;
}
.accordion-button::after {
  content: "+";
  font-size: 1.5rem;
  color: var(--accent);
  line-height: 1;
  flex: 0 0 auto;
}
.accordion-item.open .accordion-button::after { content: "–"; }
.accordion-content { display: none; padding: 0 1.2rem 1.1rem; color: var(--text-light); }
.accordion-item.open .accordion-content { display: block; }

/* ---------- Tables ---------- */

table { width: 100%; border-collapse: collapse; margin: 1rem 0; font-size: 0.97rem; }
th, td { border: 1px solid var(--border); padding: 0.65rem 0.8rem; text-align: left; }
th { background: var(--bg-alt); color: var(--primary-dark); }

/* ---------- Forms ---------- */

.form-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.75rem;
  max-width: 560px;
}
.form-group { margin-bottom: 1.1rem; }
.form-group label { display: block; font-weight: 600; margin-bottom: 0.35rem; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font: inherit;
}
.form-group input:focus, .form-group textarea:focus {
  outline: 2px solid var(--primary);
  border-color: var(--primary);
}
.form-note { font-size: 0.85rem; color: var(--text-light); margin-top: 0.8rem; }
.success-message {
  display: none;
  margin-top: 1rem;
  padding: 0.9rem 1.1rem;
  background: #e8f5d8;
  border: 1px solid var(--accent);
  border-radius: 8px;
  color: #2d5009;
}

/* ---------- Calculator ---------- */

.calc-grid { display: grid; gap: 1.5rem; grid-template-columns: 1fr; }
@media (min-width: 880px) { .calc-grid { grid-template-columns: 1fr 1fr; } }
.calc {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}
.calc input {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font: inherit;
  margin: 0.8rem 0;
}
.calc-result { margin-top: 1rem; font-weight: 600; color: var(--primary-dark); }

/* ---------- Brand logos ---------- */

.brands {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  align-items: center;
}
@media (min-width: 760px) { .brands { grid-template-columns: repeat(6, 1fr); } }
.brands a { display: flex; align-items: center; justify-content: center; }
.brands img { max-height: 56px; width: auto; margin: 0 auto; object-fit: contain; filter: grayscale(35%); }
.brands a:hover img, .brands img:hover { filter: none; }

/* ---------- CTA band ---------- */

.cta-band {
  background: linear-gradient(120deg, var(--primary-dark), var(--primary));
  color: #fff;
  text-align: center;
  padding: 3.25rem 0;
}
.cta-band h2 { color: #fff; }
.cta-band p { max-width: 640px; margin: 0.75rem auto 1.5rem; color: #d9e6f2; }
.cta-band .btn-group { justify-content: center; }

/* ---------- Gallery ---------- */

.gallery { display: grid; gap: 1rem; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 760px) { .gallery { grid-template-columns: repeat(3, 1fr); } }
.gallery img { border-radius: var(--radius); height: 210px; width: 100%; object-fit: cover; }

/* ---------- Footer ---------- */

.site-footer { background: var(--primary-dark); color: #c9d9e8; }
.footer-grid {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 3rem 1.25rem 2rem;
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr;
}
@media (min-width: 700px) { .footer-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .footer-grid { grid-template-columns: repeat(4, 1fr); } }

.site-footer h4 { color: #fff; font-size: 1rem; margin-bottom: 0.9rem; letter-spacing: 0.04em; }
.site-footer ul { list-style: none; }
.site-footer li { margin-bottom: 0.45rem; }
.site-footer a { color: #c9d9e8; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer p { font-size: 0.95rem; margin-bottom: 0.6rem; }

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding: 1.1rem 1.25rem;
  text-align: center;
  font-size: 0.88rem;
}

/* ---------- Utilities ---------- */

.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.text-center { text-align: center; }

.skip-link {
  position: absolute;
  left: -9999px;
  background: var(--primary-dark);
  color: #fff;
  padding: 0.6rem 1rem;
  z-index: 200;
}
.skip-link:focus { left: 0; top: 0; }
