/* CABECERA */

.navbar-brand span {
    font-size: 1.3rem;
    letter-spacing: 1px;
}

.navbar-nav .nav-link {
    font-size: 1.1rem;
    padding: 0.7rem 1rem;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.navbar-nav .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.2);
    color: #fff;
    border-radius: 0.5rem;
}


footer img {
    object-fit: cover;
    border: 3px solid #fff;
    transition: transform 0.3s ease;
}

footer img:hover {
    transform: scale(1.05);
}

footer a:hover {
    opacity: 0.8;
}


/* ECOSISTEMAS */

article img {
  width: 100%;
  height: auto;
  object-fit: cover;
}

.texto .col-md-4 {
  padding-left: 2rem;
  padding-right: 2rem;
}

.texto p {
  margin-top: 1em;
  margin-bottom: 1em;
  text-align: justify;
  line-height: 1.45;
  font-size: 1rem;
}

.texto p::first-letter {
  font-size: 2em;               /* dos veces el tamaño normal */
  font-weight: 700;
  color: #2e7d32;               
  text-shadow: 2px 2px 4px rgba(0,0,0,0.35);
  float: left;
  line-height: 1;
  padding-right: 0.15em;
  padding-left: 0.05em;
  font-family: "UnifrakturCook", "Times New Roman", serif;
}

/* Importa la fuente medieval desde Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=UnifrakturCook:wght@700&display=swap');

/* Pequeñas mejoras responsive */
@media (max-width: 767.98px) {
  .texto .col-md-4 {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  .texto p::first-letter {
    font-size: 1.8em;
  }
}


/* Animales */
.contenedor-relative {
  position: relative;     /* ← muy importante */
  overflow: hidden;       /* evita que el canguro se salga visualmente */
  min-height: 600px;      /* da espacio suficiente para la animación */
}

#kangaroo {
  position: absolute;
  left: -150px;
  bottom: 50px;
  width: 120px;
  animation: jump 5s ease-in-out forwards;
}

@keyframes jump {
  0% { left: -150px; bottom: 50px; transform: rotate(0deg); }
  25% { bottom: 180px; transform: rotate(-10deg); }
  50% { left: 50%; bottom: 50px; transform: rotate(10deg); }
  75% { bottom: 160px; transform: rotate(-5deg); }
  100% { left: 100%; bottom: 50px; opacity: 0; }
}

#carouselAnimales img {
  height: 500px;          /* ajusta la altura */
  object-fit: cover;      /* recorta la imagen sin deformarla */
  border-radius: 15px;    /* opcional: bordes redondeados */
}

.animal-info {
  display: none;
  transition: opacity 0.5s ease-in-out;
}

.animal-info.active {
  display: block;
  opacity: 1;
}

/* Ocultamos el contenido hasta que acabe la animación */
#content {
  display: none;
  margin-top: 220px;
}

#animal-descriptions {
  margin-top: 40px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.animal-info {
  display: none;
  background: linear-gradient(135deg, #fff8e1 0%, #ffecb3 100%);
  border-radius: 20px;
  padding: 30px;
  max-width: 750px;
  animation: fadeIn 0.8s ease-in-out;
  text-align: center;
  border: 3px solid #fdd835;
}

.animal-info.active {
  display: block;
  opacity: 1;
}

/* 🦁 Encabezados de animales */
.animal-info h3 {
  font-family: "Comic Sans MS", "Poppins", sans-serif;
  font-size: 3rem;
  color: #e65100;
  text-shadow: 1px 1px #fff;
  margin-bottom: 15px;
}

.animal-info p {
  font-size: 2rem;
  color: #4e342e;
  line-height: 1.6;
  margin-bottom: 10px;
}

.animal-info q {
  display: block;
  font-style: italic;
  font-weight: bold;
  color: #6a1b9a;
  background: #f3e5f5;
  border-left: 4px solid #ab47bc;
  padding: 8px 15px;
  border-radius: 10px;
  margin: 10px auto;
  width: 80%;
}

.animal-info a {
  color: #0d47a1;
  text-decoration: none;
  font-weight: bold;
  border-bottom: 2px solid #64b5f6;
  transition: all 0.3s;
}
.animal-info a:hover {
  color: #1e88e5;
  border-color: #1976d2;
}