/* Font e reset base */
body {
    font-family: 'Bebas Neue', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #fff;
    color: #333;
}

/* Header */
header {
    text-align: center;
    padding: 20px;
    background-color: #222;
    color: white;
}

.logo {
    width: 120px;
    border-radius: 50%;
}

/* Titolo */
h1 {
    margin: 10px 0 0;
    font-size: 40px;
}

/* Dropdown */
.dropdown {
    text-align: center;
    margin-top: 20px;
    position: relative;
}

.dropdown-button {
    background-color: #d32f2f;
    color: white;
    font-size: 22px;
     font-family: 'Bebas Neue', sans-serif;
    padding: 12px 20px;
    border: none;
    cursor: pointer;
    border-radius: 5px;
}

.dropdown-button:hover {
    background-color: #b71c1c;
}

.dropdown-content {
    display: none;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    background-color: white;
    min-width: 200px;
    border: 1px solid #ccc;
    z-index: 1;
    box-shadow: 0px 2px 6px rgba(0,0,0,0.2);
    margin-top: 5px;
}

.dropdown-content.show {
    display: block;
}

.dropdown-link {
    all: unset;
    cursor: pointer;
    padding: 12px 16px;
    display: block;
    font-size: 20px;
    text-align: center;
    color: #333;
}

.dropdown-link:hover {
    background-color: #f2f2f2;
}

/* Pulsanti contatto */
.buttons {
    text-align: center;
    margin: 20px 0;
}

.button {
    background-color: #d32f2f;
    color: white;
    font-size: 20px;
    padding: 12px 24px;
    text-decoration: none;
    border-radius: 5px;
}

.button:hover {
    background-color: #d32f2f;
}
/* Social */
.social {
    text-align: center;
    margin: 10px 0 20px;
    font-size: 18px;
}

.social a {
    color: #222;
    text-decoration: none;
}

.social a:hover {
    text-decoration: underline;
}

/* Mappa e posizione */
.location {
    text-align: center;
    margin: 30px 20px;
    font-size: 18px;
}

.map iframe {
    max-width: 100%;
    border: none;
    border-radius: 8px;
}

/* Form contatti */
.contact-form {
    background-color: #f5f5f5;
    padding: 30px 20px;
    margin: 40px auto;
    max-width: 600px;
    border-radius: 10px;
}

.contact-form h2 {
    text-align: center;
    font-size: 28px;
    margin-bottom: 20px;
}

.contact-form form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.contact-form input,
.contact-form textarea {
    padding: 10px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 5px;
    resize: vertical;
}

.contact-form button {
    background-color: #d32f2f;
    color: white;
    padding: 12px;
    font-size: 18px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.contact-form button:hover {
    background-color:#d32f2f;
}

/* Sezione auto dinamiche */
.hidden {
    display: none;
}

.auto-title {
    font-size: 35px;
    margin-top: 40px;
    text-align: center;
}


/* Footer */
footer {
    text-align: center;
    background-color: #222;
    color: white;
    padding: 15px 0;
    margin-top: 40px;
}
/* --- Stili lista auto e dettagli --- */
.auto-list {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin: 16px auto;
  justify-content: center;
  padding: 0 12px;
}

.auto-card {
  position: relative;
  width: 90vw; /* quasi tutta la larghezza schermo */
  max-width: 320px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 3px 7px rgba(0, 0, 0, 0.12);
  cursor: pointer;
  background-color: #fff;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), 
              box-shadow 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: 'Bebas Neue', sans-serif;
  outline-offset: 4px;
}

.auto-card:focus,
.auto-card:hover {
  transform: scale(1.05) translateY(-6px);
  box-shadow: 0 10px 25px rgba(211, 47, 47, 0.55);
  outline: none;
}

.auto-card:focus-visible {
  outline: 3px solid #d32f2f;
}

.auto-card img {
  width: 100%;
  height: 220px; /* leggermente più alto per mobile */
  object-fit: cover;
  transition: filter 0.3s ease;
  filter: brightness(92%);
  border-bottom-left-radius: 8px;
  border-bottom-right-radius: 8px;
}

.auto-card:hover img,
.auto-card:focus img {
  filter: brightness(100%);
}

.overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(211, 47, 47, 0.88);
  color: #fff;
  padding: 14px 16px;
  transform: translateY(110%);
  transition: transform 0.3s ease;
  font-size: 16px;
  font-weight: 600;
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
}

.auto-card:hover .overlay,
.auto-card:focus .overlay {
  transform: translateY(0);
}

.badge {
  position: absolute;
  top: 14px;
  left: 14px;
  background-color: #fff;
  color: #d32f2f;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 700;
  border-radius: 22px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.overlay h3 {
  margin: 0 0 6px;
  font-size: 20px;
  line-height: 1.1;
}

.overlay p {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
}

/* Media query per tablet e sopra */
@media (min-width: 600px) {
  .auto-card {
    width: 280px;
  }
  .auto-card img {
    height: 180px;
  }
  .overlay {
    font-size: 18px;
    padding: 16px 18px;
  }
  .overlay h3 {
    font-size: 22px;
  }
  .overlay p {
    font-size: 18px;
  }
}

/* Per il carosello dettagli auto */
#dettagli-auto {
  max-width: 480px;
  margin: 20px auto;
  padding: 12px;
  font-family: 'Arial', sans-serif;
  color: #222;
}

#dettagli-auto h2 {
  font-weight: 700;
  font-size: 26px;
  margin-bottom: 12px;
  color: #d32f2f;
}

#dettagli-auto p {
  font-size: 16px;
  line-height: 1.5;
  margin-bottom: 12px;
}

#carosello img {
  border-radius: 10px;
  width: 100%;
  max-height: 300px;
  object-fit: cover;
  user-select: none;
  -webkit-user-drag: none;
}

#prev-btn, #next-btn {
  position: absolute;
  top: 50%;
  background: rgba(211, 47, 47, 0.85);
  border: none;
  color: #fff;
  font-size: 28px;
  cursor: pointer;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  line-height: 48px;
  text-align: center;
  transform: translateY(-50%);
  transition: background-color 0.3s ease;
  user-select: none;
}

#prev-btn:hover, #next-btn:hover,
#prev-btn:focus, #next-btn:focus {
  background-color: #b02626;
  outline: none;
}

#prev-btn {
  left: 12px;
}

#next-btn {
  right: 12px;
}
