/* ============================================
  Archivo: situaciones_didacticas.css
  Descripción: Estilos para la página "Situaciones Didácticas" del sistema web Ecorut@s.
  Notas:
    - Incluye variables de color generales.
    - Define estilos para títulos, animaciones, scroll personalizado y tarjetas de libros.
    - Botones con animación basados en recursos de Uiverse.io (autor: Bodyhc).
    - Soporte responsivo para tablets y móviles.
============================================ */

/* =========================
  1. VARIABLES DE COLOR
========================= */
:root {
  --color-negro: black;
  --color-blanco: white;
}

/* =========================
  2. TÍTULOS Y SEPARADORES
========================= */

/* Estilo para el título principal */
.titulo-principal h1 {
  color: var(--color-negro);
  font-weight: bold;
  font-size: 36px;
}

/* Línea decorativa debajo del título */
.separador {
  border-color: var(--color-negro) !important;
}

/* =========================
  3. ANIMACIÓN
========================= */

/* Animación de aparición para la sección de información */
.informacion {
  animation: fadeIn 1s ease-in-out;
}

/* =========================
  4. SCROLL PERSONALIZADO PARA BIBLIOTECA
========================= */

/* Contenedor scroll con alto máximo y estilos */
.scroll-biblioteca {
  max-height: 85vh;
  overflow-y: auto;
  padding-right: 6px;
  border: 1px solid #ddd;
  border-radius: 8px;
  background-color: #fff;
}

/* Scroll personalizado para navegadores WebKit */
.scroll-biblioteca::-webkit-scrollbar {
  width: 8px;
}

.scroll-biblioteca::-webkit-scrollbar-thumb {
  background-color: #888;
  border-radius: 4px;
}

.scroll-biblioteca::-webkit-scrollbar-thumb:hover {
  background-color: #555;
}

/* =========================
  5. TARJETAS DE LIBROS
========================= */

/* Contenedor tarjeta de libro */
.book-card {
  margin-bottom: 1rem;
  text-align: center;
  border: 1px solid #e3e3e3;
  border-radius: 6px;
  padding: 10px;
  background-color: #fafafa;
  transition: box-shadow 0.2s;
}

/* Efecto hover para tarjeta */
.book-card:hover {
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

/* Imagen del libro */
.book-card img {
  width: 100%;
  max-width: 140px;
  height: auto;
  aspect-ratio: 3 / 4;
  object-fit: contain;
  margin: 0 auto 8px;
  display: block;
}

/* Título dentro de tarjeta */
.book-card h6 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

/* =========================
  6. BOTONES CON ANIMACIÓN
  Basados en Uiverse.io por Bodyhc
========================= */

/* Estilo base para botones */
.button {
  --color: #936F2F;
  background-color: #fff;
  font-family: inherit;
  display: inline-block;
  width: 8em;
  height: 2.6em;
  line-height: 2.5em;
  margin: 8px 0;
  position: relative;
  overflow: hidden;
  border: 2px solid var(--color);
  transition: color .5s;
  z-index: 1;
  font-size: 14px;
  border-radius: 6px;
  font-weight: 500;
  cursor: pointer;
  color: var(--color);
}

/* Animación de fondo */
.button:before {
  content: "";
  position: absolute;
  z-index: -1;
  background: var(--color);
  height: 150px;
  width: 200px;
  border-radius: 50px;
  bottom: 100%;
  right: 100%;
  transition: .8s ease;
}

/* Efecto hover para botón */
.button:hover {
  color: #fff;
}

/* Movimiento de animación al hacer hover */
.button:hover:before {
  bottom: -30px;
  left: -30px;
}

/* Estado activo del botón */
.button:active:before {
  background: #936F2F;
  transition: background 2s;
}

/* =========================
  7. LOGO EN CONTENIDO DERECHO
========================= */

#contenido {
  min-height: 400px; /* Altura mínima para centrar verticalmente en pantallas grandes */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

#contenido img.logo-ecorutas {
  max-width: 200px;
  width: 100%;
  height: auto;
  margin-bottom: 1rem;
  opacity: 0.85;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

#contenido img.logo-ecorutas:hover {
  transform: scale(1.05);
  opacity: 1;
}

/* =========================
  8. VISOR PDF
========================= */

/* Estilo para el canvas del PDF */
#pdf-canvas {
  width: 100% !important;
  height: auto !important;
  border: 1px solid #ddd;
  border-radius: 8px;
  box-shadow: 0 0 8px rgba(0,0,0,0.1);
  margin-top: 1rem;
  display: block;
  max-height: 80vh;
}

/* =========================
  9. DISEÑO RESPONSIVO
  Ajustes para tablets y móviles
========================= */
@media screen and (max-width: 768px) {
  .titulo-principal h1 {
    font-size: 30px;
  }

  .book-card img {
    max-width: 100px;
  }

  .scroll-biblioteca {
    max-height: 65vh;
    padding: 10px;
  }

  .book-card h6,
  .book-card button {
    font-size: 0.9rem;
  }

  #pdf-canvas {
    max-height: 60vh;
  }

  .btn {
    font-size: 12px;
  }
}

@media screen and (max-width: 576px) {
  .titulo-principal h1 {
    font-size: 28px;
  }

  .book-card img {
    max-width: 90px;
  }

  #pdf-canvas {
    max-height: 50vh;
  }

  .btn {
    font-size: 8px;
  }
}