/* Star Solar – Agrisolare (page-specific) */
:root{
  --dark:#0B1220;
  --green:#1E7F4F;
  --green2:#17663F;
  --border:#E5E8EF;
  --muted:#607080;
  --surface:#F6F8FB;
  --soft:#F7FAF9;
  --blue:#223589;
}

*{ box-sizing:border-box; margin:0; padding:0; }
body{
  font-family:'Inter', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background:#fff;
  color:var(--dark);
}
a{ color:inherit; }
img{ max-width:100%; display:block; }

/* ===== HEADER ===== */
header{
  position:fixed;
  top:0;
  width:100%;
  background:rgba(255,255,255,0.85);
  backdrop-filter: blur(8px);
  z-index:1000;
}
.nav-container{
  width:65%;
  margin:0 auto;
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:18px 0;
  position:relative;
}
.logo img{ height:45px; display:block; }
nav a{
  margin-left:25px;
  text-decoration:none;
  font-weight:700;
  color:var(--dark);
}
nav a:hover{ color:var(--green); }

.menu-toggle{
  display:none;
  width:44px;
  height:44px;
  border-radius:14px;
  border:1px solid rgba(11,18,32,0.10);
  background:rgba(255,255,255,0.9);
  cursor:pointer;
  align-items:center;
  justify-content:center;
}
.menu-toggle svg{ width:22px; height:22px; color:var(--dark); }

@media(max-width:1000px){
  .nav-container{ width:90%; }
  nav a{ margin-left:14px; }
}
@media(max-width:700px){
  header nav{ display:none; }
  .menu-toggle{ display:inline-flex; }
}
@media(max-width:400px){
  .nav-container{ justify-content:center; }
  .logo{ display:flex; justify-content:center; width:100%; }
  .menu-toggle{ position:absolute; right:0; }
  .logo img{ height:42px; max-width:200px; width:auto; }
}

/* ===== MOBILE MENU ===== */
.mobile-menu{
  position:fixed;
  inset:0;
  background:rgba(11,18,32,0.55);
  backdrop-filter: blur(10px);
  display:none;
  z-index:1500;
}
.mobile-menu.open{ display:block; }

.mobile-drawer{
  position:absolute;
  top:14px;
  left:14px;
  right:14px;
  background:#fff;
  border-radius:22px;
  border:1px solid var(--border);
  box-shadow:0 22px 80px rgba(0,0,0,0.28);
  overflow:hidden;
}
.mobile-drawer-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:14px 16px;
  border-bottom:1px solid #EEF2F7;
}
.mobile-drawer-brand img{ height:34px; display:block; }
.mobile-close{
  width:44px;
  height:44px;
  border-radius:14px;
  border:1px solid var(--border);
  background:#fff;
  cursor:pointer;
  font-size:18px;
}
.mobile-links{
  display:flex;
  flex-direction:column;
  padding:10px 6px 14px;
}
.mobile-links a{
  padding:14px 14px;
  margin:4px 8px;
  border-radius:16px;
  text-decoration:none;
  font-weight:900;
  color:var(--dark);
  background:var(--surface);
  border:1px solid #EEF2F7;
}
.mobile-links a:hover{
  background:#EEF8F3;
  border-color:rgba(30,127,79,0.22);
  color:var(--green);
}

/* ===== HERO SLIDER (stessa altezza standard) ===== */
.hero{
  width:70%;
  margin:90px auto 0;
  height:72vh;
  min-height:520px;
  border-radius:20px;
  overflow:hidden;
  position:relative;
  background:#000;
}
.hero-slides{ position:absolute; inset:0; }
.hero-slide{
  position:absolute;
  inset:0;
  background-size:cover;
  background-position:center;
  background-repeat:no-repeat;
  opacity:0;
  transform:scale(1.02);
  transition:opacity 900ms ease, transform 1200ms ease;
}
.hero-slide::before{
  content:"";
  position:absolute;
  inset:0;
  background:linear-gradient(180deg, rgba(0,0,0,0.10) 0%, rgba(0,0,0,0.62) 100%);
}
.hero-slide.is-active{ opacity:1; transform:scale(1); }

