/* ==========================================================================
   ESTILOS DE LA PÁGINA APOYA (HERO & ESTRUCTURA PRINCIPAL) - RACIONALMENTE
   Inspirado en la estructura y proporciones de Biblioteca
   ========================================================================== */

:root {
  --bg-primary: #060913;
  --bg-card: rgba(15, 23, 42, 0.75);
  --border-color: rgba(0, 242, 254, 0.25);
  --accent-cyan: #00f2fe;
  --accent-purple: #7928ca;
  --accent-pink: #ff007a;
  --text-main: #ffffff;
  --text-muted: #94a3b8;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-main);
  font-family: 'Inter', sans-serif;
  overflow-x: hidden;
}

/* --- Hero Section (Idéntico a Biblioteca) --- */
.apoya-hero-section {
  padding: 140px 20px 80px;
  background: linear-gradient(180deg, #060913 0%, #0b0f19 100%);
  position: relative;
  overflow: hidden;
}

.apoya-hero-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 50px;
  align-items: flex-start !important;
}

@media (max-width: 992px) {
  .apoya-hero-container {
    grid-template-columns: 1fr;
    text-align: center;
  }
}

.cyber-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 2.5px;
  color: var(--accent-cyan);
  text-transform: uppercase;
  padding: 5px 14px;
  background: rgba(0, 242, 254, 0.08);
  border: 1px solid rgba(0, 242, 254, 0.2);
  border-radius: 20px;
  margin-bottom: 20px;
}

.apoya-hero-title {
  font-size: clamp(2rem, 3.5vw, 3rem);
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.2;
  margin-bottom: 20px;
}

.apoya-hero-title span {
  background: linear-gradient(135deg, #00f2fe 0%, #4facfe 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.apoya-hero-desc {
  font-size: 0.98rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 30px;
}

@media (max-width: 992px) {
  .apoya-hero-desc {
    margin-left: auto;
    margin-right: auto;
  }
}

/* Tarjetas de Píldoras Informativas (Hero) */
.apoya-highlights {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-bottom: 35px;
}

.highlight-pill {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 20px;
  border-radius: 12px;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
  text-align: left;
}

.highlight-pill:hover {
  border-color: rgba(0, 242, 254, 0.4);
  box-shadow: 0 0 20px rgba(0, 242, 254, 0.15);
  transform: translateY(-2px);
}

.icon-container {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 242, 254, 0.1);
  border: 1px solid rgba(0, 242, 254, 0.3);
  border-radius: 10px;
  box-shadow: 0 0 15px rgba(0, 242, 254, 0.25);
}

.icon-container svg {
  width: 24px;
  height: 24px;
  stroke: var(--accent-cyan);
  filter: drop-shadow(0 0 6px rgba(0, 242, 254, 0.6));
}

.highlight-text strong {
  color: var(--text-main);
  display: block;
  margin-bottom: 4px;
  font-size: 1rem;
}

.highlight-text p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.5;
  margin: 0;
}

/* Columna Derecha: Tarjeta Visual y Animación */
.apoya-visual {
  position: relative;
  width: 100%;
}

.lib-card {
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(0, 242, 254, 0.25);
  border-radius: 16px;
  aspect-ratio: 4 / 3;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6), 0 0 30px rgba(0, 242, 254, 0.1);
}

/* Recuadro del Overlay sobre la Animación */
.lib-card-overlay {
  position: absolute;
  top: 25px;
  left: 25px;
  z-index: 10;
  pointer-events: none;
  background: rgba(6, 9, 19, 0.75);
  padding: 15px 20px;
  border-radius: 10px;
  border-left: 3px solid var(--accent-cyan);
  backdrop-filter: blur(6px);
}

.overlay-title {
  display: block;
  font-size: 1.125rem;
  letter-spacing: 2px;
  color: var(--accent-cyan);
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.overlay-subtitle {
  display: block;
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.5px;
  margin-bottom: 2px;
}

.overlay-author {
  display: block;
  font-size: 1.17rem;
  color: var(--text-muted);
}

.lib-card canvas {
  width: 100%;
  height: 100%;
  display: block;
  position: absolute;
  top: 0;
  left: 0;
}

/* --- HACER TODAS LAS IMÁGENes RESPONSIVAS --- */
img {
    max-width: 100%; /* La imagen nunca será más ancha que su contenedor */
    height: auto;    /* Mantiene la proporción original automáticamente */
    display: block;  /* Evita espacios extra debajo de la imagen */
    margin: 0 auto;  /* Centra la imagen horizontalmente en su contenedor */
}

@media (max-width: 768px) {
    /* Limita la altura de las imágenes dentro de las tarjetas de apoyo */
    article img {
        max-height: 200px; /* Controla el alto máximo (prueba entre 180px y 220px según prefieras) */
        width: auto;       /* El ancho se ajusta automáticamente para no deformar el QR */
        max-width: 100%;   /* Garantiza que nunca rebase el ancho del contenedor */
        height: auto;      
        object-fit: contain;
        display: block;
        margin: 0 auto;    /* Centra la imagen horizontalmente */
    }
}

/* --- REORDENAR HERO EN MÓVILES (BIBLIOTECA) --- */
@media (max-width: 992px) {
    /* Convierte el contenedor principal del main en una cuadrícula en celulares */
    main > div {
        display: grid;
        grid-template-columns: 1fr;
    }

    /* Manda el bloque de la animación (segundo hijo) hacia arriba */
    main > div > div:nth-child(2) {
        order: 1;
    }

    /* Manda el bloque del texto (primer hijo) hacia abajo */
    main > div > div:nth-child(1) {
        order: 2;
    }
}