/**
 * A.P.S · Capacitaciones en Seguridad
 */
:root {
    --aps-navy: #0f2744;
    --aps-cian: #1b8bca;
    --aps-naranja: #e85d04;
    --aps-rojo: #c2410c;
    --aps-verde: #0f766e;
    --aps-ink: #12233a;
    --aps-muted: #475569;
    --aps-card: #ffffff;
    --aps-sombra: 0 18px 40px rgba(15, 39, 68, 0.18);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body.aps-body {
    margin: 0;
    min-height: 100vh;
    font-family: "Outfit", system-ui, "Segoe UI", sans-serif;
    color: var(--aps-ink);
    background:
        radial-gradient(900px 420px at 6% 0%, rgba(27, 139, 202, 0.28), transparent 55%),
        radial-gradient(700px 380px at 96% 8%, rgba(232, 93, 4, 0.16), transparent 58%),
        linear-gradient(165deg, #0f2744 0%, #164e73 48%, #0b1c30 100%);
    background-attachment: fixed;
}

.oculto {
    display: none !important;
}

.aps-skip {
    position: absolute;
    left: -999px;
    top: 0;
    background: #fff;
    color: var(--aps-navy);
    padding: 8px 12px;
    z-index: 30;
}

.aps-skip:focus {
    left: 12px;
    top: 12px;
}

.aps-top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 18px;
    padding: 14px 22px;
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 3px solid rgba(27, 139, 202, 0.35);
    position: sticky;
    top: 0;
    z-index: 10;
}

.aps-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--aps-navy);
}

.aps-logo strong,
.aps-hero h1,
.aps-bloque h1,
.aps-bloque h2,
.aps-card strong {
    font-family: "Fredoka", "Outfit", sans-serif;
}

.aps-logo small {
    display: block;
    color: var(--aps-muted);
    font-size: 0.78rem;
}

.aps-logo__mark {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.aps-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-left: auto;
}

.aps-nav__link,
.aps-portal {
    text-decoration: none;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 999px;
    color: var(--aps-navy);
    font-size: 0.92rem;
}

.aps-nav__link.is-activa,
.aps-nav__link:hover {
    background: #e0f2fe;
    color: #0369a1;
}

.aps-portal {
    background: var(--aps-navy);
    color: #fff;
}

.aps-portal:hover {
    background: #164e73;
}

.aps-main {
    width: min(1120px, calc(100% - 28px));
    margin: 22px auto 48px;
}

.aps-hero {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 22px;
    align-items: stretch;
    background: var(--aps-card);
    border-radius: 28px;
    overflow: hidden;
    box-shadow: var(--aps-sombra);
}

.aps-hero__texto {
    padding: 28px 26px 30px;
}

.aps-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 10px;
    padding: 6px 12px;
    border-radius: 999px;
    background: #e0f2fe;
    color: #0369a1;
    font-weight: 700;
    font-size: 0.82rem;
}

.aps-hero h1,
.aps-bloque h1 {
    margin: 0 0 10px;
    font-size: clamp(1.7rem, 3vw, 2.4rem);
    color: var(--aps-navy);
    line-height: 1.15;
}

.aps-lead {
    margin: 0 0 18px;
    color: var(--aps-muted);
    font-size: 1.05rem;
    line-height: 1.55;
}

.aps-hero__foto {
    margin: 0;
    min-height: 280px;
}

.aps-hero__foto img,
.aps-modulo-foto img,
.aps-card img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.aps-hero__foto img {
    min-height: 280px;
}

.aps-bloque {
    margin-top: 28px;
    background: rgba(255, 255, 255, 0.96);
    border-radius: 28px;
    padding: 26px 22px 28px;
    box-shadow: var(--aps-sombra);
}

.aps-intro {
    color: var(--aps-muted);
    margin: 0 0 18px;
}

.aps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.aps-card {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    background: #f8fafc;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    min-height: 100%;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.aps-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 28px rgba(15, 39, 68, 0.16);
}

.aps-card__media {
    height: 168px;
    overflow: hidden;
    background: #0f2744;
}

.aps-card__media img {
    height: 168px;
}

.aps-card__body {
    padding: 14px 14px 16px;
}

.aps-card strong {
    display: block;
    color: var(--aps-navy);
    font-size: 1.05rem;
}

.aps-card span {
    display: block;
    margin-top: 4px;
    color: var(--aps-muted);
    font-size: 0.9rem;
}

.aps-card--navy .aps-card__media { box-shadow: inset 0 -4px 0 var(--aps-navy); }
.aps-card--cian .aps-card__media { box-shadow: inset 0 -4px 0 var(--aps-cian); }
.aps-card--naranja .aps-card__media { box-shadow: inset 0 -4px 0 var(--aps-naranja); }
.aps-card--rojo .aps-card__media { box-shadow: inset 0 -4px 0 var(--aps-rojo); }
.aps-card--verde .aps-card__media { box-shadow: inset 0 -4px 0 var(--aps-verde); }

.aps-modulo-foto {
    margin: 0 0 18px;
    border-radius: 22px;
    overflow: hidden;
    max-height: 420px;
}

.aps-modulo-foto img {
    max-height: 420px;
}

.aps-puntos {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 10px;
}

.aps-puntos li {
    background: #f1f5f9;
    border-left: 4px solid var(--aps-cian);
    border-radius: 12px;
    padding: 12px 14px;
}

.aps-puntos--naranja li { border-left-color: var(--aps-naranja); }
.aps-puntos--rojo li { border-left-color: var(--aps-rojo); }
.aps-puntos--verde li { border-left-color: var(--aps-verde); }
.aps-puntos--navy li { border-left-color: var(--aps-navy); }

.aps-acciones {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.aps-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    font-weight: 700;
    padding: 10px 16px;
    border-radius: 999px;
    background: var(--aps-cian);
    color: #fff;
}

.aps-btn:hover {
    background: #0e7490;
}

.aps-btn--suave {
    background: #e0f2fe;
    color: #0369a1;
}

.aps-pie {
    width: min(1120px, calc(100% - 28px));
    margin: 0 auto 28px;
    color: #dbeafe;
    font-size: 0.92rem;
}

.aps-pie p {
    margin: 0 0 6px;
}

@media (max-width: 820px) {
    .aps-hero {
        grid-template-columns: 1fr;
    }

    .aps-hero__foto img {
        min-height: 220px;
        max-height: 280px;
    }
}
