/* ==== BASE RESET ==== */
html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: #000 url('images/Progetto senza titolo.png') center center no-repeat fixed;
  background-size: cover;
  font-family: 'Inter', sans-serif;
  overflow-x: hidden;
  box-sizing: border-box;
}

/* ==== TOP BAR ==== */
#topBar {
  position: relative;
  width: 100%;
  height: 50px;
  z-index: 999;
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  align-items: center;
  color: white;
  padding: 0 100px;
  background-image: url('images/Progetto senza titolo.png');
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center top;
  box-sizing: border-box;
}
.topbar-socials {
  display: flex;
  gap: 12px;
}
.topbar-socials img {
  height: 18px;
  filter: brightness(0) invert(1);
}
.topbar-contact {
  font-size: 15px;
  font-weight: normal;
  font-family: 'Inter', sans-serif;
  margin-left: 10px;
}

/* ==== NAVBAR ==== */
.navbar {
  position: fixed;
  top: 50px;
  left: 0;
  right: 0;
  margin: 0 auto;
  width: calc(100% - 210px);
  background-color: rgba(242, 242, 242, 0.7);
  border-radius: 50px;
  border: 1px solid #00BFFF;
  padding: 12px 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1000;
}
.navbar .logo {
  display: flex;
  align-items: center;
  padding-left: 10px;
  gap: 10px;
}

/* Centra verticalmente logo + testo */
.navbar .logo a {
  display: inline-flex;
  align-items: center;
  gap: 10px; /* mantiene lo spazio tra img e testo */
}

.navbar .logo img {
  height: 40px;
  margin-right: 12px;
}
.navbar .logo span {
  font-size: 20px;
  font-weight: 700;
  font-family: 'Playfair Display', serif;
  color: black;
  text-decoration: none;
}
.navbar .nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
  padding-right: 10px;
}
.navbar .nav-links a {
  background: white;
  border-radius: 30px;
  font-weight: 500;
  padding: 8px 20px;
  color: black;
  text-decoration: none;
  font-family: 'Inter', sans-serif;
  transition: background 0.2s, color 0.2s;
}
.navbar .nav-links a.cta-box {
  background-color: #00BFFF;
  color: white;
  font-weight: 600;
}
.dropdown {
  position: relative;
}
.dropbtn {
  background: white;
  border-radius: 30px;
  font-weight: 500;
  padding: 8px 20px;
  font-family: 'Inter', sans-serif;
  color: black;
  cursor: pointer;
}
.dropdown-content {
  display: none;
  position: absolute;
  background-color: #f9f9f9;
  min-width: 160px;
  box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
  z-index: 1;
  border-radius: 8px;
  top: 100%;
  left: 0;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.dropdown.active .dropdown-content {
  display: block;
  opacity: 1;
  transform: translateY(0);
}
.dropdown-content a {
  padding: 12px 16px;
  text-decoration: none;
  display: block;
  color: black;
  border-radius: 8px;
}
.menu-btn {
  display: none;
}
.menu-icon {
  display: none;
  cursor: pointer;
  padding: 10px;
  background: none;
  border: none;
  z-index: 1100;
}
.nav-icon {
  display: block;
  width: 25px;
  height: 3px;
  background: #333;
  position: relative;
  transition: background 0.3s ease;
}
.nav-icon::before, .nav-icon::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  background: #333;
  left: 0;
  transition: all 0.3s ease;
}
.nav-icon::before { top: -8px; }
.nav-icon::after { top: 8px; }
.menu-btn:checked ~ .menu-icon .nav-icon { background: transparent; }
.menu-btn:checked ~ .menu-icon .nav-icon::before {
  transform: rotate(-45deg);
  top: 0;
}
.menu-btn:checked ~ .menu-icon .nav-icon::after {
  transform: rotate(45deg);
  top: 0;
}

/* ==== HERO SECTION ==== */
.hero {
  padding-top: 90px;
  padding-bottom: 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}
.hero h2 {
  font-size: 48px;
  margin-bottom: 20px;
  color: white;
  font-family: 'Playfair Display', serif;
  text-align: center;
}
.hero p {
  font-size: 20px;
  color: white;
  font-family: 'Inter', sans-serif;
  text-align: center;
  margin-top: 0px;
  margin-bottom: 40px;
}
.contact-box {
  background-color: rgba(0,0,0,0.5);
  padding: 60px;
  border-radius: 20px;
  max-width: 900px;
  width: 100%;
  box-sizing: border-box;
}
.contact-box form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
  max-width: 800px;
}
.form-title {
  color: white;
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 10px;
  text-align: left;
}
.form-row {
  display: flex;
  gap: 20px;
  width: 100%;
}
.form-group {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}
label {
  color: white;
  font-size: 16px;
}
input[type="text"], input[type="email"], select, textarea {
  padding: 12px;
  border-radius: 8px;
  border: none;
  font-size: 16px;
  width: 100%;
  box-sizing: border-box;
  max-width: 100%;
}
textarea {
  padding: 15px;
  resize: vertical;
}
.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  color: white;
}
button[type="submit"] {
  padding: 15px;
  background-color: #00BFFF;
  color: white;
  font-size: 18px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  width: 100px;
  font-weight: bold;
  margin-top: 20px;
}

/* ==== EXTRAS / FOOTER ==== */
.extras {
  margin-top: 60px;
  text-align: center;
  color: white;
  font-family: 'Inter', sans-serif;
}
.brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 20px;
}
.brand img {
  height: 40px;
}
.socials {
  margin-bottom: 20px;
}
.socials a {
  margin: 0 10px;
}
.socials img {
  height: 24px;
  filter: brightness(0) invert(1);
}
hr {
  border: 0;
  border-top: 1px solid white;
  width: 280px;
  margin: 20px auto;
}
.policies {
  font-size: 14px;
}
.policies a {
  color: white;
  text-decoration: none;
  margin-right: 20px;
}
.brand span {
  font-size: 20px;
  font-weight: 700;
  font-family: 'Playfair Display', serif;
  color: white;
}

