/* =========================================================
   CONTENEDOR GENERAL
   ========================================================= */

.empalme-contenedor {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px;
  box-sizing: border-box;
  font-family: 'Work Sans', Arial, sans-serif;
}


/* =========================================================
   ENCABEZADO
   ========================================================= */

.empalme-header {
  text-align: center;
  color: #1f3a68;
  margin: 0 0 30px;
}

.empalme-header h2 {
  margin: 0 0 10px;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  line-height: 1.2;
}

.empalme-header p {
  margin: 0;
  color: #444;
  font-size: 1rem;
  line-height: 1.6;
}


/* =========================================================
   GRID RESPONSIVE
   ========================================================= */

.empalme-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  width: 100%;
}


/* =========================================================
   TARJETAS
   ========================================================= */

.empalme-card {
  background: #ffffff;

  border-radius: 12px;
  border-top: 5px solid #1f3a68;

  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);

  padding: 25px;

  display: flex;
  flex-direction: column;

  min-width: 0;
  box-sizing: border-box;

  transition: box-shadow 0.3s ease;
}

.empalme-card:hover {
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}


/* =========================================================
   TEXTOS
   ========================================================= */

.empalme-titulo {
  font-size: 0.9rem;
  color: #555;

  text-transform: uppercase;
  letter-spacing: 1px;

  line-height: 1.5;

  margin: 0 0 8px;
}


.empalme-nombre {
  font-size: clamp(1.2rem, 2vw, 1.4rem);
  font-weight: 700;

  color: #222;

  line-height: 1.3;

  margin: 0 0 15px;
}


/* =========================================================
   FECHA
   ========================================================= */

.empalme-fecha {
  font-size: 0.95rem;

  color: #333;

  line-height: 1.6;

  background: #f4f6f9;

  padding: 12px;

  border-radius: 6px;

  margin: 0;
}


/* =========================================================
   ZONA DE BOTONES
   ========================================================= */

.empalme-acciones {
  margin-top: auto;

  padding-top: 20px;

  display: flex;

  flex-direction: column;

  gap: 10px;

  width: 100%;
}


/* =========================================================
   BOTÓN VER INFORME
   ========================================================= */

.btn-descarga {
  display: flex;

  align-items: center;
  justify-content: center;

  width: 100%;
  min-height: 48px;

  box-sizing: border-box;

  padding: 12px 16px;

  background-color: #1f3a68 !important;

  color: #ffffff !important;

  text-align: center;

  text-decoration: none !important;

  border-radius: 6px;

  font-size: 1rem;

  font-weight: 700;

  line-height: 1.3;

  cursor: pointer;

  transition: none;
}


/* =========================================================
   ESTADOS DEL BOTÓN VER INFORME
   Evita que el sitio lo vuelva azul o cambie el texto.
   ========================================================= */

.btn-descarga:link,
.btn-descarga:visited,
.btn-descarga:hover,
.btn-descarga:focus,
.btn-descarga:focus-visible,
.btn-descarga:active {
  background-color: #1f3a68 !important;

  color: #ffffff !important;

  text-decoration: none !important;
}


/* =========================================================
   BOTÓN EMPALME ANTE EL PUEBLO
   ========================================================= */

.btn-micrositio {
  display: flex;

  align-items: center;
  justify-content: center;

  width: 100%;
  min-height: 48px;

  box-sizing: border-box;

  padding: 12px 16px;

  background-color: #FFCD00 !important;

  color: #000000 !important;

  text-align: center;

  text-decoration: none !important;

  border-radius: 6px;

  font-size: 1rem;

  font-weight: 700;

  line-height: 1.3;

  cursor: pointer;

  transition: none;
}


/* =========================================================
   ESTADOS DEL BOTÓN EMPALME
   ========================================================= */

.btn-micrositio:link,
.btn-micrositio:visited,
.btn-micrositio:hover,
.btn-micrositio:focus,
.btn-micrositio:focus-visible,
.btn-micrositio:active {
  background-color: #FFCD00 !important;

  color: #000000 !important;

  text-decoration: none !important;
}


/* =========================================================
   ACCESIBILIDAD - FOCO DE TECLADO
   ========================================================= */

.empalme-card a:focus-visible {
  outline: 3px solid #1f3a68;

  outline-offset: 3px;

  border-radius: 6px;
}


/* =========================================================
   ACCESIBILIDAD - FOCO EN LA TARJETA
   ========================================================= */

.empalme-card:focus-within {
  box-shadow:
    0 0 0 3px rgba(31, 58, 104, 0.25),
    0 8px 20px rgba(0, 0, 0, 0.15);
}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 900px) {

  .empalme-contenedor {
    padding: 18px;
  }

  .empalme-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));

    gap: 18px;
  }

  .empalme-card {
    padding: 22px;
  }
}


/* =========================================================
   CELULARES
   ========================================================= */

@media (max-width: 600px) {

  .empalme-contenedor {
    padding: 15px;
  }

  .empalme-header {
    margin-bottom: 22px;

    text-align: left;
  }

  .empalme-header h2 {
    font-size: 1.5rem;
  }

  .empalme-header p {
    font-size: 0.95rem;
  }

  .empalme-grid {
    grid-template-columns: 1fr;

    gap: 16px;
  }

  .empalme-card {
    padding: 20px;

    border-radius: 10px;
  }

  .empalme-titulo {
    font-size: 0.82rem;
  }

  .empalme-nombre {
    font-size: 1.25rem;
  }

  .empalme-fecha {
    font-size: 0.92rem;
  }

  .btn-descarga,
  .btn-micrositio {
    width: 100%;
  }
}


/* =========================================================
   CELULARES PEQUEÑOS
   ========================================================= */

@media (max-width: 380px) {

  .empalme-contenedor {
    padding: 10px;
  }

  .empalme-card {
    padding: 16px;
  }

  .empalme-fecha {
    padding: 10px;
  }

  .btn-descarga,
  .btn-micrositio {
    font-size: 0.9rem;

    padding: 11px;
  }
}


/* =========================================================
   REDUCIR MOVIMIENTO
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

  .empalme-card,
  .btn-descarga,
  .btn-micrositio {
    transition: none;
  }
}


/* =========================================================
   IMPRESIÓN
   ========================================================= */

@media print {

  .empalme-contenedor {
    max-width: 100%;

    padding: 0;
  }

  .empalme-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .empalme-card {
    box-shadow: none;

    border: 1px solid #999;

    break-inside: avoid;
  }

  .btn-descarga,
  .btn-micrositio {
    color: #000 !important;

    background: transparent !important;

    border: 1px solid #000;
  }
}