/**
 * utpl-convocatoria.css
 * Estilos para Convocatoria de Proyectos — UTPL
 * Bootstrap ya está cargado; este archivo solo agrega estilos propios.
 * Ruta: /themes/NOMBRE_TEMA/css/utpl-convocatoria.css
 */

/* ============================================================
   IMAGEN DE PORTADA — 100% ancho de pantalla
   ============================================================ */
.utpl-conv__portada-fullwidth {
  width: 100vw;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  overflow: hidden;
  max-height: none; /* antes: 420px */
}

.utpl-conv__portada-fullwidth img {
  width: 100%;
  height: clamp(320px, 42vw, 560px); /* más presencia visual */
  object-fit: cover;
  object-position: center center;
  display: block;
}

/* ============================================================
   CABECERA: badge, título, fechas, KPIs
   ============================================================ */

/* Badge del año */
.utpl-conv__anio-badge {
  display: inline-block;
  background-color: #f5a623;
  color: #003366;
  font-weight: 800;
  font-size: 0.72rem;
  padding: 0.25rem 0.9rem;
  border-radius: 20px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 0.6rem;
}

/* Título */
.utpl-conv__titulo {
  font-size: 1.6rem;
  font-weight: 700;
  color: #003366;
  margin: 0.25rem 0 1rem;
  line-height: 1.3;
}

.utpl-conv__titulo a {
  color: inherit;
  text-decoration: none;
}

.utpl-conv__titulo a:hover {
  text-decoration: underline;
}

/* Fechas */
.utpl-conv__fecha-pill {
  background-color: #f0f4fa;
  border: 1px solid #d0daea;
  border-radius: 6px;
  padding: 0.45rem 0.9rem;
  font-size: 0.87rem;
}

.utpl-conv__fecha-pill--limite {
  background-color: #fff8ec;
  border-color: #f5a623;
}

.utpl-conv__fecha-pill-label {
  display: block;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #888;
  margin-bottom: 0.1rem;
}

.utpl-conv__fecha-pill-value {
  font-weight: 700;
  color: #003366;
  font-size: 0.95rem;
}

/* KPIs */
.utpl-conv__kpi-item {
  background-color: #f7f9fc;
  border: 1px solid #dde5f0;
  border-top: 3px solid #f5a623;
  border-radius: 6px;
  padding: 0.75rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 140px;
}

.utpl-conv__kpi-valor {
  font-size: 1.1rem;
  color: #003366;
  font-weight: 800;
  line-height: 1.1;
}

.utpl-conv__kpi-label {
  font-size: 0.7rem;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

/* ============================================================
   DIVISOR entre cabecera y secciones
   ============================================================ */
.utpl-conv__header-info {
  border-bottom: 2px solid #e8edf5;
  padding-bottom: 1.5rem;
}

/* ============================================================
   SECCIONES
   ============================================================ */
.utpl-conv__section {
  padding: 1.75rem 0;
  border-bottom: 1px solid #e8edf5;
}

.utpl-conv__section:last-child {
  border-bottom: none;
  padding-bottom: 2rem;
}

/* Título de sección */
.utpl-conv__section-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: #003366;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin: 0 0 1rem;
  padding: 0.4rem 0.85rem;
  border-left: 4px solid #f5a623;
  background-color: #f7f9fc;
  border-radius: 0 4px 4px 0;
}

/* Cuerpo de la sección */
.utpl-conv__section-body {
  color: #3a3a3a;
  line-height: 1.8;
  font-size: 0.95rem;
}

.utpl-conv__section-body p {
  margin: 0 0 0.75rem;
}

.utpl-conv__section-body p:last-child {
  margin-bottom: 0;
}

.utpl-conv__section-body ul,
.utpl-conv__section-body ol {
  padding-left: 1.4rem;
  margin: 0.4rem 0 0.75rem;
}

.utpl-conv__section-body li {
  margin-bottom: 0.35rem;
}