.hero-content{
  position:absolute;
  left:44px;
  right:44px;
  top:70%;
  transform:translateY(-50%);
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  color:#fff;
  pointer-events:none;
}
.hero-text{ max-width:820px; pointer-events:auto; }
.hero-title{
  font-size:44px;
  font-weight:900;
  line-height:1.05;
  letter-spacing:-0.02em;
}
.hero-desc{
  font-size:18px;
  margin-top:14px;
  color:rgba(255,255,255,0.92);
  line-height:1.45;
}

.hero-button{
  position:absolute;
  right:44px;
  bottom:58px;
  background:var(--green);
  color:#fff;
  padding:14px 22px;
  border-radius:12px;
  font-weight:900;
  text-decoration:none;
  transition:.25s ease;
  border:none;
  box-shadow:0 12px 34px rgba(0,0,0,0.25);
  z-index:5;
}
.hero-button:hover{ background:var(--green2); }

.hero-dots{
  position:absolute;
  left:50%;
  transform:translateX(-50%);
  bottom:26px;
  display:flex;
  gap:12px;
  z-index:5;
}
.hero-dot{
  width:10px; height:10px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,0.65);
  background:rgba(255,255,255,0.25);
  cursor:pointer;
  transition:transform .2s ease, background .2s ease, border-color .2s ease;
}
.hero-dot:hover{ transform:scale(1.15); }
.hero-dot.is-active{ background:var(--green); border-color:var(--green); }

@media(max-width:1000px){
  .hero{ width:90%; height:60vh; min-height:400px; }
  .hero-content{ left:22px; right:22px; top:62%; }
  .hero-title{ font-size:30px; }
  .hero-desc{ font-size:16px; }
  .hero-button{ right:22px; bottom:56px; }
  .hero-dots{ bottom:22px; }
}
@media(max-width:400px){
  .hero-content{ top:20%; transform:none; }
  .hero-button{ left:50%; right:auto; transform:translateX(-50%); }
}

/* ===== SEZIONI ===== */
.section{ padding:54px 0; }
.page-wrap{ width:65%; margin:0 auto; }
@media(max-width:1100px){ .page-wrap{ width:90%; } }

.center-title{
  text-align:center;
  font-size:34px;
  font-weight:950;
  letter-spacing:-0.02em;
}
.center-lead{
  width:90%;
  max-width:980px;
  margin:14px auto 0;
  text-align:center;
  color:#2c2c2c;
  font-size:16.5px;
  line-height:1.75;
}
@media(max-width:700px){
  .center-title{ font-size:26px; }
  .center-lead{ width:100%; font-size:15.8px; }
}

.kpi-grid{
  margin-top:22px;
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:14px;
}
.kpi{
  border:1px solid var(--border);
  border-radius:18px;
  background:#fff;
  box-shadow:0 14px 46px rgba(0,0,0,0.05);
  padding:16px 16px 14px;
}
.kpi-title{
  font-weight:950;
  color:var(--dark);
  font-size:14px;
  letter-spacing:0.04em;
  text-transform:uppercase;
}
.kpi-value{
  margin-top:8px;
  font-size:22px;
  font-weight:950;
  letter-spacing:-0.01em;
}
.kpi-note{
  margin-top:6px;
  color:var(--muted);
  font-size:13.8px;
  line-height:1.5;
}
@media(max-width:700px){
  .kpi-grid{ grid-template-columns:1fr; }
}

