/* ================================================
   VARIABLES DE SECCIÓN + ESTILOS GENERALES
================================================ */
.section { padding: 6rem 0; }

.section--intro     { background: var(--green-darkest); }
.section--ecosistemas { background: var(--cream-white); }
.section--fauna     { background: var(--cream-light); }
.section--peligro   { background: var(--green-darkest); }
.section--flora     { background: var(--cream-white); }
.section--comments  { background: var(--green-mint); }

/* Badge */
.section__badge {
  display: inline-block;
  background: var(--green-mint);
  color: var(--green-dark);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  padding: .35rem 1.1rem;
  border-radius: 2rem;
  margin-bottom: 1rem;
}
.section--peligro .section__badge,
.section--intro   .section__badge {
  background: rgba(255,255,255,.08);
  color: var(--green-pale);
}
.section__badge--danger {
  background: rgba(192,57,43,.18);
  color: #ff7676;
}

/* Título */
.section__title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 900;
  color: var(--green-darkest);
  line-height: 1.12;
  margin-bottom: 1rem;
}
.section--peligro .section__title,
.section--intro   .section__title { color: var(--white); }

/* Lead */
.section__lead {
  font-size: 1.08rem;
  color: var(--text-mid);
  max-width: 780px;
  margin-bottom: 3.5rem;
  line-height: 1.8;
}
.section--peligro .section__lead,
.section--intro   .section__lead { color: rgba(255,255,255,.72); }

/* ================================================
   INTRO CARDS
================================================ */
.intro-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.5rem;
}
.intro-card {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--radius-md);
  padding: 2rem 1.4rem;
  text-align: center;
  transition: transform var(--trans-mid), background var(--trans-mid);
  cursor: default;
}
.intro-card:hover {
  transform: translateY(-5px);
  background: rgba(255,255,255,.11);
}
.intro-card__icon { font-size: 2.4rem; margin-bottom: .9rem; }
.intro-card h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--white);
  margin-bottom: .4rem;
}
.intro-card p { color: rgba(255,255,255,.6); font-size: .88rem; }

/* ================================================
   SPECIES LIST — Layout general de ítems
================================================ */
.species-list {
  display: flex;
  flex-direction: column;
  gap: 3.5rem;
  margin-bottom: 2rem;
}

/* ---- Un ítem ---- */
.species-item {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

/* Ítem invertido: foto a la izquierda */
.species-item--reverse {
  direction: rtl;
}
.species-item--reverse > * {
  direction: ltr;
}

/* Texto */
.species-item__title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--green-darkest);
  margin-bottom: .6rem;
  display: flex;
  align-items: flex-start;
  gap: .6rem;
  flex-wrap: wrap;
  line-height: 1.3;
}
.section--peligro .species-item__title { color: var(--white); }

.species-item__title em {
  font-size: 1rem;
  font-weight: 400;
  color: var(--text-light);
  font-style: italic;
  width: 100%;
  margin-top: .1rem;
}
.section--peligro .species-item__title em { color: rgba(255,255,255,.5); }

/* Punto decorativo */
.species-item__dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  min-width: 10px;
  border-radius: 50%;
  background: var(--green-light);
  margin-top: .45rem;
}
.species-item__dot--danger { background: var(--danger-red); }

/* Localización */
.species-item__location {
  display: flex;
  align-items: flex-start;
  gap: .45rem;
  font-size: .85rem;
  color: var(--text-light);
  margin-bottom: .9rem;
  line-height: 1.5;
}
.species-item__location i { color: var(--green-mid); margin-top: .15rem; flex-shrink: 0; }
.section--peligro .species-item__location { color: rgba(255,255,255,.5); }
.section--peligro .species-item__location i { color: var(--green-pale); }

/* Descripción */
.species-item__desc {
  color: var(--text-mid);
  font-size: .97rem;
  line-height: 1.78;
}
.section--peligro .species-item__desc { color: rgba(255,255,255,.75); }

/* Tag de peligro inline */
.danger-tag {
  display: inline-block;
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: .28rem .85rem;
  border-radius: 2rem;
  background: rgba(192,57,43,.18);
  color: #ff7676;
  margin-bottom: .7rem;
}
.danger-tag--yellow {
  background: rgba(240,192,64,.15);
  color: #d4a017;
}

/* Danger banner */
.danger-banner {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  background: rgba(192,57,43,.12);
  border: 1px solid rgba(192,57,43,.28);
  border-radius: var(--radius-md);
  padding: 1.2rem 1.8rem;
  margin-bottom: 3rem;
  color: rgba(255,255,255,.75);
}
.danger-banner i { font-size: 1.4rem; color: #ff7676; flex-shrink: 0; margin-top: .1rem; }
.danger-banner p { font-size: .95rem; line-height: 1.6; }

/* ================================================
   FAUNA GROUPS (encabezados de subgrupo)
================================================ */
.fauna-group { margin-bottom: 4rem; }

.fauna-group__title {
  font-family: var(--font-display);
  font-size: 1.7rem;
  color: var(--green-darkest);
  display: flex;
  align-items: center;
  gap: .7rem;
  flex-wrap: wrap;
  padding-bottom: .75rem;
  border-bottom: 2px solid var(--green-mint);
  margin-bottom: 2.5rem;
}
.section--flora .fauna-group__title { color: var(--green-darkest); }
.fauna-group__title small {
  font-family: var(--font-body);
  font-size: .88rem;
  font-weight: 400;
  color: var(--text-light);
  font-style: italic;
  width: 100%;
  margin-top: -.3rem;
}

.fauna-group__icon { font-size: 1.5rem; }

/* ================================================
   GALERÍA AL FINAL DE SECCIÓN
================================================ */
.section-gallery {
  margin-top: 4rem;
  padding-top: 3rem;
  border-top: 2px solid var(--green-mint);
}
.section--peligro .section-gallery { border-top-color: rgba(255,255,255,.12); }

.section-gallery--danger .section-gallery__title { color: rgba(255,255,255,.85); }

.section-gallery__title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--green-darkest);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: .6rem;
}
.section--peligro .section-gallery__title { color: rgba(255,255,255,.85); }
.section-gallery__title i { color: var(--green-mid); font-size: 1.2rem; }
.section--peligro .section-gallery__title i { color: var(--green-pale); }

/* ================================================
   RESPONSIVE
================================================ */
@media (max-width: 900px) {
  .species-item {
    grid-template-columns: 1fr;
    gap: 1.8rem;
  }
  .species-item--reverse { direction: ltr; }
  .section { padding: 4rem 0; }
  .fauna-group__title { font-size: 1.4rem; }
  .species-item__title { font-size: 1.3rem; }
}

@media (max-width: 600px) {
  .section__lead { margin-bottom: 2.5rem; }
  .species-list { gap: 2.5rem; }
  .fauna-group { margin-bottom: 2.5rem; }
  .fauna-group__title { font-size: 1.25rem; }
  .section-gallery { margin-top: 2.5rem; padding-top: 2rem; }
}