/* =========================================================
   PLANTILLAS DE TESIS POR CAMPUS
========================================================= */

.plantillas-campus {
  width: min(1250px, 92%);
  margin: 0 auto;
  padding: 55px 0 90px;
}

/* =========================================================
   ENCABEZADO GENERAL
========================================================= */

.plantillas-encabezado {
  text-align: center;
  margin-bottom: 45px;
}

.plantillas-eyebrow {
  display: block;
  margin-top: 25px;
  color: var(--line-blue);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.plantillas-encabezado h1 {
  margin: 8px 0 12px;
  font-size: clamp(2rem, 4vw, 3rem);
}

.plantillas-encabezado > p {
  max-width: 680px;
  margin: 0 auto;
  color: #555;
  line-height: 1.6;
}

/* =========================================================
   BOTÓN REGRESAR
========================================================= */

.btn-regresar-campus {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 20px;
  border-radius: 30px;
  background: var(--line-blue);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.btn-regresar-campus:hover {
  transform: translateX(-5px);
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.18);
}

/* =========================================================
   SELECTOR DE CAMPUS
========================================================= */

.selector-campus {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch;
  gap: 2rem;
}

.campus-card {
  width: 260px;
  min-height: 390px;
  padding: 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: #fff;
  border-radius: 25px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12);
  transition:
    transform 0.35s ease,
    box-shadow 0.35s ease;
}

.campus-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 30px 50px rgba(0, 0, 0, 0.2);
}

.campus-card-imagen {
  width: 100%;
  height: 115px;
  margin-bottom: 15px;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  border-radius: 14px;
}

.campus-card-imagen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.campus-card h2 {
  margin: 12px 0 10px;
  font-size: 1.15rem;
}

.campus-card p {
  line-height: 1.4;
  color: #555;
}

.campus-card .btn-ingresar {
  margin-top: auto;
}

/* =========================================================
   PORTADA DEL CAMPUS
========================================================= */

.campus-portada {
  max-width: 900px;
  margin: 35px auto 0;
  padding: 25px;
  display: flex;
  align-items: center;
  gap: 30px;
  text-align: left;
  background: #fff;
  border-radius: 28px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.campus-portada-imagen {
  width: 250px;
  flex: 0 0 250px;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 18px;
}

.campus-portada-imagen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.campus-portada-contenido h1 {
  margin: 5px 0 10px;
}

.campus-portada-contenido p {
  margin: 0;
  color: #555;
  line-height: 1.5;
}

/* =========================================================
   PROGRAMAS
========================================================= */

.programas-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
  gap: 2rem;
}

.programa-card {
  padding: 28px;
  background: #fff;
  border-radius: 25px;
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.1);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.programa-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 22px 45px rgba(0, 0, 0, 0.15);
}

/* =========================================================
   ENCABEZADO PROGRAMA
========================================================= */

.programa-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 18px;
  margin-bottom: 20px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.programa-icono {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 13px;
  background: rgba(0, 110, 170, 0.1);
  font-size: 1.2rem;
}

.programa-header h2 {
  margin: 0;
  font-size: 1.15rem;
  line-height: 1.3;
}

/* =========================================================
   CATEGORÍAS
========================================================= */

.categorias-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.categoria-card {
  padding: 15px;
  background: #f6f8fa;
  border-radius: 16px;
  transition:
    background 0.25s ease,
    transform 0.25s ease;
}

.categoria-card:hover {
  background: #fff;
  transform: translateX(4px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.08);
}

.categoria-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
}

.categoria-header h3 {
  margin: 0;
  font-size: 0.95rem;
}

.categoria-contador {
  min-width: 28px;
  height: 28px;
  padding: 0 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: var(--line-blue);
  color: white;
  font-size: 0.72rem;
  font-weight: 700;
}

/* =========================================================
   CATEGORÍA VACÍA
========================================================= */

.categoria-vacia {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  color: #777;
  font-size: 0.82rem;
}

.categoria-vacia p {
  margin: 0;
}

/* =========================================================
   ARCHIVOS
========================================================= */

.archivos-lista {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.archivo-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  background: #fff;
  border-radius: 13px;
  text-decoration: none;
  color: #222;
  box-shadow: 0 5px 12px rgba(0, 0, 0, 0.06);
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease;
}

.archivo-item:hover {
  transform: translateX(4px);
  box-shadow: 0 9px 20px rgba(0, 0, 0, 0.12);
}

.archivo-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  text-align: left;
}

.archivo-info strong {
  font-size: 0.86rem;
}

.archivo-info small {
  margin-top: 3px;
  color: #666;
  line-height: 1.3;
}

.archivo-formato {
  flex: 0 0 auto;
  padding: 5px 9px;
  border-radius: 10px;
  background: var(--line-blue);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
}

/* =========================================================
   MENSAJES
========================================================= */

.plantillas-mensaje {
  max-width: 650px;
  margin: 40px auto;
  padding: 50px;
  text-align: center;
  background: #fff;
  border-radius: 25px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.plantillas-mensaje h2 {
  margin-top: 0;
}

.plantillas-mensaje p {
  margin-bottom: 0;
  color: #666;
}

.plantillas-mensaje.error {
  border: 1px solid rgba(180, 0, 0, 0.15);
}

/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 700px) {
  .plantillas-campus {
    width: 94%;
    padding-top: 30px;
  }

  .campus-portada {
    flex-direction: column;
    text-align: center;
  }

  .campus-portada-imagen {
    width: 100%;
    max-width: 380px;
    flex: none;
  }

  .programas-grid {
    grid-template-columns: 1fr;
  }
}