/* ===== BANDO (SEO) ===== */
.section-soft{ background:#f7faf9; }
.two-col{
  margin-top:18px;
  display:grid;
  grid-template-columns:1.2fr 0.8fr;
  gap:16px;
  align-items:start;
}
.card-soft{
  border:1px solid var(--border);
  border-radius:22px;
  background:#fff;
  box-shadow:0 18px 60px rgba(0,0,0,0.06);
  padding:18px;
}
.card-soft h3{
  font-size:18px;
  font-weight:950;
  letter-spacing:-0.01em;
}
.card-soft p{ margin-top:10px; color:#2c2c2c; line-height:1.7; }
.muted{ color:var(--muted); }

.list-check{ margin-top:10px; padding-left:0; display:grid; gap:10px; }
.list-check li{
  list-style:none;
  display:flex;
  gap:10px;
  align-items:flex-start;
  line-height:1.55;
  color:#2c2c2c;
}
.list-check li::before{
  content:"✓";
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:22px;
  height:22px;
  border-radius:999px;
  background:rgba(30,127,79,0.14);
  color:var(--green);
  font-weight:950;
  margin-top:2px;
  flex:0 0 22px;
}

.note-box{
  margin-top:12px;
  border:1px solid rgba(34,53,137,0.22);
  background:rgba(34,53,137,0.06);
  border-radius:16px;
  padding:12px;
  color:#223589;
  line-height:1.6;
}
.cta-row{
  margin-top:14px;
  display:flex;
  gap:12px;
  flex-wrap:wrap;
}
.btn-solid{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:14px 20px;
  border-radius:999px;
  background:var(--green);
  color:#fff;
  text-decoration:none;
  font-weight:950;
  box-shadow:0 16px 40px rgba(0,0,0,0.14);
  transition:transform .2s ease, background .2s ease;
}
.btn-solid:hover{ background:var(--green2); transform:translateY(-1px); }

.btn-outline-dark{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:14px 20px;
  border-radius:999px;
  border:1px solid rgba(11,18,32,0.18);
  color:var(--dark);
  text-decoration:none;
  font-weight:900;
  background:#fff;
  transition:transform .2s ease, background .2s ease;
}
.btn-outline-dark:hover{ background:#EEF2F7; transform:translateY(-1px); }

@media(max-width:1100px){
  .two-col{ grid-template-columns:1fr; }
}

/* ===== GALLERY + LIGHTBOX ===== */
.gallery-wrap{
  width:70%;
  margin:0 auto;
}
@media(max-width:900px){ .gallery-wrap{ width:90%; } }

.gallery-head{ margin-bottom:12px; }
.gallery-title{
  font-size:22px;
  font-weight:950;
  letter-spacing:-.01em;
}
.gallery-title.center{ text-align:center; width:100%; }

.gallery{
  position:relative;
  border-radius:22px;
  border:1px solid var(--border);
  background:#fff;
  box-shadow:0 18px 60px rgba(0,0,0,0.08);
  overflow:hidden;
}
.gallery-viewport{ overflow:hidden; }
.gallery-track{
  display:flex;
  transition:transform .45s ease;
  will-change:transform;
}

.thumb{
  flex:0 0 33.333%;
  aspect-ratio: 16/10;
  position:relative;
  cursor:pointer;
  background:#0b1220;
}
.thumb img{
  width:100%;
  height:100%;
  object-fit:cover;
  transform:scale(1.02);
  transition:transform .5s ease, filter .5s ease;
  filter:saturate(1.05) contrast(1.02);
}
.thumb::after{
  content:"";
  position:absolute;
  inset:0;
  background:linear-gradient(180deg, rgba(0,0,0,0.0) 0%, rgba(0,0,0,0.32) 100%);
  opacity:.65;
}
.thumb:hover img{
  transform:scale(1.08);
  filter:saturate(1.12) contrast(1.04);
}

.gallery-arrow{
  position:absolute;
  top:50%;
  transform:translateY(-50%);
  width:44px;
  height:44px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,0.22);
  background:rgba(11,18,32,0.55);
  color:#fff;
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  opacity:0;
  pointer-events:none;
  transition:opacity .2s ease, background .2s ease;
}
.gallery:hover .gallery-arrow{ opacity:1; pointer-events:auto; }
.gallery-arrow:hover{ background:rgba(30,127,79,0.75); }
.gallery-arrow.prev{ left:14px; }
.gallery-arrow.next{ right:14px; }
.gallery-arrow svg{ width:18px; height:18px; }

@media(max-width:900px){
  .thumb{ flex-basis:100%; }
}

.lightbox{
  position:fixed;
  inset:0;
  z-index:2200;
  background:rgba(11,18,32,0.86);
  display:none;
}
.lightbox.open{ display:flex; }
.lightbox-inner{
  width:min(1100px, 100%);
  margin:auto;
  padding:18px;
  position:relative;
}
.lightbox-img{
  width:100%;
  max-height:82vh;
  object-fit:contain;
  border-radius:18px;
  background:#000;
}
.lightbox-close{
  position:absolute;
  top:10px;
  right:10px;
  width:44px;
  height:44px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,0.22);
  background:rgba(11,18,32,0.55);
  color:#fff;
  cursor:pointer;
  font-size:18px;
}
.lightbox-nav{
  position:absolute;
  top:50%;
  transform:translateY(-50%);
  width:50px;
  height:50px;
  border-radius:16px;
  border:1px solid rgba(255,255,255,0.22);
  background:rgba(11,18,32,0.55);
  color:#fff;
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center;
}
.lightbox-nav:hover{ background:rgba(30,127,79,0.75); }
.lightbox-prev{ left:10px; }
.lightbox-next{ right:10px; }

/* ===== CONTATTI + FOOTER (uguale base sito) ===== */
.contact-section{ width:100%; padding:70px 0; background:#fff; }
.contact-inner{
  width:70%;
  margin:0 auto;
  display:grid;
  grid-template-columns:1.15fr 0.85fr;
  gap:28px;
  align-items:stretch;
}
.contact-kicker{
  font-size:24px;
  font-weight:950;
  letter-spacing:1px;
  color:var(--green);
  text-align:center;
  margin-bottom:10px;
}
.contact-subtitle{
  width:95%;
  margin:0 auto 12px;
  text-align:center;
  color:var(--muted);
  font-size:15.5px;
  line-height:1.6;
}
.contact-form{
  margin-top:10px;
  border:1px solid var(--border);
  border-radius:22px;
  padding:18px;
  background:linear-gradient(180deg, #FFFFFF 0%, #F7FAF9 100%);
  box-shadow:0 18px 60px rgba(0,0,0,0.06);
}
.contact-grid{ display:grid; grid-template-columns:1fr 1fr; gap:14px; }
.field label{
  display:block;
  font-size:13px;
  font-weight:900;
  color:var(--dark);
  margin:0 0 6px 0;
  text-align:center;
}
.field input, .field select, .field textarea{
  width:100%;
  padding:12px 13px;
  border-radius:14px;
  border:1px solid var(--border);
  background:#fff;
  color:var(--dark);
  outline:none;
  font-family:inherit;
  font-size:14.5px;
  transition: box-shadow .18s ease, border-color .18s ease;
}
.field textarea{ resize:vertical; }
.field input:focus, .field select:focus, .field textarea:focus{
  border-color: rgba(30,127,79,0.55);
  box-shadow:0 0 0 4px rgba(30,127,79,0.12);
}
.span-2{ grid-column:1 / -1; }

.consent-row{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:14px;
  flex-wrap:wrap;
  padding-top:6px;
}
.check{
  display:flex;
  gap:10px;
  align-items:flex-start;
  font-size:13.5px;
  color:var(--muted);
  line-height:1.35;
}
.check input{ margin-top:3px; }

.btn-primary{
  border:none;
  background:var(--green);
  color:#fff;
  padding:12px 18px;
  border-radius:14px;
  font-weight:950;
  cursor:pointer;
  box-shadow:0 12px 34px rgba(30,127,79,0.22);
}
.btn-primary:hover{ background:var(--green2); }

.map-card{
  border-radius:22px;
  overflow:hidden;
  border:1px solid var(--border);
  background:#fff;
  box-shadow:0 18px 60px rgba(0,0,0,0.08);
  height:100%;
  display:flex;
  flex-direction:column;
}
.map-head{
  padding:16px 16px 12px;
  background:linear-gradient(180deg, #FFFFFF 0%, #F6F8FB 100%);
  border-bottom:1px solid #EEF2F7;
}
.map-title{ font-weight:950; }
.map-sub{ margin-top:6px; color:var(--muted); font-size:13.5px; }
.map-embed{ flex:1; background:#f2f2f2; }
.map-embed iframe{ width:100%; height:100%; border:0; }

@media(max-width:1100px){
  .contact-inner{ width:90%; grid-template-columns:1fr; }
  .contact-grid{ grid-template-columns:1fr; }
  .map-embed{ height:320px; }
}
@media(max-width:767px){
  .consent-row{ flex-direction:column; gap:16px; }
  .btn-primary{ margin:0 auto; }
}
@media(min-width:768px){
  .consent-row{ gap:28px; justify-content:space-between; }
  .consent-row .btn-primary{ margin-left:auto; }
}

footer{
  background:var(--dark);
  color:#fff;
  padding:56px 0 28px;
}
.footer-inner{
  width:70%;
  margin:0 auto;
  display:grid;
  grid-template-columns:1.2fr 1fr 0.8fr;
  gap:22px;
  align-items:end;
  padding-bottom:22px;
  border-bottom:1px solid rgba(255,255,255,0.10);
}
.footer-brand{ font-weight:950; font-size:18px; margin-bottom:10px; }
.footer-contact{
  margin-top:10px;
  font-size:14px;
  line-height:1.6;
  color:rgba(255,255,255,0.78);
}
.footer-contact a{ color:rgba(255,255,255,0.88); text-decoration:none; }
.footer-contact a:hover{ color:#fff; text-decoration:underline; }

.footer-right{ display:flex; justify-content:flex-end; gap:10px; }
.social{
  width:40px;
  height:40px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,0.14);
  display:flex;
  align-items:center;
  justify-content:center;
  color:rgba(255,255,255,0.82);
  text-decoration:none;
  transition:background .2s ease, transform .2s ease, color .2s ease;
}
.social svg{ width:18px; height:18px; }
.social:hover{ background:rgba(30,127,79,0.18); color:#fff; transform:translateY(-1px); }

.footer-legal{
  width:70%;
  margin:18px auto 0;
  text-align:center;
  font-size:13px;
  color:rgba(255,255,255,0.75);
}
.footer-policies-bottom{
  width:70%;
  margin:10px auto 0;
  text-align:center;
  font-size:13px;
}
.footer-policies-bottom a{ color:rgba(255,255,255,0.85); text-decoration:none; }
.footer-policies-bottom a:hover{ color:#fff; text-decoration:underline; }

@media(max-width:1100px){
  .footer-inner{ width:90%; grid-template-columns:1fr; align-items:start; }
  .footer-right{ justify-content:center; }
  .footer-legal, .footer-policies-bottom{ width:90%; }
}

/* Category cards 3x2 */
.cards{
  width:70%;
  margin:26px auto 0;
  display:grid;
  grid-template-columns: repeat(3, 400px);
  justify-content:center;
  gap:24px;
}
.cat{
  border-radius:18px;
  border:1px solid var(--border);
  background:#fff;
  padding:18px;
  box-shadow:0 14px 46px rgba(0,0,0,0.05);
  min-height:370px;
  display:flex;
  flex-direction:column;
  gap:10px;
  text-align:left;
}
.cat:hover{

}
.cat.active{

}
.cat .tag{
  display:block;
  font-size:12px;
  font-weight:950;
  letter-spacing:.06em;
  text-transform:uppercase;
  color:var(--green);
  text-align:center;
}
.cat-media{
  width:100%;
  margin:8px 0 8px 0;
  border-radius:16px;
  overflow:hidden;
  border:1px solid rgba(229,232,239,0.85);
  background:#0B1220;
}
.cat-media img{
  width:100%;
  height:200px;
  object-fit:cover;
}
.cat h3{
  font-size:16px;
  font-weight:950;
  letter-spacing:-.01em;
  text-align:center;
}
.cat p{
  color:var(--muted);
  font-size:13.5px;
  line-height:1.55;
  text-align:left;
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
  min-height: calc(1.55em * 2);
}

@media(max-width:1400px){
  .cards{grid-template-columns:repeat(3, minmax(0, 400px))}
}
@media(max-width:1100px){
  .cards{width:90%;grid-template-columns:1fr}
  .cat{max-width:520px;margin:0 auto;min-height:0}
  .cat p{-webkit-line-clamp:3;min-height:0}
}