:root {
  --white: #ffffff;
  --blue: #0b66c3;
  --purple: #6b3fa0;
  --light-purple: #f4efff;
  --light-blue: #eef5ff;
  --text: #222;
  --muted: #666;
  --container: 1200px;
  --shadow: 0 6px 18px rgba(11,102,195,0.08);
}

/* Reset e base */
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: 'Inter','Segoe UI',sans-serif;
  background: var(--white);
  color: var(--text);
  line-height: 1.6;
}
img { max-width: 100%; display: block; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 16px;
}

/* HEADER */
.site-header {
  background: linear-gradient(90deg, #ffffff 25%, var(--blue) 47%, var(--purple) 100%);
  padding: 10px 0;
  position: sticky;
  top: 0;
  z-index: 1000; /* header sotto il menu mobile/overlay */
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.logo {
  height: 68px;
}

/* NAV */
.main-nav {
  display: flex;
  align-items: center;
  gap: 12px;
}
.main-nav a {
  color: var(--white);
  text-decoration: none;
  margin: 0 4px;
  font-weight: 600;
}
.main-nav a.active {
  text-decoration: underline;
}

/* Login form */
.login-form {
  display: flex;
  gap: 6px;
  align-items: center;
}
.login-form input {
  padding: 6px;
  border-radius: 4px;
  border: 1px solid #ddd;
}

/* Buttons */
.btn {
  padding: 8px 14px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
}
.btn-primary {
  background: var(--white);
  color: var(--blue);
  font-weight: 600;
}
.btn-outline {
  background: transparent;
  border: 2px solid var(--blue);
  color: var(--blue);
}

/* CTA PREVENTIVO */
.btn-preventivo {
  background: #cc0000;
  color: white;
  padding: 10px 18px;
  border-radius: 6px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 10px rgba(204,0,0,0.3);
  transition: .2s;
  text-decoration: none;
  display: inline-block;
}
.btn-preventivo:hover {
  background: #e60000;
  transform: translateY(-2px);
}
.hero-ctas { text-align: center; margin-top: 20px; }
.btn-preventivo-mobile {
  background: #cc0000;
  color: white !important;
  padding: 10px 16px;
  border-radius: 6px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-align: center;
}

/* HERO */
.hero {
  display: flex;
  gap: 24px;
  padding: 40px 0;
}
.hero-content h1 {
  color: var(--blue);
  font-size: 32px;
}
.hero-content h2 {
  color: var(--purple);
  font-size: 22px;
}
.hero-content p {
  font-size: 17px;
  margin-bottom: 12px;
}
.hero-img {
  border-radius: 12px;
  object-fit: cover;
}

/* IMPACT STRIP */
.impact-strip {
  background: linear-gradient(90deg, var(--purple), var(--blue));
  color: white;
  padding: 14px;
  text-align: center;
  font-weight: 600;
}

/* HOME SERVICES */
.services-home {
  padding: 40px 0;
}
.services-home h2 {
  text-align: center;
  font-size: 28px;
  margin-bottom: 30px;
}
.services-home-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px,1fr));
  gap: 24px;
}
.service-home-card {
  background: var(--light-blue);
  border-radius: 12px;
  padding: 16px;
  box-shadow: var(--shadow);
  border: 1px solid #d7e3ff;
  transition: transform .25s ease, box-shadow .25s ease;
}
.service-home-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 26px rgba(11,102,195,0.15);
}
.service-home-card img {
  height: 150px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 12px;
}
.service-home-card h3 {
  color: #cc0000;
  margin-bottom: 6px;
  font-size: 20px;
}
.service-home-card p {
  color: var(--muted);
}

/* SERVICES PAGE */
.service-img {
  width: 100%;
  max-height: 260px;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 16px;
}

.service-detail {
  padding: 30px 0;
  border-top: 1px solid #ddd;
}
.feature-list {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 10px;
}
.feature-list li {

  background: var(--light-purple);
  padding: 12px;
  border-radius: 8px;
}
.service-detail h2 {
  color: #cc0000;
}

/* FOOTER A CARD */
.site-footer {
  background: var(--light-blue);
  padding: 20px 0;
  margin-top: 40px;
  font-size: 14px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}

.footer-card {
  background: #fff;
  border: 1px solid #d7e3ff;
  padding: 18px;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(11,102,195,0.08);
  text-align: left;
}

.footer-card h4 {
  margin: 0 0 8px 0;
  color: var(--blue);
  font-size: 18px;
}

.footer-card p {
  margin: 4px 0;
  color: var(--muted);
}

.footer-card a {
  color: var(--purple);
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
  margin-top: 4px;
}

.footer-copy {
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  padding-top: 10px;
  border-top: 1px solid #d0d8e8;
}

