/* ====== CONTENEDOR ====== */
.v5-aviso-detalle{
  max-width: 800px !important;  
  margin: 36px auto;
  padding: 20px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  box-shadow: 0 8px 18px rgba(0,0,0,.04);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

/* ====== TÍTULO ====== */
.aviso-titulo{
  margin: 0 0 16px;
  font-size: 1.8rem;
  line-height: 1.25;
  font-weight: 700;
  color: #1f2937;
  border-bottom: 1px solid #f1f5f9;
  padding-bottom: 12px;
}

/* separador bajo cada fila de metadatos */
.aviso-meta .meta-item{
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 10px;
  align-items: center;
  font-size: 14px;

  padding-bottom: 2px;               /* espacio antes de la línea */
  margin-bottom: 2px;                /* separación con la siguiente */
  border-bottom: 1px solid #edf2f7;  /* línea sutil */
}
.aviso-meta .meta-item:last-child{
  border-bottom: 0;                  /* sin línea en la última */
  margin-bottom: 0;
  padding-bottom: 0;
}


/* ====== 3 SECTORES ====== */
/*  Izq: logo (col fija)  |  Centro: meta (fluida)  |  Der: acciones + KPIs (col fija)  */
.aviso-top{
  display: grid;
  grid-template-columns: 120px 1fr 230px; /* ✅ tres sectores */
  gap: 20px;
  align-items: start;
}

/* --- IZQUIERDA: LOGO --- */
.aviso-logo{
  width: 120px;
  height: 120px;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  background: #f8fafc;
  overflow: hidden;
  display: grid;
  place-items: center;
}
.aviso-logo img{
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.logo-placeholder{
  color: #9ca3af;
  font-weight: 700;
}

/* --- CENTRO: META --- */
.aviso-meta{
  display: grid;
  gap: 8px;
}
.meta-item{
  display: grid;
  grid-template-columns: 190px 1fr; /* etiqueta | valor */
  gap: 10px;
  align-items: center;
  font-size: 14px;
}
.meta-label{
  color: #6b7280;
  font-weight: 700;
}
.meta-value{
  color: #111827;
  word-break: break-word;
}

/* --- DERECHA: ACCIONES + KPIs --- */
.aviso-side{
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 14px;
}
.acciones{
  display: grid;
  gap: 10px; /* botones apilados (como tu esquema) */
}
#btn-postular{
  background: #2196F3;   /* azul corporativo */
  color: #fff;
  border: none;
  padding: 12px 14px;
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
  transition: transform .04s ease-in-out, opacity .2s ease-in-out;
}
#btn-postular:hover{ opacity: .95; }
#btn-postular:active{ transform: translateY(1px); }

#btn-compartir{
  background: #FA1188;   /* fucsia corporativo */
  color: #fff;
  border: none;
  padding: 12px 14px;
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
  transition: transform .04s ease-in-out, opacity .2s ease-in-out;
}
#btn-compartir:hover{ opacity: .95; }
#btn-compartir:active{ transform: translateY(1px); }

.kpis{
  margin-top: 6px;
  border-top: 1px dashed #e5e7eb;
  padding-top: 10px;
  display: grid;
  gap: 8px;
  font-size: 14px;
}
.kpi-row{
  display: flex;
  justify-content: space-between;
  color: #374151;
}
.kpi-label{ color: #6b7280; }
.kpi-value{ font-weight: 700; }

/* ====== DESCRIPCIÓN ====== */
.aviso-descripcion{
  margin-top: 24px;
  border-top: 1px solid #eef2f7;
  padding-top: 16px;
}
.aviso-descripcion h3{
  margin: 0 0 10px;
  color: #2196F3;
  font-size: 1.1rem;
}
.aviso-descripcion p{
  margin: 0 0 12px;
  line-height: 1.65;
  color: #1f2937;
}

/* ====== VOLVER ====== */
/* reemplaza el bloque anterior de .btn-volver por este */
.btn-volver{
  display: inline-block;
  background: #FA1188;     /* fucsia corporativo, igual que #btn-compartir */
  color: #fff;
  border: none;
  padding: 12px 14px;
  border-radius: 10px;
  font-weight: 700;
  text-decoration: none !important;
  cursor: pointer;
  transition: transform .04s ease-in-out, opacity .2s ease-in-out;
}
.btn-volver:hover{ opacity: .95; }
.btn-volver:active{ transform: translateY(1px); }



.btn-volver:hover{
  background: #FA1188;
  color: #fff;
}

@media (max-width: 840px){
  .v5-aviso-detalle{ padding: 16px; }
  .aviso-titulo{ font-size: 1.4rem; margin-bottom: 12px; }

  /* flujo en columna y orden correcto */
  .aviso-top{
    display: flex;
    flex-direction: column;
    gap: 14px;
  }
  .aviso-logo{ order: 1; align-self: flex-start; width: 96px; height: 96px; }
  .aviso-meta{ order: 2; }

  /* === BLOQUE LATERAL (acciones + KPIs) centrado === */
  .aviso-side{
    order: 3;
    display: flex;
    flex-direction: column;
    gap: 14px;           /* separación interna */
    margin-top: 14px;    /* aire respecto a los metadatos */
    align-items: center; /* centra todo */
    width: 100%;
  }

  /* BOTONES uno al lado del otro, centrados */
  .acciones{
    order: 1;
    display: flex;
    gap: 12px;
    justify-content: center;
    width: 100%;
  }
  #btn-postular, #btn-compartir{
    flex: 1;
    max-width: 160px;  /* evita que crezcan demasiado */
  }

  /* KPIs lado a lado y centrados */
  .kpis{
    order: 2;
    display: flex;
    gap: 24px;
    justify-content: center;
    border-top: 1px dashed #e5e7eb;
    padding-top: 10px;
    width: 100%;
  }
  .kpi-row{
    display: flex;
    gap: 6px;
    font-size: 14px;
    color: #374151;
  }

  /* Metadatos apilados y compactos */
  .meta-item{
    grid-template-columns: 1fr;      
    gap: 4px;
    align-items: flex-start;
  }
  .aviso-meta .meta-item{
    padding-bottom: 6px;
    margin-bottom: 6px;
    border-bottom: 1px solid #f1f5f9;
  }
  .aviso-meta .meta-item:last-child{
    border-bottom: 0;
    margin-bottom: 0;
    padding-bottom: 0;
  }

  /* === BOTÓN VOLVER centrado === */
  .btn-volver{
    display: block;
    width: fit-content;
    margin: 22px auto 0; /* centrado con aire extra */
    text-align: center;
    padding-left: 18px;
    padding-right: 18px;
  }
}


