/* ==========================================================================
   Portal de Convocatoria CAS N° 001 – 2026 – GRA/GRAG
   Gerencia Regional de Agricultura de Arequipa
   CSS nativo · responsive: escritorio (10 columnas), tablet (3), celular (1)
   ========================================================================== */

:root {
  --guinda: #7a1733;
  --guinda-oscuro: #590f24;
  --guinda-claro: #a3224a;
  --dorado: #c8a24a;
  --tinta: #2e2e2e;
  --tinta-media: #5a5a5a;
  --tinta-suave: #8b8b8b;
  --linea: #e2dfdb;
  --fondo: #f6f5f2;
  --blanco: #ffffff;
  --carbon: #333333;
  --fuente: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--fondo);
  color: var(--tinta);
  font-family: var(--fuente);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--guinda);
}

img,
svg {
  max-width: 100%;
}

:focus-visible {
  outline: 3px solid var(--dorado);
  outline-offset: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.contenedor {
  width: min(1260px, 100% - 2.5rem);
  margin-inline: auto;
}

/* ---------------------------------------------------------------- Cinta --- */

.cinta {
  height: 8px;
  background: linear-gradient(90deg, var(--guinda-oscuro), var(--guinda) 45%, var(--guinda-claro));
}

/* -------------------------------------------------------------- Cabecera --- */

.cabecera {
  background-image: linear-gradient(120deg, var(--guinda-oscuro), var(--guinda) 55%, var(--guinda-claro));
  border-bottom: 3px solid var(--dorado);
  color: #fff;
  padding: 1.4rem 0 1.5rem;
}

.cabecera__interior {
  display: flex;
  align-items: center;
  gap: 1.1rem;
}

.cabecera__logo {
  flex: 0 0 auto;
  width: auto;
  height: 70px;
  padding: 7px 9px;
  background: var(--blanco);
  border-radius: 12px;
  box-shadow: 0 12px 24px -20px rgba(0, 0, 0, .9);
}

.cabecera__entidad {
  margin: 0 0 .35rem;
  font-size: .72rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .82);
}

.cabecera__titulo {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.2rem, 2.8vw, 1.85rem);
  font-weight: 700;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.cabecera__sub {
  margin: .4rem 0 0;
  font-size: .88rem;
  color: rgba(255, 255, 255, .85);
}

/* --------------------------------------------------------------- Tablero --- */

main.contenedor {
  padding: 1.6rem 0 2.4rem;
}

.estado-proceso {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  margin: 0 0 1rem;
  padding: .45rem .9rem;
  border: 1px solid var(--linea);
  border-radius: 999px;
  background: var(--blanco);
  color: var(--tinta-media);
  font-size: .8rem;
  font-weight: 600;
  line-height: 1.35;
}

.estado-proceso::before {
  content: "";
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--tinta-suave);
}

.estado-proceso--activo {
  border-color: #e6cfd7;
  background: #fffaf2;
  color: var(--guinda);
}

.estado-proceso--activo::before {
  background: var(--guinda);
  box-shadow: 0 0 0 4px rgba(122, 23, 51, .12);
}

.tablero {
  display: grid;
  grid-template-columns: 1.25fr repeat(9, minmax(0, 1fr));
  background: var(--blanco);
  border: 1px solid var(--linea);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 16px 34px -30px rgba(0, 0, 0, .55);
}

.tablero__col {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  border-right: 1px solid var(--linea);
}

.tablero__col:last-child {
  border-right: 0;
}

.tablero__head {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .35rem;
  margin: 0;
  min-height: 78px;
  padding: .85rem .45rem;
  background: var(--carbon);
  color: #fff;
  font-size: .67rem;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: .05em;
  text-align: center;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

.tablero__col + .tablero__col .tablero__head {
  border-left: 1px solid rgba(255, 255, 255, .1);
}

.tablero__estado {
  display: inline-block;
  padding: .12rem .45rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, .18);
  color: #fff;
  font-size: .54rem;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.tablero__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .8rem;
  padding: 1.1rem .45rem 1.3rem;
}

/* ------------------------------------------- Estado según la fecha de hoy --- */

.tablero__col--actual .tablero__head {
  background: var(--guinda);
}

.tablero__col--actual .tablero__body {
  background: #fffaf1;
}

.tablero__col--actual .tablero__estado {
  background: var(--dorado);
  color: #2c2107;
}

.tablero__col--actual::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 2px var(--dorado);
  pointer-events: none;
}

.tablero__col--concluida .tablero__head {
  background: #77797b;
}

.tablero__col--concluida .tablero__body {
  background: #fafafa;
}

.tablero__col--concluida .doc,
.tablero__col--concluida .etapa__fecha,
.tablero__col--concluida .etapa__texto {
  opacity: .78;
}

/* ------------------------------------------------- Fecha y descripción --- */

.etapa__fecha {
  margin: 0;
  padding: .18rem .5rem;
  border-radius: 999px;
  background: #f7edf0;
  color: var(--guinda);
  font-size: .65rem;
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
  overflow-wrap: anywhere;
}

.etapa__texto {
  margin: 0;
  font-size: .71rem;
  line-height: 1.4;
  color: var(--tinta-media);
  text-align: center;
  overflow-wrap: anywhere;
}

/* ------------------------------------------------------------ Documentos --- */

.doc {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .4rem;
  width: 100%;
  padding: .3rem .1rem;
  border-radius: 8px;
  color: var(--guinda);
  font-size: .76rem;
  font-weight: 600;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
  overflow-wrap: anywhere;
  transition: background .15s ease, transform .15s ease;
}