/* ==== MEDIA QUERIES (MOBILE) ==== */
@media (max-width: 992px) {
  img { 
    max-width: 100%; 
    height: auto; 
  }
  .navbar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    background: white !important;
    padding: 10px 15px !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    border-radius: 0 !important;
    z-index: 1000 !important;
    border-bottom: 1px solid #eee !important;
    min-height: 60px !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1) !important;
    box-sizing: border-box !important;
  }
  .logo {
    margin: 0 auto !important;
    padding-left: 0 !important;
    display: flex !important;
    align-items: center !important;
  }
  .logo a {
    gap: 6px !important;
    display: flex !important;
    align-items: center !important;
  }
  .logo img {
    height: 35px !important;
    margin-right: 0 !important;
  }
  .logo span {
    font-size: 18px !important;
  }
  .menu-icon {
    display: block !important;
    position: absolute !important;
    right: 15px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    margin: 0 !important;
    cursor: pointer !important;
    z-index: 1200 !important;
    padding: 5px !important;
    background: none !important;
    border: none !important;
  }
  .nav-icon {
    display: block;
    width: 18px;
    height: 2px;
    background: #333;
    position: relative;
    transition: background 0.3s ease;
  }
  .nav-icon::before, .nav-icon::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: #333;
    left: 0;
    transition: all 0.3s ease;
  }
  .nav-icon::before { top: -5px; }
  .nav-icon::after { top: 5px; }
  .menu-btn:checked ~ .menu-icon .nav-icon { background: transparent; }
  .menu-btn:checked ~ .menu-icon .nav-icon::before {
    transform: rotate(-45deg);
    top: 0;
  }
  .menu-btn:checked ~ .menu-icon .nav-icon::after {
    transform: rotate(45deg);
    top: 0;
  }
  .nav-links {
    position: fixed !important;
    top: 61px !important;
    left: 0 !important;
    width: 100% !important;
    height: auto !important;
    background-color: #f8f8f8 !important;
    padding: 15px !important;
    display: none !important;
    flex-direction: column !important;
    gap: 6px !important;
    z-index: 999 !important;
    box-sizing: border-box !important;
  }
  .menu-btn:checked ~ .nav-links {
    display: flex !important;
  }
  .navbar .nav-links a, .dropbtn {
    display: block !important;
    width: 100% !important;
    padding: 12px 15px !important;
    background: white !important;
    border-radius: 8px !important;
    color: #000 !important;
    text-decoration: none !important;
    font-size: 16px !important;
    font-weight: 500 !important;
    text-align: left !important;
    border: 1px solid #eee !important;
    box-sizing: border-box !important;
  }
  .navbar .nav-links a.cta-box {
    background-color: #00BFFF !important;
    color: white !important;
    border: none !important;
  }
  .dropdown {
    width: 100% !important;
    position: static !important;
    box-sizing: border-box !important;
  }
  .dropdown-content {
    position: static !important;
    width: 100% !important;
    left: 0 !important;
    box-sizing: border-box !important;
    display: none !important;
    padding: 0 !important;
    margin: 5px 0 !important;
    background-color: transparent !important;
    box-shadow: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
  .dropdown-content a {
    background-color: rgba(242,242,242,0.7) !important;
    margin-bottom: 5px !important;
    border-radius: 8px !important;
    padding: 10px 20px !important;
  }
  .dropdown.active .dropdown-content {
    display: block !important;
  }
  body {
    padding-top: 70px !important;
  }
  #topBar {
    display: none !important;
  }
  .hero {
    padding-top: 20px !important;
    padding-left: 20px !important;
    padding-right: 20px !important;
  }
  .hero h2 {
    font-size: 32px !important;
  }
  .hero p {
    font-size: 16px !important;
    padding: 0 20px !important;
  }
  .contact-box {
    padding: 30px 20px !important;
    margin: 0 10px !important;
  }
  .contact-box form .form-row {
    flex-direction: column !important;
    gap: 10px !important;
  }
  html, body {
    overflow-x: hidden;
    width: 100%;
    position: relative;
  }
  .navbar, .nav-links, .dropdown, .dropdown-content, .dropbtn {
    max-width: 100vw !important;
    overflow: hidden !important;
  }
}

/* ==== MEDIA QUERIES (DESKTOP) ==== */
@media (min-width: 993px) {
  .navbar {
    background-color: rgba(242, 242, 242, 0.7);
    border-radius: 50px;
    border: 1px solid #00BFFF;
    left: 0;
    margin: 0 auto;
    padding: 12px 30px;
    position: fixed;
    right: 0;
    top: 50px;
    width: calc(100% - 210px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
  }
  .navbar .logo {
    align-items: center;
    display: flex;
    padding-left: 10px;
  }
  .navbar .nav-links {
    align-items: center;
    display: flex;
    gap: 20px;
    padding-right: 10px;
  }
  .dropdown {
    position: relative;
  }
  .dropdown-content {
    display: none;
    position: absolute;
    background-color: #f9f9f9;
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1;
    border-radius: 8px;
  }
  .dropdown-content a {
    padding: 12px 16px;
    text-decoration: none;
    display: block;
  }
}


.navbar .logo a {
  text-decoration: none !important;
  color: black !important;
  font-family: 'Inter', sans-serif !important;
}