/* Tablas */
.utpl-conv__section-body table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  margin-top: 0.5rem;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,0.07);
}

.utpl-conv__section-body table th {
  background-color: #003366;
  color: #fff;
  padding: 0.65rem 1rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.84rem;
}

.utpl-conv__section-body table td {
  padding: 0.6rem 1rem;
  border-bottom: 1px solid #e8edf5;
  vertical-align: top;
  color: #3a3a3a;
}

.utpl-conv__section-body table tr:nth-child(even) td {
  background-color: #f7f9fc;
}

.utpl-conv__section-body table tr:last-child td {
  border-bottom: none;
}

/* Tablas responsive */
@media (max-width: 576px) {
  .utpl-conv__section-body table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* ============================================================
   ARCHIVOS PARA DESCARGAR
   ============================================================ */
.utpl-conv__downloads .field__label {
  display: none;
}

.utpl-conv__downloads .field__items {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.utpl-conv__downloads .field__item {
  margin: 0;
}

.utpl-conv__downloads a,
.utpl-conv__downloads .file a {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: #003366;
  font-weight: 600;
  text-decoration: none;
  padding: 0.65rem 1.25rem;
  background-color: #fff;
  border: 1.5px solid #003366;
  border-radius: 6px;
  font-size: 0.88rem;
  transition: background-color 0.18s, color 0.18s, box-shadow 0.18s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

/* Ícono descarga */
.utpl-conv__downloads a::before,
.utpl-conv__downloads .file a::before {
  content: "";
  display: inline-block;
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  background-color: #003366;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2.5'%3E%3Cpath d='M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4'/%3E%3Cpolyline points='7 10 12 15 17 10'/%3E%3Cline x1='12' y1='15' x2='12' y2='3'/%3E%3C/svg%3E");
  -webkit-mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2.5'%3E%3Cpath d='M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4'/%3E%3Cpolyline points='7 10 12 15 17 10'/%3E%3Cline x1='12' y1='15' x2='12' y2='3'/%3E%3C/svg%3E");
  mask-size: contain;
  mask-repeat: no-repeat;
  mask-position: center;
  transition: background-color 0.18s;
}

.utpl-conv__downloads a:hover,
.utpl-conv__downloads .file a:hover {
  background-color: #003366;
  color: #fff;
  box-shadow: 0 4px 12px rgba(0,51,102,0.22);
}

.utpl-conv__downloads a:hover::before,
.utpl-conv__downloads .file a:hover::before {
  background-color: #fff;
}

@media (max-width: 576px) {
  .utpl-conv__downloads a,
  .utpl-conv__downloads .file a {
    width: 100%;
  }
}

/* ============================================================
   SECCIÓN CONTACTO
   ============================================================ */
.utpl-conv__section--contacto {
  background-color: #f7f9fc;
  border: 1px solid #dde5f0;
  border-radius: 8px;
  padding: 1.5rem 1.75rem !important;
  margin-top: 0.5rem;
}

.utpl-conv__section--contacto .utpl-conv__section-title {
  background-color: transparent;
  border-left-color: #003366;
}

.utpl-conv__section--contacto .utpl-conv__section-body a {
  color: #003366;
  font-weight: 600;
  text-underline-offset: 2px;
}

/* ...existing code... */

/* ===== NUEVA ESTRUCTURA: hero card + 2 columnas + sidebar ===== */
.utpl-conv__container {
  margin-top: -16px;
  position: relative;
  z-index: 2;
}

.utpl-conv__hero-card {
  background: #fff;
  border: 1px solid #dde5f0;
  border-radius: 10px;
  box-shadow: 0 6px 20px rgba(0, 51, 102, 0.08);
  padding: 1.25rem;
  margin-bottom: 1rem;
}

.utpl-conv__meta-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 0.75rem;
}

.utpl-conv__kpi-grid {
  display: grid;
  gap: 0.6rem;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.utpl-conv__layout {
  align-items: start;
}

.utpl-conv__section-card {
  background: #fff;
  border: 1px solid #e8edf5;
  border-radius: 10px;
  padding: 1.1rem 1.1rem 1.2rem;
  margin-bottom: 0.9rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.utpl-conv__section-card.utpl-conv__section {
  border-bottom: 1px solid #e8edf5;
}

.utpl-conv__aside-sticky {
  position: sticky;
  top: 90px;
}

.utpl-conv__aside-card {
  background: #fff;
  border: 1px solid #dde5f0;
  border-radius: 10px;
  padding: 1rem;
  box-shadow: 0 2px 10px rgba(0, 51, 102, 0.05);
}

.utpl-conv__aside-title {
  color: #003366;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  margin: 0 0 0.65rem;
}

.utpl-conv__toc {
  list-style: none;
  margin: 0;
  padding: 0;
}

.utpl-conv__toc li + li {
  margin-top: 0.35rem;
}

.utpl-conv__toc a {
  display: block;
  padding: 0.42rem 0.55rem;
  border-radius: 6px;
  color: #003366;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.88rem;
}

.utpl-conv__toc a:hover {
  background: #f0f4fa;
}

@media (max-width: 991.98px) {
  .utpl-conv__container {
    margin-top: 0;
  }

  .utpl-conv__aside-sticky {
    position: static;
  }
}

/* ...existing code... */

/* ===== NORMALIZACIÓN TIPOGRÁFICA ===== */
/* ...existing code... */
.utpl-conv {
  --utpl-font: "Montserrat", sans-serif;
  --utpl-text: #2f3a45;
  --utpl-title: #003366;
}
/* ...existing code... */

.utpl-conv,
.utpl-conv .utpl-conv__section-body,
.utpl-conv .utpl-conv__section-body p,
.utpl-conv .utpl-conv__section-body li,
.utpl-conv .utpl-conv__section-body a,
.utpl-conv .utpl-conv__section-body span,
.utpl-conv .utpl-conv__section-body td,
.utpl-conv .utpl-conv__section-body th,
.utpl-conv .utpl-conv__toc a,
.utpl-conv .utpl-conv__kpi-label,
.utpl-conv .utpl-conv__fecha-pill-label,
.utpl-conv .utpl-conv__fecha-pill-value {
  font-family: var(--utpl-font);
}

.utpl-conv .utpl-conv__titulo {
  font-family: var(--utpl-font);
  font-size: clamp(1.45rem, 1.2rem + 0.8vw, 1.9rem);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0;
  color: var(--utpl-title);
}

.utpl-conv .utpl-conv__section-title {
  font-family: var(--utpl-font);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.6px;
}

.utpl-conv .utpl-conv__section-body {
  font-size: 0.96rem;
  line-height: 1.75;
  color: var(--utpl-text);
  font-weight: 400;
}

.utpl-conv .utpl-conv__section-body p,
.utpl-conv .utpl-conv__section-body li {
  font-size: inherit;
  line-height: inherit;
}

.utpl-conv .utpl-conv__section-body strong,
.utpl-conv .utpl-conv__section-body b {
  font-weight: 700;
  color: #1d2a36;
}

.utpl-conv .utpl-conv__section-body em,
.utpl-conv .utpl-conv__section-body i {
  font-style: italic;
}

.utpl-conv .utpl-conv__section-body table {
  font-size: 0.9rem;
}

.utpl-conv .utpl-conv__toc a {
  font-size: 0.86rem;
  line-height: 1.35;
  font-weight: 600;
}

.utpl-conv .utpl-conv__kpi-valor {
  font-family: var(--utpl-font);
  font-weight: 800;
}

.utpl-conv .utpl-conv__kpi-label,
.utpl-conv .utpl-conv__fecha-pill-label {
  font-size: 0.69rem;
  letter-spacing: 0.5px;
}

.utpl-conv .utpl-conv__fecha-pill-value {
  font-size: 0.92rem;
  font-weight: 700;
}