:root {
  --primary: #0a1f44;
  --accent: #e63946;
  --light: #f1f1f1;
  --dark: #0a0a0a;
}
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  font-family: 'Segoe UI', sans-serif;
  color: var(--dark);
  background-color: var(--light);
  line-height: 1.6;
}
header {
  background: var(--primary);
  color: white;
  padding: 1rem 2rem;
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: auto;
}
.logo {
  font-size: 1.5rem;
  font-weight: bold;
  position: relative;
  z-index: 102;
  display: flex;
  align-items: center;
  padding-left: 20px;
  list-style: none;
}
.img_nav {
  width: 50px; 
  height: 50px;
}
.nav_logo {
  margin-left: 10px;
  font-size: 20px;
  color: #ffc107;
  font-weight: bold;
}
nav {
    display: flex;
    align-items: center;
}
nav a {
  color: white;
  margin-left: 1.5rem;
  text-decoration: none;
  font-size: 1rem;
}

/* HAMBURGER MENU ICON */
.hamburger {
    display: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
    z-index: 102;
}
.hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: white;
    transition: all 0.3s ease;
}

/* LED STATUS */
.led_status {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.span_led_green, .span_led_red {
  width: 12px;
  height: 12px;
  display: inline-block;
  border-radius: 50%;
  box-shadow: inset -1px -1px 3px rgba(0, 0, 0, 0.4), 0 0 5px rgba(0, 255, 0, 0.6);
  background: radial-gradient(circle at 30% 30%, #ccff66, #66cc00);
  margin-left: 5px;
}
.span_led_red {
  box-shadow: inset -1px -1px 3px rgba(0, 0, 0, 0.4), 0 0 5px rgba(255, 0, 0, 0.6);
  background: radial-gradient(circle at 30% 30%, #ff9999, #cc0000);
}

/* DROPDOWN */
.dropdown {
  position: relative;
  display: inline-block;
}
.dropbtn {
  cursor: pointer;
  background: none;
  border: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 20px;
}
.dropdown-content {
  display: none;
  position: absolute;
  background-color: white;
  min-width: 160px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  z-index: 1;
  border-radius: 5px;
  overflow: hidden;
  top: 100%;
  right: 0;
  box-shadow: 0px 8px 16px rgba(0,0,0,0.2);
}
.dropdown-content a {
  color: var(--primary);
  padding: 5px 5px;
  text-decoration: none;
  display: block;
  font-size: 0.9rem;
  transition: background 0.2s;
  margin-left: 0;
}
.dropdown:focus-within .dropdown-content,
.dropdown:hover .dropdown-content {
  display: block;
}

/* HERO SECTION */
.hero {
  position: relative;
  overflow: hidden;
  height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: white;
  padding: 2rem;
}
.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}
.hero h1 {
  font-size: 3rem;
  background: rgba(0,0,0,0.6);
  padding: 1rem;
  border-radius: 10px;
  position: relative;
  z-index: 1;
}

/* SEZIONI E CARD */
.section {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 1rem;
}
.section h2 {
  color: var(--primary);
  margin-bottom: 1rem;
  text-align: center;
}
.sottotitolo {
  text-align: center;
  color: var(--primary);
  width: 600px;
  margin: auto; 
  padding-inline: 10px;
  margin-bottom: 20px;
}
.cards {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}
.card {
  background: white;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  flex: 1 1 300px;
  padding: 1rem;
  transition: transform 0.3s;
}
.card:hover {
  transform: translateY(-5px);
}
.card h3 {
  margin-bottom: 0.5rem;
  color: var(--accent);
}
.card p {
  font-size: 0.9rem;
}

/* OFFERTE UNDER SLIDE */
.offerte_under_slide {
  max-width: 1200px;
  margin: auto;
  margin-top: 10px;
  margin-bottom: 5px;
  display: flex;
  justify-content: space-around;
  align-items: center;
  margin-top: 50px;
  padding: 20px;
  background-color: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  flex-wrap: wrap;
  background-color:rgb(238, 239, 240);
}
.offerta_item {
  flex: 200px;
  width: 300px;
  height: 100px;
  margin: 15px 15px;
  padding: 5px;
  background-color: #fefefe;
  border-left: 5px solid #f39c12;
  border-radius: 8px;
  text-align: left;
  transition: transform 0.3s ease;
}

/* FORM RICERCA NAV */
.form-prev-nav {
    display: inline-flex;
    align-items: center;
    margin: 0 10px;
    background: rgba(255, 255, 255, 0.2);
    padding: 3px 8px;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.3);
}
.form-prev-nav input {
    background: transparent;
    border: none;
    color: inherit;
    padding: 5px;
    font-size: 0.9em;
    width: 130px;
    outline: none;
}
.form-prev-nav input::placeholder {
    color: rgba(255,255,255, 0.7);
}
.form-prev-nav button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.1em;
    padding: 0 5px;
    color: inherit;
}
.form-prev-nav button:hover {
    transform: scale(1.1);
}

/* CONTATTI AGGIUNTIVI */
.header-contatti {
    padding: 30px 0 10px 0;
    text-align: center;
    font-family: Arial, sans-serif;
}
.contact-row {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
}
.contact-item {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    color: #333;
    font-weight: bold;
    font-size: 14px;
    border: 2px solid #ccc;
    padding: 10px 18px;
    border-radius: 50px;
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}
.contact-item:hover {
    background-color: #f0f0f0;
    border-color: #999;
    transform: translateY(-2px);
}
.contact-item img {
    height: 20px;
    width: auto;
    margin-right: 10px;
    vertical-align: middle;
}
.website-link {
    display: inline-block;
    color: #42a5f5 !important;
    text-decoration: none;
    font-size: 14px;
    margin-top: 5px;
    font-weight: bold;
}
.website-link:hover {
    text-decoration: underline;
}

footer {
  background: var(--primary);
  color: white;
  text-align: center;
  padding: 1rem;
}

/* MEDIA QUERIES */
@media screen and (max-width: 798px) {
    .img_nav { display: none; }
    .logo { padding-left: 0px; }
    .dropbtn { margin-left: 0; }
}

@media (max-width: 768px) {
  .hero h1 { font-size: 2rem; }
  .cards { flexDirection: column; alignItems: center; }
  .hamburger { display: flex; }
  
  nav {
      position: absolute;
      top: 100%;
      left: 0;
      width: 100%;
      background-color: var(--primary);
      flex-direction: column;
      align-items: flex-end; 
      padding: 20px 20px 20px 0;
      display: none; 
      box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  }
  nav.active { display: flex; }
  nav a {
      margin: 10px 0;
      display: block;
      text-align: right; 
      width: 100%;
  }
  .dropbtn {
      margin-left: 0;
      margin-top: 10px;
      justify-content: flex-end; 
      width: 100%;
  }
  .dropdown { text-align: right; width: 100%; }
  .dropdown-content {
      position: static;
      width: 100%;
      box-shadow: none;
      background-color: rgba(255,255,255,0.1);
      text-align: right; 
  }
  .dropdown-content a { color: white; padding: 10px; }
  .contact_nav { display: block !important; }
  .form-prev-nav { margin: 15px 0; width: fit-content; }
  .sottotitolo { display: none; }
}

@media (max-width: 600px) {
    .contact-row { flexDirection: column; alignItems: center; }
    .contact-item { width: 90%; justifyContent: center; }
}