/* ==========================================================================
   ACG — estilos públicos (certificado + listado).
   Reutiliza los tokens --aqf-* del tema. Componentes adaptados del prototipo.
   ========================================================================== */

/* HERO del certificado */
.acg-hero {
  background: var(--aqf-gradient, linear-gradient(120deg, #28C7A1 0%, #0072CE 100%));
  color: #fff; padding: 56px 0 64px; position: relative;
}
.acg-hero::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: var(--aqf-gradient-scrim, linear-gradient(100deg, rgba(0,40,70,.42), rgba(0,40,70,.05) 60%));
}
.acg-hero > .aqf-container { position: relative; z-index: 1; }
.acg-hero__inner { display: grid; grid-template-columns: 1fr 300px; gap: 48px; align-items: center; }
.acg-hero h1 { color: #fff; font-size: 34px; font-weight: 800; line-height: 1.15; margin: 14px 0 12px; }
.acg-hero__loc { font-size: 17px; opacity: .92; }
.acg-hero__tag { font-style: italic; margin-top: 22px; font-size: 15px; opacity: .85; }
.acg-certid {
  display: inline-block; background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.3);
  border-radius: 8px; padding: 8px 16px; font-size: 13px; font-weight: 600;
  letter-spacing: .05em; text-transform: uppercase;
}

/* QR badge */
.acg-qr { background: #fff; border-radius: 16px; padding: 24px; text-align: center; color: var(--aqf-dark-gray); box-shadow: 0 20px 50px rgba(0,0,0,.25); }
.acg-qr__code { width: 180px; height: 180px; margin: 0 auto 12px; display: flex; align-items: center; justify-content: center; }
.acg-qr__code img { display: block; }
.acg-qr__label { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--aqf-gray); font-weight: 600; }
.acg-qr__link { font-size: 13px; color: var(--aqf-primary); font-weight: 600; word-break: break-all; margin-top: 2px; }
.acg-qr__cta { display: inline-block; margin-top: 12px; padding: 6px 14px; border-radius: 100px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: #fff; }
/* Sello oficial junto al QR */
.acg-seal { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-bottom: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--aqf-border); }
.acg-seal__mark { width: 176px; max-width: 100%; height: auto; object-fit: contain; }
.acg-seal__top { font-size: 10px; font-weight: 700; letter-spacing: .18em; color: var(--aqf-gray); }
.acg-state-vigente { background: var(--aqf-ok); }
.acg-state-en_proceso { background: #c77f0a; }
.acg-state-suspendido { background: var(--aqf-warn); }
.acg-state-revocado { background: var(--aqf-err); }

/* Aviso "en proceso de certificación" en la ficha pública */
.acg-notice-proceso {
	background: #fff6e6;
	border: 1px solid #f0d9a8;
	border-left: 4px solid #c77f0a;
	border-radius: 12px;
	padding: 16px 20px;
	margin: 0 0 4px;
	color: #6b4e12;
	font-size: 14px;
	line-height: 1.5;
}
.acg-notice-proceso strong { color: #8a6410; }
.acg-notice-proceso__wrap { padding-top: 28px; }

/* Encabezados de sección del certificado */
.acg-h2 { font-size: 26px; color: var(--aqf-primary); margin-bottom: 6px; }
.acg-sub { color: var(--aqf-gray); margin-bottom: 28px; }

/* KPIs */
.acg-kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.acg-kpi { background: #fff; border: 1px solid var(--aqf-border); border-left: 4px solid var(--aqf-accent); border-radius: 12px; padding: 24px; }
.aqf-section--alt .acg-kpi { background: var(--aqf-bg); }
.acg-kpi__label { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--aqf-gray); font-weight: 600; margin-bottom: 8px; }
.acg-kpi__value { font-size: 30px; font-weight: 800; color: var(--aqf-primary); line-height: 1; margin-bottom: 6px; }
.acg-kpi__unit { font-size: 14px; color: var(--aqf-gray); }
.acg-kpi__trend { font-size: 12px; margin-top: 8px; color: var(--aqf-ok); }

/* Compromisos */
.acg-commits { display: grid; gap: 16px; }
.acg-commit { background: #fff; border: 1px solid var(--aqf-border); border-radius: 12px; padding: 20px 24px; display: grid; grid-template-columns: 1fr 180px 64px; gap: 24px; align-items: center; }
.aqf-section--alt .acg-commit { background: var(--aqf-bg); }
.acg-commit__text { font-weight: 500; }
.acg-commit__track { background: var(--aqf-border); height: 8px; border-radius: 100px; overflow: hidden; }
.acg-commit__fill { height: 100%; background: var(--aqf-ok); border-radius: 100px; }
.acg-commit__pct { text-align: right; font-weight: 700; color: var(--aqf-primary); }

/* Trazabilidad */
.acg-trace { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.acg-trace__card { background: #fff; border: 1px solid var(--aqf-border); border-radius: 12px; padding: 24px; }
.aqf-section--alt .acg-trace__card { background: var(--aqf-bg); }
.acg-trace__role { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--aqf-gray); font-weight: 600; margin-bottom: 6px; }
.acg-trace__name { font-weight: 700; color: var(--aqf-primary); margin-bottom: 4px; }
.acg-trace__org { font-size: 14px; color: var(--aqf-gray); }

/* Descargas */
.acg-downloads { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.acg-dl { background: #fff; border: 1px solid var(--aqf-border); border-radius: 12px; padding: 20px; display: flex; gap: 16px; align-items: center; text-decoration: none; color: inherit; transition: transform .2s, box-shadow .2s; }
.acg-dl:hover { transform: translateY(-2px); box-shadow: var(--aqf-shadow-md); }
.acg-dl--pending { opacity: .65; }
.acg-dl__icon { background: var(--aqf-primary); color: #fff; width: 44px; height: 44px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 12px; flex: 0 0 auto; }
.acg-dl__title { font-weight: 600; color: var(--aqf-primary); display: block; }
.acg-dl__meta { font-size: 12px; color: var(--aqf-gray); }

/* Pie certificado */
.acg-foot { text-align: center; color: var(--aqf-gray); font-size: 13px; }

/* ===== Listado ===== */
.acg-filters { display: flex; gap: 8px; margin-bottom: 28px; flex-wrap: wrap; }
.acg-filter { padding: 8px 18px; border-radius: 100px; border: 1px solid var(--aqf-border); text-decoration: none; color: var(--aqf-dark-gray); font-weight: 600; font-size: 14px; }
.acg-filter.is-active, .acg-filter:hover { background: var(--aqf-primary); color: #fff; border-color: var(--aqf-primary); }

.acg-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.acg-card { background: #fff; border: 1px solid var(--aqf-border); border-radius: 12px; padding: 22px; text-decoration: none; color: inherit; box-shadow: var(--aqf-shadow-sm); transition: transform .2s, box-shadow .2s; }
.acg-card:hover { transform: translateY(-2px); box-shadow: var(--aqf-shadow-md); }
.acg-card__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.acg-card__tip { font-weight: 800; font-size: 13px; color: #fff; padding: 3px 10px; border-radius: 100px; }
.acg-tip-sp { background: var(--aqf-sp); } .acg-tip-cs { background: var(--aqf-cs); } .acg-tip-ap { background: var(--aqf-ap); }
.acg-card__id { font-size: 12px; color: var(--aqf-gray); letter-spacing: .04em; }
.acg-card__title { color: var(--aqf-primary); font-size: 18px; margin-bottom: 4px; }
.acg-card__client { color: var(--aqf-gray); font-size: 14px; }
.acg-card__date { color: var(--aqf-gray); font-size: 13px; margin: 6px 0 12px; }
.acg-card__mods { gap: 6px; }
.acg-card__mods .aqf-pill { font-size: 11px; padding: 4px 10px; }

.acg-pagination { margin-top: 32px; display: flex; gap: 6px; }
.acg-pagination .page-numbers { padding: 8px 14px; border: 1px solid var(--aqf-border); border-radius: 8px; text-decoration: none; color: var(--aqf-primary); }
.acg-pagination .page-numbers.current { background: var(--aqf-primary); color: #fff; }

/* Responsive */
@media (max-width: 900px) {
  .acg-hero__inner { grid-template-columns: 1fr; gap: 28px; }
  .acg-qr { max-width: 280px; margin: 0 auto; }
  .acg-kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .acg-commit { grid-template-columns: 1fr; gap: 10px; }
  .acg-commit__pct { text-align: left; }
  .acg-trace, .acg-downloads, .acg-cards { grid-template-columns: 1fr; }
}
@media (max-width: 500px) {
  .acg-hero h1 { font-size: 26px; }
  .acg-kpi-grid { grid-template-columns: 1fr; }
}
