:root {
  --agp-navy: #06213a;
  --agp-blue: #536f96;
  --agp-cyan: #19c6cf;
  --agp-green: #2f8a45;
  --agp-amber: #e9a52f;
  --agp-red: #bb3e45;
  --agp-gray: #d7dbe0;
  --agp-ink: #17212b;
  --agp-soft: #f5f7f9;
}

.single-ag_proceso .jupiterx-main-header {
  display: none;
}

/* JupiterX keeps the home page body classes when previewing this CPT. */
.jupiterx-main:has(.agp-process) > .jupiterx-main-header {
  display: none;
}

.agp-process,
.agp-index {
  color: var(--agp-ink);
  font-family: inherit;
  margin: 0 auto;
  max-width: 1180px;
}

.agp-hero {
  background: linear-gradient(135deg, var(--agp-navy), #123f63);
  border-radius: 18px;
  color: #fff;
  margin-bottom: 28px;
  overflow: hidden;
  padding: clamp(30px, 5vw, 64px);
  position: relative;
}

.agp-hero::after {
  background: var(--agp-cyan);
  content: "";
  height: 6px;
  inset: auto 0 0;
  position: absolute;
}

.agp-hero h1 {
  color: #fff;
  font-size: clamp(30px, 4.5vw, 52px);
  line-height: 1.08;
  margin: 8px 0 14px;
}

.agp-hero p { font-size: 18px; margin: 0; max-width: 780px; }
.agp-kicker { color: var(--agp-cyan); font-size: 13px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.agp-status-row { align-items: center; display: flex; flex-wrap: wrap; gap: 14px; margin-top: 22px; }
.agp-badge { border-radius: 999px; display: inline-flex; font-size: 12px; font-weight: 800; padding: 7px 12px; text-transform: uppercase; }
.agp-badge--current { background: var(--agp-amber); color: #2b210d; }
.agp-section { background: #fff; border: 1px solid #e1e6eb; border-radius: 16px; box-shadow: 0 8px 30px rgba(6,33,58,.06); margin: 0 0 24px; padding: clamp(22px, 4vw, 38px); }
.agp-section h2 { color: var(--agp-navy); font-size: clamp(24px, 3vw, 34px); margin: 0 0 20px; }
.agp-progress, .agp-mini-progress { background: #e4e7ea; border-radius: 999px; overflow: hidden; }
.agp-progress { height: 22px; }
.agp-progress span, .agp-mini-progress span { background: linear-gradient(90deg, var(--agp-green), var(--agp-green)); display: block; height: 100%; }
.agp-data-grid { display: grid; gap: 0; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; }
.agp-data-grid > div { border-bottom: 1px solid #e6e9ed; display: grid; gap: 12px; grid-template-columns: minmax(150px, .7fr) 1.3fr; padding: 14px 8px; }
.agp-data-grid dt { color: var(--agp-navy); font-weight: 800; }
.agp-data-grid dd { margin: 0; }
.agp-timeline { display: grid; gap: 13px; }
.agp-stage { --stage-color: var(--agp-gray); border: 1px solid #dfe4e8; border-left: 6px solid var(--stage-color); border-radius: 12px; overflow: hidden; }
.agp-stage--cumplida { --stage-color: var(--agp-green); }
.agp-stage--en-curso { --stage-color: var(--agp-amber); }
.agp-stage--aplazada { --stage-color: var(--agp-red); }
.agp-stage__button { align-items: center; background: #fff; border: 0; color: inherit; cursor: pointer; display: grid; font: inherit; gap: 14px; grid-template-columns: 42px minmax(0, 1fr) minmax(170px, auto) 22px; padding: 18px; text-align: left; width: 100%; }
.agp-stage__button:hover, .agp-stage__button:focus-visible { background: var(--agp-soft); outline: 0; }
.agp-stage__number { align-items: center; background: var(--stage-color); border-radius: 50%; color: #fff; display: inline-flex; font-weight: 900; height: 36px; justify-content: center; width: 36px; }
.agp-stage__title { color: var(--agp-navy); font-weight: 800; line-height: 1.3; }
.agp-stage__title small { color: #67717b; display: block; font-size: 11px; letter-spacing: .07em; margin-bottom: 3px; text-transform: uppercase; }
.agp-stage__dates { color: #58636d; font-size: 13px; text-align: right; }
.agp-stage__chevron { font-size: 20px; transition: transform .2s ease; }
.agp-stage__button[aria-expanded="true"] .agp-stage__chevron { transform: rotate(180deg); }
.agp-stage__detail { background: var(--agp-soft); border-top: 1px solid #e1e5e8; display: grid; gap: 18px; grid-template-columns: repeat(3, 1fr); padding: 20px 24px 24px 74px; }
.agp-stage__detail[hidden] { display: none; }
.agp-stage__detail h3 { color: var(--agp-navy); font-size: 14px; margin: 0 0 7px; }
.agp-stage__detail p { font-size: 14px; margin: 0; }
.agp-creditor { background: #fff8e9; border-radius: 9px; padding: 14px; }
.agp-doc-grid, .agp-grid { display: grid; gap: 18px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.agp-doc-card, .agp-card { background: var(--agp-soft); border: 1px solid #e1e5e8; border-radius: 12px; padding: 20px; }
.agp-doc-card h3, .agp-card h2 { color: var(--agp-navy); margin: 0 0 14px; }
.agp-doc-card ul { list-style: none; margin: 0; padding: 0; }
.agp-doc-card li { border-top: 1px solid #dde2e6; padding: 11px 0; }
.agp-doc-card li:first-child { border-top: 0; }
.agp-doc-card a { color: #0c6279; font-weight: 700; }
.agp-doc-card small { color: #65717c; display: block; }
.agp-muted { color: #6b747d; }
.agp-contact { border-top: 5px solid var(--agp-cyan); }
.agp-warning { background: #eef4f8; border-left: 5px solid var(--agp-blue); border-radius: 10px; font-size: 14px; margin: 26px 0; padding: 20px; }
.agp-grid { margin: 28px 0; }
.agp-card h2 { font-size: 22px; margin-top: 14px; }
.agp-card h2 a { color: var(--agp-navy); }
.agp-mini-progress { height: 9px; margin: 18px 0 8px; }
.agp-button { background: var(--agp-navy); border-radius: 8px; color: #fff !important; display: inline-block; font-weight: 800; margin-top: 10px; padding: 11px 16px; }
.agp-empty { background: var(--agp-soft); border-radius: 12px; padding: 28px; text-align: center; }

@media (max-width: 850px) {
  .agp-data-grid, .agp-doc-grid, .agp-grid { grid-template-columns: 1fr; }
  .agp-stage__button { grid-template-columns: 40px minmax(0, 1fr) 22px; }
  .agp-stage__dates { grid-column: 2 / 3; grid-row: 2; text-align: left; }
  .agp-stage__chevron { grid-column: 3; grid-row: 1; }
  .agp-stage__detail { grid-template-columns: 1fr; padding: 20px; }
}

@media (max-width: 560px) {
  .agp-section { border-radius: 10px; padding: 20px 16px; }
  .agp-data-grid > div { grid-template-columns: 1fr; gap: 4px; }
}