.doc:hover {
  background: #f8eef1;
  transform: translateY(-1px);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.doc__icono {
  display: block;
  width: 32px;
  height: 40px;
  color: var(--guinda);
}

.doc__icono svg {
  display: block;
  width: 100%;
  height: 100%;
}

.doc--web .doc__icono {
  width: 28px;
  height: 28px;
  margin-block: 6px;
}

.doc--pendiente {
  color: #9a9a9a;
  cursor: not-allowed;
}

.doc--pendiente .doc__icono {
  color: #c0c0c0;
}

.doc--pendiente:hover {
  background: transparent;
  transform: none;
  text-decoration: none;
}

.doc__estado {
  display: inline-block;
  padding: .05rem .45rem;
  border: 1px solid #d8d8d8;
  border-radius: 999px;
  font-size: .6rem;
  font-weight: 600;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: #909090;
}

/* ------------------------------------------------ Columna de convocatoria --- */

.info {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  padding: .4rem .25rem;
  text-align: center;
}

.info__codigo {
  margin: 0;
  font-size: .88rem;
  font-weight: 700;
  color: var(--guinda);
  overflow-wrap: anywhere;
}

.info__titulo {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: .92rem;
  line-height: 1.4;
  color: var(--tinta);
}

.info__detalle {
  margin: 0;
  font-size: .73rem;
  color: var(--tinta-media);
  overflow-wrap: anywhere;
}

.info__detalle strong {
  color: var(--guinda);
}

/* ------------------------------------------------------------------- Nota --- */

.nota {
  margin: .9rem 0 0;
  font-size: .78rem;
  color: var(--tinta-suave);
}

/* -------------------------------------------------------------------- Pie --- */

.pie {
  background: var(--guinda-oscuro);
  color: rgba(255, 255, 255, .78);
  font-size: .78rem;
  padding: 1.5rem 0 1.3rem;
  text-align: center;
}

.pie p {
  margin: 0;
  overflow-wrap: anywhere;
}

.pie .pie__entidad {
  font-size: .92rem;
  font-weight: 700;
  color: #fff;
}

.pie .pie__direccion {
  margin-top: .2rem;
}

.pie .pie__credito {
  margin-top: .95rem;
  padding-top: .9rem;
  border-top: 1px solid rgba(255, 255, 255, .16);
  color: rgba(255, 255, 255, .9);
}

.pie .pie__credito strong {
  color: var(--dorado);
  font-weight: 700;
}

.pie .pie__legal {
  margin-top: .35rem;
  font-size: .7rem;
  color: rgba(255, 255, 255, .55);
}

/* --------------------------------------------------------------- Tablet ---
   701 px a 1199 px: tarjetas de 3 columnas, sin scroll horizontal.
   -------------------------------------------------------------------------- */

@media (max-width: 1199px) {
  .tablero {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .9rem;
    background: transparent;
    border: 0;
    border-radius: 0;
    overflow: visible;
    box-shadow: none;
  }

  .tablero__col {
    border: 1px solid var(--linea);
    border-radius: 10px;
    overflow: hidden;
    background: var(--blanco);
    box-shadow: 0 10px 22px -22px rgba(0, 0, 0, .55);
  }

  .tablero__head {
    min-height: 62px;
    padding: .6rem .7rem;
    background: var(--guinda);
    font-size: .7rem;
  }

  .tablero__col + .tablero__col .tablero__head {
    border-left: 0;
  }

  .tablero__body {
    align-items: stretch;
    gap: .45rem;
    padding: .65rem .65rem .9rem;
  }

  .etapa__fecha,
  .etapa__texto {
    align-self: flex-start;
    text-align: left;
  }

  .doc {
    flex-direction: row;
    justify-content: flex-start;
    gap: .7rem;
    padding: .45rem .5rem;
    font-size: .82rem;
    text-align: left;
  }

  .doc__icono {
    flex: 0 0 auto;
    width: 22px;
    height: 28px;
  }

  .doc--web .doc__icono {
    width: 22px;
    height: 22px;
    margin-block: 3px;
  }

  .info {
    text-align: left;
    padding: .25rem .5rem;
  }

  .tablero__col--actual {
    border-color: var(--dorado);
  }
}

/* --------------------------------------------------------------- Celular ---
   Hasta 700 px: una sola columna a todo el ancho.
   -------------------------------------------------------------------------- */

@media (max-width: 700px) {
  .contenedor {
    width: min(1260px, 100% - 1.6rem);
  }

  .cabecera {
    padding: 1.1rem 0 1.2rem;
  }

  .cabecera__interior {
    align-items: flex-start;
    gap: .8rem;
  }

  .cabecera__logo {
    height: 50px;
    padding: 5px 6px;
    border-radius: 10px;
  }

  .cabecera__entidad {
    font-size: .62rem;
    letter-spacing: .08em;
  }

  .cabecera__sub {
    font-size: .82rem;
  }

  main.contenedor {
    padding: 1.2rem 0 1.8rem;
  }

  .estado-proceso {
    width: 100%;
    border-radius: 10px;
    font-size: .76rem;
  }

  .tablero {
    grid-template-columns: 1fr;
    gap: .75rem;
  }

  .tablero__head {
    justify-content: flex-start;
    align-items: flex-start;
    min-height: 0;
    padding: .6rem .85rem;
    text-align: left;
    font-size: .68rem;
  }

  .tablero__body {
    padding: .55rem .5rem .9rem;
  }

  .doc {
    font-size: .85rem;
    padding: .5rem .6rem;
  }

  .doc__icono {
    width: 24px;
    height: 30px;
  }

  .doc--web .doc__icono {
    width: 24px;
    height: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
  }
}
