/* ============================================================
   AmicoEnergia.it — Global Stylesheet
   Font: Poppins
   Colore primario: #FFC400 (giallo-oro)
   Colore secondario: #FD7702 (arancione bottoni CTA)
   Testo: #000000
   ============================================================ */

:root {
  --yellow:       #FFC400;
  --yellow-dark:  #e6b000;
  --yellow-light: #FFF3CC;
  --light-blue:   #EEECFF;
  --orange:       #FD7702;
  --orange-dark:  #e06600;
  --black:        #000000;
  --text:         #000000;
  --text-light:   #374151;
  --white:        #ffffff;
  --off-white:    #f8fafc;
  --gray-light:   #e5e7eb;
  --gray:         #6b7280;
  --shadow-y:     0 4px 20px rgba(255,196,0,0.25);
  --shadow-o:     0 4px 20px rgba(253,119,2,0.25);
  --radius:       10px;
  --radius-lg:    18px;
  --transition:   0.2s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Poppins', 'Segoe UI', sans-serif;
  color: var(--text);
  background: var(--white);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1,h2,h3,h4 { line-height: 1.25; font-weight: 700; }
h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
h3 { font-size: clamp(1.05rem, 2vw, 1.3rem); }

.container  { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.section    { padding: 72px 0; }
.section-sm { padding: 48px 0; }
.text-center { text-align: center; }
.bg-off-white { background: var(--off-white); }
.bg-yellow-soft { background: var(--yellow-light); }

/* BUTTONS */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 28px; border-radius: 50px;
  font-weight: 700; font-size: 0.95rem; font-family: inherit;
  cursor: pointer; border: none; transition: var(--transition);
  text-decoration: none; white-space: nowrap;
}
/* CTA principale: arancione (come "Chiama ora" nel WP) */
.btn-primary { background: var(--orange); color: #fff; }
.btn-primary:hover { background: var(--orange-dark); transform: translateY(-1px); box-shadow: var(--shadow-o); }
/* Bottone giallo (come "Scopri di più") */
.btn-yellow { background: var(--yellow); color: var(--black); }
.btn-yellow:hover { background: var(--yellow-dark); transform: translateY(-1px); box-shadow: var(--shadow-y); }
/* Outline */
.btn-outline { background: transparent; color: var(--orange); border: 2px solid var(--orange); }
.btn-outline:hover { background: var(--orange); color: #fff; }
/* Bianco (su sfondi colorati) */
.btn-white { background: #fff; color: var(--black); }
.btn-white:hover { background: var(--off-white); }

/* HEADER */
#site-header {
  position: sticky; top: 0; z-index: 1000;
  background: #fff; box-shadow: 0 2px 16px rgba(0,0,0,0.08);
}
.header-inner {
  display: flex; align-items: center;
  justify-content: space-between; gap: 16px; height: 72px;
}
.header-logo img { height: 44px; width: auto; }

.nav-menu { display: flex; align-items: center; gap: 4px; list-style: none; }
.nav-menu > li { position: relative; }
.nav-menu > li > a {
  display: block; padding: 8px 14px;
  font-weight: 600; font-size: 0.87rem; color: var(--text);
  border-radius: 6px; transition: var(--transition); white-space: nowrap;
}
.nav-menu > li > a:hover { color: var(--orange); background: var(--yellow-light); }

.nav-dropdown {
  display: none; position: absolute; top: calc(100% + 6px); left: 0;
  background: #fff; border: 1px solid var(--gray-light);
  border-radius: var(--radius); box-shadow: 0 8px 32px rgba(0,0,0,0.12);
  min-width: 220px; padding: 8px 0; list-style: none; z-index: 200;
}
/* Ponte trasparente che copre il gap tra voce menu e dropdown */
.nav-menu > li > a::after {
  content: ''; position: absolute;
  top: 100%; left: 0; width: 100%; height: 10px;
}
.nav-menu > li:hover .nav-dropdown { display: block; }
.nav-dropdown a {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 18px; font-size: 0.87rem; font-weight: 500;
  color: var(--text); transition: var(--transition);
}
.nav-dropdown a:hover { background: var(--yellow-light); color: var(--orange); }
.nav-dropdown a img { width: 20px; height: 20px; flex-shrink: 0; }

/* Header phone — giallo come nel WP */
.header-phone {
  display: flex; align-items: center; gap: 8px;
  background: var(--yellow); color: var(--black);
  padding: 9px 20px; border-radius: 50px;
  font-weight: 700; font-size: 0.9rem; transition: var(--transition);
}
.header-phone:hover { background: var(--yellow-dark); }
.header-phone svg { width: 16px; height: 16px; flex-shrink: 0; }

/* Hamburger — giallo come nel WP */
.hamburger {
  display: none; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 10px;
  background: var(--yellow); border: none; cursor: pointer;
  flex-direction: column; gap: 5px; padding: 10px;
}
.hamburger span { display: block; width: 22px; height: 2.5px; background: var(--black); border-radius: 2px; transition: var(--transition); }

@media (max-width: 960px) {
  .hamburger { display: flex; }
  .nav-desktop { display: none; }
}
  .header-phone { font-size: 0.8rem; padding: 8px 14px; }
}

/* FOOTER */
#site-footer { background: #111827; color: rgba(255,255,255,0.8); padding: 56px 0 0; }
.footer-grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 48px;
}
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-logo { height: 40px; margin-bottom: 16px; filter: brightness(0) invert(1); }
.footer-info p { font-size: 0.85rem; line-height: 1.7; margin-bottom: 2px; }
.footer-info a { color: rgba(255,255,255,0.7); }
.footer-info a:hover { color: #fff; }
.footer-col h4 {
  color: var(--yellow); font-size: 0.78rem; font-weight: 700;
  letter-spacing: 1px; text-transform: uppercase; margin-bottom: 16px;
}
.footer-col ul { list-style: none; }
.footer-col ul li+li { margin-top: 8px; }
.footer-col ul a { font-size: 0.88rem; color: rgba(255,255,255,0.65); transition: var(--transition); }
.footer-col ul a:hover { color: #fff; padding-left: 4px; }
.footer-badges {
  display: flex; flex-wrap: wrap; align-items: center; gap: 14px;
  padding: 20px 0; border-top: 1px solid rgba(255,255,255,0.1);
}
.footer-badges img { height: 36px; width: auto; opacity: 0.8; transition: var(--transition); }
.footer-badges img:hover { opacity: 1; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1); padding: 18px 0;
  display: flex; flex-wrap: wrap; gap: 16px;
  align-items: center; justify-content: space-between;
  font-size: 0.82rem; color: rgba(255,255,255,0.45);
}
.footer-bottom a { color: rgba(255,255,255,0.6); }
.footer-bottom a:hover { color: #fff; }
.footer-legal { display: flex; gap: 16px; flex-wrap: wrap; }
@media(max-width:560px) {
  #site-footer { background: #111827 !important; color: rgba(255,255,255,0.8) !important; }
  #site-footer a { color: rgba(255,255,255,0.7) !important; }
  .footer-col h4 { color: #fff !important; }
  .footer-info p { color: rgba(255,255,255,0.7) !important; }
  .footer-bottom { flex-direction: column; align-items: flex-start; color: rgba(255,255,255,0.45) !important; }
  .footer-legal { gap: 10px; }
}

/* STICKY WIDGET */
#sticky-widget { position: fixed; bottom: 24px; right: 24px; z-index: 500; }
.sticky-trigger, .sticky-toggle {
  display: flex; align-items: center; gap: 10px;
  background: var(--orange); color: #fff;
  padding: 13px 20px; border-radius: 50px;
  font-weight: 700; font-size: 0.88rem;
  box-shadow: 0 4px 24px rgba(253,119,2,0.4);
  cursor: pointer; border: none; transition: var(--transition); font-family: inherit;
}
.sticky-trigger:hover, .sticky-toggle:hover { background: #e56a00; transform: translateY(-2px); }
.sticky-trigger svg, .sticky-toggle svg { width: 18px; height: 18px; flex-shrink: 0; }
.sticky-chevron { transition: transform 0.3s; }
#sticky-widget.open .sticky-chevron { transform: rotate(180deg); }
.sticky-popup {
  display: none;
  position: fixed;
  bottom: 80px;
  right: 24px;
  top: 80px;
  width: 340px;
  max-height: calc(100vh - 160px);
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 40px rgba(0,0,0,0.22);
  flex-direction: column;
  z-index: 499;
  overflow: hidden;
}
.sticky-popup.open { display: flex; }
.sticky-popup-header, .sticky-header {
  background: var(--orange); color: #fff; padding: 14px 18px;
  display: flex; justify-content: space-between; align-items: center;
  flex-shrink: 0; font-size: 0.9rem; font-weight: 700;
}
.sticky-popup-header h3 { font-size: 0.95rem; }
.sticky-popup-header p { font-size: 0.78rem; opacity: 0.85; margin-top: 2px; }
.sticky-close { background: none; border: none; color: #fff; font-size: 1.4rem; cursor: pointer; line-height: 1; padding: 0; margin-left: 10px; flex-shrink: 0; }
.sticky-form { padding: 14px 16px; overflow-y: auto; flex: 1; }
.sticky-form .form-group { margin-bottom: 10px; }
.sticky-form .form-group input {
  width: 100%; padding: 10px 12px; border: 1.5px solid var(--gray-light);
  border-radius: 8px; font-size: 0.85rem; font-family: inherit;
  box-sizing: border-box; transition: var(--transition);
}
.sticky-form .form-group input:focus { outline: none; border-color: var(--orange); }
.sticky-form .form-check {
  display: flex; gap: 8px; align-items: flex-start;
  margin-bottom: 8px; font-size: 0.75rem; color: var(--gray);
  line-height: 1.5; width: 100%;
}
.sticky-form .form-check input[type=checkbox] {
  flex-shrink: 0; width: 15px; height: 15px; margin-top: 2px;
  accent-color: var(--orange);
}
.sticky-form .form-check span { flex: 1; min-width: 0; word-wrap: break-word; }
.sticky-consensi { background: #f8fafc; border: 1px dashed #e2e8f0; border-radius: 8px; padding: 10px 12px; margin: 8px 0 12px; }
.sticky-form .btn { width: 100%; justify-content: center; font-size: 0.88rem; padding: 11px; }
}
.sticky-popup-header h3 { font-size: 0.95rem; }
.sticky-popup-header p { font-size: 0.78rem; opacity: 0.85; margin-top: 2px; }
.sticky-close { background: none; border: none; color: #fff; font-size: 1.4rem; cursor: pointer; line-height: 1; padding: 0; margin-left: 10px; flex-shrink: 0; }
.sticky-form { padding: 16px; overflow-y: auto; flex: 1; }
.sticky-form .field { margin-bottom: 10px; }
.sticky-form input {
  width: 100%; padding: 10px 13px;
  border: 1.5px solid var(--gray-light); border-radius: 8px;
  font-size: 0.88rem; font-family: inherit; transition: var(--transition); box-sizing: border-box;
}
.sticky-form input:focus { outline: none; border-color: var(--orange); }
.sticky-form .privacy-check { display: flex; gap: 8px; align-items: flex-start; margin-bottom: 8px; font-size: 0.73rem; color: var(--gray); width: 100%; }
.sticky-form .privacy-check input[type=checkbox] { flex-shrink: 0; width: 16px; height: 16px; margin-top: 2px; accent-color: var(--orange); }
.sticky-form .privacy-check span { flex: 1; min-width: 0; word-wrap: break-word; line-height: 1.5; }
.sticky-form .privacy-check a { color: var(--orange); text-decoration: underline; }
.sticky-submit {
  width: 100%; background: var(--orange); color: #fff; border: none;
  padding: 13px; border-radius: 50px; font-weight: 700; font-size: 0.95rem;
  cursor: pointer; transition: var(--transition); font-family: inherit; margin-top: 8px;
}
.sticky-submit:hover { background: var(--orange-dark); }
.sticky-success { display: none; padding: 24px; text-align: center; color: var(--orange); font-weight: 700; font-size: 1rem; }
.sticky-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 10px; }
.sticky-row-2 input { width: 100%; padding: 10px 13px; border: 1.5px solid var(--gray-light); border-radius: 8px; font-size: 0.85rem; font-family: inherit; transition: var(--transition); box-sizing: border-box; }
.sticky-row-2 input:focus { outline: none; border-color: var(--orange); }
.sticky-consensi { background: #f8fafc; border: 1px dashed #e2e8f0; border-radius: 10px; padding: 10px 12px; margin: 10px 0 12px; width: 100%; box-sizing: border-box; overflow: visible; }
.privacy-link { display: inline-block; color: #0ea5e9; text-decoration: underline; font-size: 0.72rem; margin: 2px 0 8px 26px; }
@media (max-width: 480px) {
  #sticky-widget { bottom: 16px; right: 16px; }
  .sticky-popup { width: calc(100vw - 32px); right: 16px; bottom: 72px; max-height: calc(100vh - 90px); }
  .sticky-label { display: none; }
}

/* PAGE HERO */
.page-hero {
  background: var(--yellow);
  color: var(--black); padding: 64px 0 72px;
}
.page-hero h1 { margin-bottom: 12px; }
.page-hero p { font-size: 1.05rem; opacity: 0.8; max-width: 580px; }

/* SECTION TITLE */
.section-title { margin-bottom: 44px; }
.section-title h2 { margin-bottom: 8px; }
.section-title p { font-size: 1rem; color: var(--text-light); max-width: 560px; }
.section-title.center { text-align: center; }
.section-title.center p { margin: 0 auto; }
.divider { width: 52px; height: 4px; background: var(--yellow); border-radius: 2px; margin: 10px 0 18px; }
.section-title.center .divider { margin: 10px auto 18px; }

/* CARD */
.card { background: #fff; border: 1px solid var(--gray-light); border-radius: var(--radius-lg); overflow: hidden; transition: var(--transition); }
.card:hover { box-shadow: var(--shadow-y); transform: translateY(-2px); }

/* FORMS */
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 0.88rem; font-weight: 600; margin-bottom: 6px; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 12px 15px; border: 1.5px solid var(--gray-light);
  border-radius: 8px; font-size: 0.95rem; font-family: inherit; color: var(--text); transition: var(--transition);
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
  outline: none; border-color: var(--orange); box-shadow: 0 0 0 3px rgba(253,119,2,0.1);
}
.form-group textarea { resize: vertical; min-height: 120px; }
.form-check { display: flex; gap: 8px; align-items: flex-start; margin-bottom: 10px; font-size: 0.82rem; color: var(--gray); }
.form-check input[type=checkbox] { flex-shrink: 0; margin-top: 2px; accent-color: var(--orange); }
.form-check a { color: var(--orange); text-decoration: underline; }

/* NEWS CARDS */
.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 28px; }
.news-card { border-radius: var(--radius-lg); overflow: hidden; background: #fff; border: 1px solid var(--gray-light); transition: var(--transition); display: block; }
.news-card:hover { box-shadow: var(--shadow-y); transform: translateY(-3px); }
.news-card-img { width: 100%; aspect-ratio: 16/9; object-fit: cover; background: var(--gray-light); }
.news-card-body { padding: 20px; }
.news-card-date { font-size: 0.78rem; color: var(--gray); margin-bottom: 6px; }
.news-card-title { font-size: 1rem; font-weight: 700; margin-bottom: 8px; color: var(--text); line-height: 1.35; }
.news-card-excerpt { font-size: 0.85rem; color: var(--text-light); line-height: 1.6; margin-bottom: 14px; }
.news-card-link { font-size: 0.85rem; font-weight: 700; color: var(--orange); }

/* REVIEWS */
.reviews-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; }
.review-card { background: #fff; border: 1px solid var(--gray-light); border-radius: var(--radius-lg); padding: 22px; }
.review-stars { color: #f9a825; font-size: 1.1rem; margin-bottom: 8px; }
.review-text { font-size: 0.88rem; color: var(--text-light); line-height: 1.6; margin-bottom: 10px; font-style: italic; }
.review-author { font-size: 0.85rem; font-weight: 700; color: var(--text); }
.review-ago { font-size: 0.75rem; color: var(--gray); }

/* AWARDS */
.awards-grid { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; }
.award-item {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  width: 150px; text-align: center; padding: 18px 10px;
  border-radius: var(--radius); background: var(--off-white);
  font-size: 0.75rem; color: var(--gray); line-height: 1.4;
}
.award-item img { width: 72px; height: 72px; object-fit: contain; }
.award-year { font-size: 0.68rem; font-weight: 700; color: var(--orange); letter-spacing: 1px; text-transform: uppercase; }

/* ANIMATIONS */
@keyframes fadeInUp { from{opacity:0;transform:translateY(20px);} to{opacity:1;transform:translateY(0);} }
.fade-in { animation: fadeInUp 0.5s ease forwards; }