/* FORM PREVENTIVO */
.form-preventivo {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.form-preventivo input,
.form-preventivo textarea {
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 16px;
}

.form-preventivo label {
  font-weight: 600;
  color: var(--blue);
}

/* SPAZIATURE GENERALI */
section {
  margin-bottom: 40px;
}

/* HAMBURGER ICON + MOBILE MENU
   - single, authoritative definition for .hamburger and .hamburger span
   - color controlled via .hamburger { color: ... } so we can adapt per header theme
*/
.hamburger {
  display: none;               /* shown via media query */
  width: 40px;
  height: 28px;
  padding: 4px;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  background: transparent;
  border: none;
  z-index: 1500;               /* sopra header e overlay */
  color: #ffffff;              /* default line color (currentColor used by spans) */
}

/* three horizontal bars */
.hamburger span {
  display: block;
  width: 100%;
  height: 3.5px;
  background-color: currentColor;
  border-radius: 3px;
  transition: transform .28s ease, opacity .2s ease, background-color .2s ease;
  box-shadow: none;
}

/* active state -> X */
.hamburger.active span:nth-child(1) {
  transform: translateY(10px) rotate(45deg);
}
.hamburger.active span:nth-child(2) {
  opacity: 0;
  transform: translateX(-10px);
}
.hamburger.active span:nth-child(3) {
  transform: translateY(-10px) rotate(-45deg);
}

/* If you need a light header variant, add class site-header light to header element */
.site-header.light .hamburger { color: var(--blue); }

/* MOBILE MENU
   - menu overlays content, uses dark gradient for contrast
   - aria-hidden attribute toggles display for accessibility
*/
.mobile-menu {
  position: fixed;
  top: 0;
  left: -100%;
  width: 78%;
  max-width: 420px;
  height: 100vh;
  background: linear-gradient(180deg, var(--blue), var(--purple));
  color: #ffffff;
  padding: 40px 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  transition: left .28s ease, opacity .28s ease;
  z-index: 1400;
  overflow-y: auto;
}
.mobile-menu.open {
  left: 0;
  opacity: 1;
}
.mobile-menu[aria-hidden="true"] { display: none; }
.mobile-menu[aria-hidden="false"] { display: flex; }

/* mobile links: white text for contrast */
.mobile-menu a {
  font-size: 18px;
  color: #ffffff;
  text-decoration: none;
  font-weight: 700;
  display: block;
  padding: 12px 8px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  transition: background .18s, padding-left .18s;
}
.mobile-menu a:hover,
.mobile-menu a:active {
  background: rgba(255,255,255,0.04);
  padding-left: 22px;
}

/* Preventivo box in mobile menu */
.mobile-preventivo-box {
  margin-top: 25px;
  padding: 20px 15px;
  background: rgba(255,255,255,0.06);
  border-radius: 10px;
  text-align: center;
}
.mobile-preventivo-testo {
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 12px;
}
.btn-preventivo-mobile {
  display: block;
  padding: 12px;
  background: #ff4d4d;
  color: #fff;
  border-radius: 8px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-decoration: none;
  text-align: center;
}
.btn-preventivo-mobile:hover { background: #e63b3b; }

/* OVERLAY
   - sits below mobile-menu but above page content
*/
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity .28s ease;
  z-index: 1350;
}
.overlay.show {
  opacity: 1;
  pointer-events: all;
}

/* RESPONSIVE */
@media (max-width: 900px) {
  .hero { flex-direction: column; padding: 20px 0; }
  .login-form { display: none; }
  .hamburger { display: flex; }
  .main-nav { display: none; }
}

/* Smaller breakpoints */
@media (max-width: 768px) {
  .hero-content h1 { font-size: 28px; line-height: 1.2; }
  .hero-content h2 { font-size: 20px; }
  .hero-content p { font-size: 16px; }
  .hero-img { max-height: 220px; object-fit: cover; }
  .services-home-grid { grid-template-columns: 1fr; gap: 20px; }
  .service-home-card img { height: 180px; }
  .service-home-card h3 { font-size: 22px; }
  .service-home-card p { font-size: 16px; }
  .service-detail { padding: 20px 0; }
  .service-img { max-height: 200px; }
  .feature-list li { font-size: 15px; padding: 10px; }
  .form-preventivo input, .form-preventivo textarea { font-size: 16px; padding: 12px; }
  .form-preventivo label { font-size: 16px; }
  .footer-grid { grid-template-columns: 1fr; gap: 16px; }
  .footer-card { padding: 14px; }
  .footer-card h4 { font-size: 18px; }
  .footer-copy { font-size: 12px; padding: 10px 0; }
  section { margin-bottom: 30px; }
  .container { padding: 0 12px; }
}

/* Powered by nel footer */
.footer-copy { position: relative; padding-bottom: 12px; }
.powered-by {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
  margin-top: 10px;
  color: #666;
  font-size: 13px;
}
.powered-by .powered-text { font-weight: 600; color: #666; }
.powered-by a { display:inline-flex; align-items:center; text-decoration:none; }
.powered-logo {
  display:inline-block;
  max-height:32px;
  width:auto;
  vertical-align:middle;
  transition: transform .15s ease, opacity .15s ease;
}
.powered-by a:hover .powered-logo,
.powered-by a:focus .powered-logo {
  transform: translateY(-3px);
  opacity: 0.95;
}
@media (max-width:480px) {
  .powered-by { gap:8px; font-size:12px; }
  .powered-logo { max-height:24px; }
}
