body.modal-open {
  overflow:hidden;
}

/* ===== Etiquetas (tags) ===== */
  .species-tags { margin-top: 6px; font-family:'Barlow'; }
  .species-tags .tag {
    font-family:'Barlow';
    display: inline-block;
    background: #eee;
    color: #333;
    font-size: 0.75rem;
    padding: 2px 6px;
    border-radius: 6px;
    margin: 2px;
  }




.species-img {
  width: 100%;
  max-height: 400px; /* ajusta según tu diseño */
  aspect-ratio: 4 / 3; /* opcional, mantiene proporción base */
  border-radius: 8px;
  margin-bottom: 10px;
  background-color: #f5f5f5; /* fondo neutro por si la imagen no llena */
  background-size:cover;
  background-position:center;
  background-repeat:no-repeat;
}

  .species-info p {
    margin: 4px 0;
    font-size: 0.9rem;
  }



  /* ===== Layout general (intro + 2 columnas) ===== */
  .species-intro {
        padding: 2% 5% 0% 5%;
  }

  .species-layout {
    display: flex;
    gap: 20px;
    margin-top: 20px; /* separación respecto al intro */
  }

  /* Columna izquierda: filtros */
  .species-layout .filters {
    flex: 0 0 200px; /* ancho fijo */
    border-right: 1px solid #ddd;
    padding: 10px;
  }

  /* Columna derecha: grilla */
  .species-layout #species {
    flex: 1;
  }

  .species-card {
  background: #FFE8CB;
  padding: 30px 20px;
  border-radius: 12px;
  max-width: 950px;
  overflow: hidden;
}

  /* ===== Modal Species ===== */
  .species-modal {
  color: black;
  display: flex;
  flex-direction: row;
  gap: 20px;
  max-width: 900px;
  margin: 0 auto;
  max-height: 50vh;
  min-height: 0;
}

.species-col-left {
  flex: 1;
  overflow: hidden;
}

.species-col-right {
  flex: 2;
  min-height: 0;
  overflow-y: auto;
  padding-right: 12px;
}

.species-container {
  cursor:pointer;
}

.species-header {
  margin-bottom:10px;
}


  /* ===== Botones de filtro ===== */
  .filters {
    display:flex;
    gap:5px;
    padding:1% 4%;
  }

  .filter-btn {
    font-family:'Barlow';
    display: block;
    width: auto;
    background: #eee;
    border: none;
    padding: 6px 10px;
    margin: 4px 0;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    text-align: left;
    transition: background 0.2s ease, color 0.2s ease;
  }
  .filter-btn:hover {
    background: #ddd;
  }
  .filter-btn.active {
    background: #333;
    color: #fff;
  }

  .filter-legend {
  font-family: 'Barlow', sans-serif;
  color: #333131;
  margin: 10px 0 20px 0;
  padding: 0 5%;
}

details {
  margin:5px;
}

summary{
padding: 1% 2%;
font-family: 'Barlow', sans-serif;
}

.legend-item {
  display: inline-block;
  margin:0px 6px;
  white-space: nowrap;
}

    .species-thumb {
  aspect-ratio: 1 / 1;  
  border-radius: 8px;
  background-size: cover;
  background-position: center;
  border-radius:8px;
      width: 20vw;
    height: 30vh;
}

.species-grid {
    display: flex;
  flex-direction: row;
  justify-content: space-around;
  flex-wrap: wrap;
  height: auto;
  padding: 0% 5% 3% 5%;
}

.chunk {
  margin-bottom: 10px;
  font-family:12px!important;
  padding: 6px;
  background: #f9f9f9;
  border-left: 3px solid #333;
  border-radius: 4px;
}

.chunk strong {
  color: #555;
}

.tag {
  font-family:'Barlow';
  display: inline-block;
  background: #eee;
  color: #333;
  font-size: 0.75rem;
  padding: 2px 6px;
  border-radius: 6px;
  margin-left: 6px; /* small gap from the last word */
}

.ref {
  font-size: 0.7em;
  vertical-align: super;
  margin-left: 2px;
}

.sources-global {
font-family:'Barlow';
line-height:130%;
  margin-top: 1.5rem;
  font-size: 12px;
}

    .mobile-header {
    display:none;
  }


/* ===== MOBILE SPECIES PAGE ===== */
@media only screen and (max-width: 900px) {

  body#urban-nature {
    height: auto;
    min-height: 100vh;
    overflow-x: hidden;
  }

  body#urban-nature .content-container {
    display: flex;
    margin-top: 0;
    padding-bottom: 30px;
  }

  body#urban-nature .sticky-header {
    display: none;
  }

  body#urban-nature footer {
    display: none;
  }

  .species-intro {
    padding: 8% 6% 2% 6%;
  }

  .species-intro h2 {
    font-size: 12vw;
    line-height: 100%;
  }

  .species-intro p {
    font-size: 4.5vw;
    line-height: 130%;
  }

  .filter-legend {
    padding: 0 6%;
    font-size: 13px;
    line-height: 130%;
  }

  .legend-item {
    display: inline-block;
    margin: 3px 5px;
    white-space: normal;
  }

  .filters {
    padding: 2% 6%;
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .filter-btn {
    font-size: 13px;
    padding: 7px 9px;
  }

  .species-grid {
    padding: 4% 4% 10% 4%;
    gap: 14px;
    justify-content: center;
  }

  .species-container {
    width: 44%;
    margin-bottom: 18px;
  }

  .species-thumb {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
  }

  .species-text {
    font-size: 14px;
    line-height: 120%;
  }

  .species-tags {
    text-align: center;
  }

  .species-tags .tag {
    font-size: 11px;
  }

  /* Modal en móvil */
.wd-modal-map {
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.species-card {
  width: 80vw;
  max-height: 60vh;
  overflow-y: auto;
  padding: 18px 14px;
  border-radius: 10px;
}

.species-modal {
  flex-direction: column;
  height: auto;
  max-height: none;
  gap: 12px;
}

.species-col-left,
.species-col-right {
  width: 100%;
  overflow: visible;
}


    .species-header.mobile-header {
    display:block;
  }

  .species-header {
    display:none;
  }

}