 *{
  margin: 0;
  padding: 0;
   box-sizing: border-box;
}
 :root {
      --tile-size: clamp(120px, 18vw, 240px);
      --tile-radius: 18px;
    }
    * { 
      box-sizing: border-box;
     }
     body {
    
      min-height: 100%;
      font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, 'Helvetica Neue', Arial, 'Noto Sans', 'Liberation Sans', sans-serif;
      color: #fff;
      background: #f7f8f9;
    }

    /* Sección con scroll “dirigido” */
    .escena {
      height: 220vh; /* da espacio para que ocurra la animación al hacer scroll */
      position: relative;
    }
    .escena .sticky {
      position: sticky;
      top: 0;
      height: 100vh;
      overflow: hidden;
      isolation: isolate; /* z-index limpio */
    }

    /* Fondo de la ciudad */
    .bg {
      z-index: 10;
      position: absolute;
      inset: 0;
      background-image: url(img/bandera_sanlucar.gif);
      will-change: transform, filter;
      transform: scale(1.15);
      filter: brightness(0.75) saturate(1) contrast(1.05) blur(6px);
      z-index: 0;
    }
    .bg::after {
      content: "";
      position: absolute; inset: 0;
      background: linear-gradient(180deg, rgba(0,0,0,.55) 0%, rgba(0,0,0,.2) 40%, rgba(0,0,0,.6) 100%);
      pointer-events: none;
    }

    /* Título opcional */
    .titulo {
      position: absolute;
      inset: 0;
      display: grid;
      place-items: center;
      text-align: center;
      z-index: 2;
      padding: 4vmin;
    }
    .titulo h1 {
      margin: 0 0 .5rem;
      font-size: clamp(28px, 6vw, 74px);
      letter-spacing: .02em;
      text-shadow: 0 6px 30px rgba(0,0,0,.55);
    }
    .titulo p {
      margin: 0;
      font-size: clamp(14px, 2.2vw, 20px);
      opacity: .9;
    }

    /* Tarjetas (5 monumentos) */
    .monumento {
      position: absolute;
      left: 50%;
      top: 50%;
      width: var(--tile-size);
      aspect-ratio: 3/4; /* cambia a 1/1 y añade border-radius: 50% si prefieres círculos */
      object-fit: cover;
      border-radius: var(--tile-radius);
      box-shadow:
        0 20px 50px rgba(0,0,0,.55),
        0 2px 8px rgba(0,0,0,.25);
      transform: translate(-50%, -50%);
      z-index: 1;
      will-change: transform, opacity, filter;
    }

    /* Etiqueta opcional en cada tarjeta */
    .monumento[data-etiqueta]::after {
      content: attr(data-etiqueta);
      position: absolute;
      left: 10px; bottom: 10px;
      font-size: 12px;
      font-weight: 600;
      padding: 6px 10px;
      border-radius: 999px;
      background: rgba(0,0,0,.55);
      backdrop-filter: blur(2px);
    }

    /* Contenido siguiente para continuar la página */
    .contenido {
      min-height: 120vh;
      padding: 64px 6vw;
      background: #f5f5f6;
    }
    .contenido h2 { margin-top: 0; }

    .header {
  background-size: cover;
  background-position: center;
  margin-bottom: 20px;
  opacity: 0.8;
  position: relative; /* Cambiado a relativo */
  padding-bottom: 20px;
}

.navbar {
  background-color: #eae9ef00;
  padding: 15px 0;
  z-index: 5;
}

.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex; /* Usando Flexbox para la lista */
  justify-content: center;
  align-items: center;
  flex-wrap: wrap; /* Permite que los elementos se envuelvan en pantallas pequeñas */
}

.logo {
  width: 80px;
  height: 50px;
  display: block;
  transition: transform 1.5s linear;
}

.logo:hover {
  transform: rotateY(180deg);
}

.nav-list li {
  margin: 0 10px; /* Reducido el margen para pantallas pequeñas */
}

.nav-list a {
  display: inline-block;
  color: rgb(252, 250, 250);
  text-decoration: none;
  font-weight: bold;
  font-size: 25px;
  padding: 10px 15px;
  border-radius: 6px;
}

.nav-list a:hover {
  color: rgb(207, 221, 14);
  image-resolution: 100dpi;
}

.escudo {
  width: 150px;
  height: auto;
  position: absolute;
  top: 100px;
  left: 30px;
}

.header-content {
  width: 90%;
  margin: 38px auto 0;
  text-align: center;
}

.header-content h1, .header-content p {
  cursor: pointer;
  transition: color 0.3s ease;
  padding: 10px;
  border-radius: 8px;
}

.header-content h1 {
  font-size: 35px;
  color: rgb(108, 153, 244);
}

.header-content p {
  font-size: 25px;
  background-color: #9e9ee716;
}

.header-content h1:hover, .header-content p:hover {
  color: #4f80e2;
}

.info {
  border-radius: 8px;
  text-align: center;
  display: none;
  margin-top: 10px;
  font-style: italic;
  color: #5c89e3ec;
  font-size: 30px;
}

main {
  flex-grow: 1; /* Permite que el mapa ocupe el espacio restante */
  
}
main h1 {
  margin-top: 20px;
  margin-bottom: 20px;
  color: #333;
  text-align: center;
  font-family: ' 'Arial Narrow'
}

#map {
  height: 70vh;
  width: 100%; /* Asegura que el mapa ocupe todo el ancho disponible */
}

.footer {
  background-color: #333;
  color: white;
  text-align: center;
  padding: 1rem;
  margin-top: 30px;
  width: 100%;
}
/* Estilo para el cursor sobre los marcadores */
.leaflet-marker-icon {
 cursor: pointer;
}

/* Estilo opcional para que el popup se vea mejor */
.leaflet-popup-content-wrapper {
 border-radius: 8px;
}

.leaflet-popup-content {
 font-weight: bold;
}

/* ------------------------------------------- */
/* Media Queries */
/* ------------------------------------------- */

/* Estilos para pantallas pequeñas (móviles) */
@media screen and (max-width: 600px) {
  .nav-list li {
    margin: 5px;
  }
  
  .nav-list a {
    font-size: 18px;
    padding: 8px 10px;
  }

  .header {
    background-image: none !important; /* Elimina la imagen de fondo en móvil para mayor legibilidad */
    height: auto;
  }

  .escudo {
    width: 100px; /* Tamaño del escudo más pequeño */
    position: static; /* Quita el posicionamiento absoluto */
    margin: 10px auto;
  }

  .header-content h1 {
    font-size: 24px;
  }
  
  .header-content p {
    font-size: 16px;
  }

  .info {
    font-size: 18px;
  }

  #map {
    height: 50vh; /* Mapa un poco más pequeño en móviles */
  }

  .footer {
    padding: 0.8rem;
  }
}