* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
}

body {
  background-color: #fffef5;
  color: #222;
  line-height: 1.6;
}

/* HEADER - con immagine di sfondo */
header {
  /* Sostituisci 'URL_DELLA_TUA_IMMAGINE' con il link effettivo della foto di Barcellona */
  background: url('/images/background.webp') no-repeat center center / cover;
  color: #fff;
  padding: 25px 10px;
  text-align: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  position: relative;
  z-index: 10;
  min-height: 250px; /* Assicurati che l'immagine sia visibile */
  display: flex; 
  flex-direction: column;
  justify-content: center; 
}

/* Overlay scuro per migliorare la leggibilità del testo */
header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.4); /* Overlay scuro */
  z-index: 0; 
}

/* Assicurati che il contenuto dell'header sia sopra l'overlay */
header h1, header nav {
    position: relative;
    z-index: 1;
}

/* Titolo luminoso */
@keyframes titleGlow {
  0%,100% { text-shadow: 0 0 5px rgba(255,204,0,0.4); color:#fff; }
  50% { text-shadow: 0 0 25px rgba(255,204,0,0.8); color:#fff8c2; }
}

header h1 {
  font-size: 2.3rem;
  font-weight: 700;
  text-transform: uppercase;
  animation: titleGlow 4s ease-in-out infinite;
}

/* NAV */
header nav ul {
  list-style: none;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 15px;
}

header nav ul li a {
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  padding: 8px 15px;
  border-radius: 5px;
  transition: background 0.3s;
}
header nav ul li a:hover {
  background-color: rgba(255,255,255,0.2);
}

/* MAPPA PRINCIPALE SECTION STYLE (stile uniforme) */
#mapas {
  background: linear-gradient(135deg, #fffef5, #ffcc00, #c8102e);
  color: #222;
  text-align: center;
  padding: 60px 20px;
}

/* MAPPA */
.map-responsive {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  margin: 20px auto;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}
.map-frame {
  position: absolute; top:0; left:0; width:100%; height:100%; border:0;
}

/* BUTTON CATEGORIE */
.category-menu { text-align:center; margin:20px 0; }
.category-menu button {
  background: linear-gradient(90deg,#ffcc00,#c8102e);
  color:#fff; border:none; padding:10px 20px; margin:5px;
  border-radius:25px; font-weight:600; cursor:pointer;
  transition: all 0.3s;
}
.category-menu button:hover {
  background: linear-gradient(90deg,#0044cc,#c8102e);
  transform: translateY(-3px);
}

/* INFO CARD */
.info-card {
  background: rgba(255,255,255,0.9);
  padding:25px; border-radius:12px;
  box-shadow:0 3px 8px rgba(0,0,0,0.15);
  max-width:900px; margin:0 auto; text-align:left;
}
.info-card ul { list-style:none; }
.info-card li { margin:8px 0; }

/* DEPORTE CALLE */
#deporte-calle {
  background: linear-gradient(135deg,#ffcc00,#ff3333,#0044cc);
  color:#fff; text-align:center; padding:60px 20px;
}
#deporte-calle .info-card { background:rgba(255,255,255,0.15); color:#fff; }

/* ATRACCIONES JÓVENES */
#atracciones-jovenes {
  background: radial-gradient(circle at top left,#ffcc00,#c8102e 40%,#0044cc 90%);
  color:#fff; text-align:center; padding:60px 20px;
}

/* FOOTER */
footer {
  background: linear-gradient(90deg,#0044cc,#ffcc00,#c8102e);
  color:#fff; text-align:center; padding:25px 10px;
}

/* TORNA SU */
#backToTop {
  position: fixed;
  bottom: 25px;
  right: 25px;
  background: linear-gradient(135deg, #ffcc00, #c8102e, #0044cc);
  background-size: 200% 200%;
  color: #fff;
  font-size: 1.6rem;
  border: none;
  border-radius: 50%;
  width: 55px;
  height: 55px;
  display: none;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  animation: gradientMove 6s linear infinite;
  z-index: 9999;
}
@keyframes gradientMove {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* MENU HAMBURGER MOBILE */
.hamburger {
  display: none;
  flex-direction: column;
  width: 35px;
  height: 28px;
  position: absolute;
  top: 25px;
  right: 25px;
  cursor: pointer;
  z-index: 1001;
}
.hamburger span {
  height: 4px; background: #fff; border-radius:3px;
  margin:4px 0; transition:all 0.4s ease;
}
.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 6px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(7px, -8px); }

/* MENU ITINERARIOS DENTRO IL MENU */
.menu-itinerarios {
  display: flex;
  flex-direction: column; 
  align-items: center;
  gap: 10px;
  margin-top: 25px;
  margin-bottom: 25px;
}

.menu-itinerarios h3 {
  color: #fff;
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 10px;
}

.menu-itinerarios a {
  background: #fff; 
  color: #c8102e; 
  text-decoration: none;
  border: none;
  padding: 10px 18px;
  border-radius: 20px;
  font-weight: 600;
  width: 220px;
  text-align: center;
  cursor: pointer;
  transition: transform 0.3s, background 0.3s, color 0.3s;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.menu-itinerarios a:hover {
  transform: scale(1.05);
  background: #ffcc00; 
  color: #0044cc; 
}


/* MENU MAPAS INTERNO AL MENU (stile esistente) */
.menu-mapas {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-top: 25px;
}

.menu-mapas h3 {
  color: #fff;
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 10px;
}

.menu-mapas button {
  background: linear-gradient(90deg, #ffcc00, #c8102e);
  color: #fff;
  border: none;
  padding: 10px 18px;
  border-radius: 20px;
  font-weight: 600;
  width: 220px;
  cursor: pointer;
  transition: transform 0.3s, background 0.3s;
}

.menu-mapas button:hover {
  transform: scale(1.05);
  background: linear-gradient(90deg, #0044cc, #c8102e);
}


@media (max-width:768px){
  #navbar {
    position: fixed;
    top:0; left:-100%; width:100%; height:100vh;
    background: linear-gradient(135deg,#c8102e,#ffcc00,#0044cc);
    display:flex; flex-direction:column;
    justify-content:center; align-items:center;
    transition:left 0.4s ease; z-index:1000;
  }
  #navbar.open { left:0; }
  #navbar ul { flex-direction:column; gap:20px; }
  #navbar ul li a { font-size:1.5rem; }
  .hamburger { display:flex; }
  header nav ul { display:none; }
}
/* Regole per schermi più grandi */
@media (min-width: 769px) {
  .menu-itinerarios {
    flex-direction: row; /* Riga su desktop */
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 20px;
  }
  .menu-itinerarios a {
    width: auto; 
    margin: 5px;
  }
  
  .menu-mapas {
    flex-direction: row;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 20px;
  }
  .menu-mapas button {
    width: auto;
    margin: 5px;
  }
}