.aviso-banner{
  padding: 12px 14px;
  border-radius: 8px;
  margin: 10px 0 16px;
  font-size: 14px;
}
.aviso-expirado{
  background: #fff5e6;
  border: 1px solid #ffd8a8;
}
.aviso-finalizado-banner{
  background: #ffe9e9;
  border: 1px solid #ffb3b3;
}
#btn-postular.is-disabled{
  opacity: .6;
  cursor: not-allowed;
}



/* ====== MODAL (compacto, sin blur y centrado) ====== */
.modal-preguntas-overlay{
  position: fixed; inset: 0;
  display: none;                 /* el JS la pone en grid */
  place-items: center;           /* centra el modal */
  padding: 12px;                 /* margen de seguridad en móviles */
  background: rgba(0,0,0,.55);   /* sin blur, fondo un poco más oscuro */
  z-index: 1000;
}

/* Caja más compacta, sin “aire” sobrante a los lados */
.modal-preguntas-contenido{
  background: #fff;
  width: auto;                   /* deja que el contenido “mande” */
  max-width: 460px;              /* más angosto que antes */
  min-width: 320px;              /* evita que se achique demasiado en desktop */
  padding: 16px 18px;            /* reduce relleno lateral */
  border-radius: 10px;
  box-shadow: 0 20px 60px rgba(0,0,0,.22);
  position: relative;
}

/* Tipografía y espaciado contenidos */
.modal-preguntas-contenido h3{
  margin: 0 0 10px;
  font-size: 1.05rem;
  line-height: 1.35;
  color: #0f172a;
  font-weight: 700;
}
.modal-preguntas-contenido p{
  margin: 0 0 12px;
  font-size: .95rem;
  color: #334155;
}

/* Campos de preguntas (si aplica) */
.modal-preguntas-contenido label{
  display: block;
  margin: 10px 0 6px;
  font-weight: 700;
  color: #374151;
}
.modal-preguntas-contenido textarea{
  width: 100%;
  min-height: 70px;
  resize: vertical;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 10px 12px;
  font: inherit;
}

/* Botonera centrada */
.modal-preguntas-contenido .modal-buttons{
  display: flex;
  justify-content: center;       /* centra horizontalmente */
  gap: 12px;
  margin-top: 14px;
}

/* Botones base */
.modal-preguntas-contenido button{
  border: none;
  padding: 12px 16px;
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
  color: #fff;
  transition: opacity .15s ease-in-out, transform .04s ease-in-out;
}
.modal-preguntas-contenido button:hover{ opacity: .95; }
.modal-preguntas-contenido button:active{ transform: translateY(1px); }

/* Variantes de color */
.modal-preguntas-contenido button.primary{  background: #2196F3; } /* azul corporativo */
.modal-preguntas-contenido button.secondary{ background: #FA1188; } /* fucsia corporativo */

/* Cerrar (X) */
.modal-cerrar{
  position: absolute; top: 8px; right: 10px;
  font-size: 20px; font-weight: 700; color:#94a3b8; cursor: pointer; line-height: 1;
}
.modal-cerrar:hover{ color:#0f172a; }

/* Móvil muy pequeño: caja fluida sin aire sobrante */
@media (max-width: 420px){
  .modal-preguntas-contenido{
    max-width: 92vw;
    min-width: 0;
    padding: 14px;
    border-radius: 10px;
  }
}
