/* =============================================
   GUARDIANES CANINOS GP — Módulo Stylesheet
   ============================================= */

/* === HERO DEL MÓDULO === */
.modulo-hero {
  background: var(--verde-bosque);
  color: var(--blanco);
  padding: 3.5rem 2rem;
  text-align: center;
  border-bottom: 4px solid var(--verde-medio);
}
.modulo-hero__num {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--verde-menta);
  background: rgba(255,255,255,0.1);
  padding: 0.3rem 0.9rem;
  border-radius: 20px;
  margin-bottom: 0.8rem;
}
.modulo-hero__title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: bold;
  margin-bottom: 0.7rem;
}
.modulo-hero__desc {
  font-size: 1rem;
  color: rgba(232,245,238,0.85);
  max-width: 580px;
  margin: 0 auto;
  line-height: 1.6;
}

/* === BREADCRUMB === */
.breadcrumb {
  background: var(--blanco);
  border-bottom: 1px solid #e0e0e0;
  padding: 0.65rem 2rem;
  font-size: 0.82rem;
  color: var(--texto-suave);
}
.breadcrumb a {
  color: var(--verde-medio);
  font-weight: 500;
}
.breadcrumb a:hover { text-decoration: underline; }

/* === LAYOUT === */
.modulo-body {
  max-width: 1000px;
  margin: 0 auto;
  padding: 3rem 2rem 2rem;
}

/* === TEMA (grupo de contenido) === */
.tema {
  margin-bottom: 3rem;
}
.tema__header {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 1.2rem;
  padding-bottom: 0.8rem;
  border-bottom: 2px solid var(--verde-menta);
}
.tema__num {
  background: var(--verde-bosque);
  color: var(--blanco);
  font-size: 0.72rem;
  font-weight: bold;
  padding: 0.25rem 0.65rem;
  border-radius: 4px;
  white-space: nowrap;
  letter-spacing: 0.05em;
}
.tema__title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: bold;
  color: var(--verde-bosque);
}

/* === GRID DE RECURSOS === */
.recursos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.2rem;
}

/* === CARD DE RECURSO === */
.recurso {
  border: 1px solid #ddd;
  border-radius: var(--radius-card);
  overflow: hidden;
  background: var(--blanco);
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
  display: flex;
  flex-direction: column;
}
.recurso__header {
  background: var(--verde-bosque);
  padding: 0.55rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.recurso__tipo {
  font-size: 0.72rem;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--verde-menta);
}
.recurso__body {
  padding: 1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}
.recurso__label {
  font-size: 0.88rem;
  font-weight: bold;
  color: var(--texto);
}

/* === PENDIENTE === */
.recurso--pendiente .recurso__header {
  background: #888;
}
.recurso--pendiente .recurso__tipo { color: #eee; }

/* === PLACEHOLDER === */
.placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 140px;
  background: #f7f7f7;
  border-radius: 4px;
  border: 1px dashed #ccc;
  color: #aaa;
  font-size: 0.82rem;
  text-align: center;
  gap: 0.5rem;
}
.placeholder__icon { font-size: 1.8rem; }

/* === VIDEO === */
.recurso video {
  width: 100%;
  border-radius: 4px;
  background: #000;
}

/* === PDF IFRAME === */
.recurso__pdf-frame {
  width: 100%;
  height: 320px;
  border: none;
  border-radius: 4px;
  background: #f5f5f5;
}

/* === IMAGEN === */
.recurso__img {
  width: 100%;
  border-radius: 4px;
  object-fit: contain;
  max-height: 280px;
  border: 1px solid #eee;
}

/* === NAV ENTRE MÓDULOS (bottom) === */
.modulo-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1.5rem 2rem;
  max-width: 1000px;
  margin: 0 auto;
  border-top: 1px solid #e0e0e0;
  background: var(--crema);
}
.modulo-nav__home {
  font-size: 0.82rem;
  color: var(--texto-suave);
}
.modulo-nav__home:hover {
  color: var(--naranja);
  text-decoration: underline;
}

/* === BOTONES FLOTANTES DE NAVEGACIÓN === */
.nav-flotante {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  z-index: 90;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}
.nav-flotante--prev { left: 1rem; }
.nav-flotante--next { right: 1rem; }

.nav-flotante__btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: var(--verde-bosque);
  color: var(--blanco);
  border-radius: 50%;
  font-size: 1.2rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  transition: background var(--transition), transform var(--transition);
  text-decoration: none;
}
.nav-flotante__btn:hover {
  background: var(--naranja);
  transform: scale(1.1);
  color: var(--blanco);
}
.nav-flotante__label {
  font-size: 0.65rem;
  font-weight: bold;
  color: var(--verde-bosque);
  text-align: center;
  background: var(--blanco);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.12);
  white-space: nowrap;
}

@media (max-width: 768px) {
  .nav-flotante { display: none; }
}

/* === RESPONSIVE === */
@media (max-width: 600px) {
  .recursos { grid-template-columns: 1fr; }
  .modulo-nav { flex-direction: column; gap: 0.8rem; text-align: center; }
  .modulo-body { padding: 2rem 1rem; }
}

/* === LIGHTBOX === */
.lightbox-trigger {
  cursor: zoom-in;
  position: relative;
  display: block;
}
.lightbox-trigger::after {
  content: '🔍 Ver más grande';
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(27,67,50,0.85);
  color: #fff;
  font-size: 0.72rem;
  font-weight: bold;
  padding: 0.3rem 0.6rem;
  border-radius: 4px;
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}
.lightbox-trigger:hover::after { opacity: 1; }

/* Overlay */
.lightbox-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.88);
  z-index: 999;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}
.lightbox-overlay.active { display: flex; }

/* Contenido */
.lightbox-content {
  position: relative;
  width: 80vw;
  height: 80vh;
  max-width: 80vw;
  max-height: 80vh;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Header del lightbox */
.lightbox-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--verde-bosque);
  color: var(--verde-menta);
  padding: 0.7rem 1rem;
  flex-shrink: 0;
  height: 50px;
}
#lightbox-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  height: calc(80vh - 50px);
}
.lightbox-title {
  font-size: 0.88rem;
  font-weight: bold;
}
.lightbox-close {
  background: none;
  border: none;
  color: var(--verde-menta);
  font-size: 1.4rem;
  cursor: pointer;
  line-height: 1;
  padding: 0 0.3rem;
  transition: color 0.2s;
}
.lightbox-close:hover { color: var(--naranja); }

/* Iframe PDF en lightbox */
.lightbox-iframe {
  width: 100%;
  flex: 1;
  height: 100%;
  border: none;
}

/* Imagen en lightbox */
.lightbox-img {
  width: 100%;
  height: 100%;
  max-height: calc(80vh - 50px);
  object-fit: contain;
  display: block;
}

/* === PDF EN MÓVIL === */
.pdf-mobile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  padding: 2rem 1rem;
  background: #f7f7f7;
  border-radius: 4px;
  border: 1px dashed #ccc;
  text-align: center;
}
.pdf-mobile__icon { font-size: 2.5rem; }
.pdf-mobile__label {
  font-size: 0.85rem;
  color: var(--texto-suave);
}
.pdf-mobile__btn {
  display: inline-block;
  background: var(--verde-bosque);
  color: var(--blanco);
  font-size: 0.88rem;
  font-weight: bold;
  padding: 0.6rem 1.4rem;
  border-radius: 4px;
  transition: background 0.2s;
}
.pdf-mobile__btn:hover { background: var(--naranja); }