/* ═══════════════════════════════════════════════════════════════════════
   CERTIFICADOS — estilos
   Buscador por documento → certificados con sus datos de verificación.
   Mismo diseño que Manual de convivencia (manual-convivencia.css).
═══════════════════════════════════════════════════════════════════════ */

/* ── Paleta de la pagina: indigo tomado de la foto del hero ──────────────
   Se reasignan las variables del tema solo dentro de esta pagina (la hoja
   se encola unicamente en esta plantilla), asi el azul global no se toca.
   .pg-wrap va incluido para que el enlace de volver tome el mismo tono. */
.pg-wrap,
.cert-wrap {
    --color-azul-900: #1E1B4B;
    --color-azul-700: #4338CA;
    --color-azul-500: #6366F1;
    --color-azul-300: #A5B4FC;
    --color-azul-100: #E0E7FF;
    --color-azul-50: #F5F7FF;
    --shadow-azul: 0 4px 16px rgba(30, 27, 75, .10);
    --shadow-azul-hover: 0 8px 28px rgba(30, 27, 75, .16);
    --shadow-btn: 0 6px 18px rgba(67, 56, 202, .35);
}


.cert-wrap {
    max-width: 980px;
    margin: 0 auto 80px;
    padding: 0 40px;
    font-family: 'Outfit', sans-serif;
    color: var(--color-texto-principal);
}

.cert-wrap :where(input, button) {
    font-family: 'Outfit', sans-serif;
    font-size: 15px;
}

/* ── Hero ── */
.cert-hero {
    position: relative;
    display: flex;
    min-height: 300px;
    border-radius: 20px;
    overflow: hidden;
    background: linear-gradient(120deg, var(--color-azul-900) 0%, var(--color-azul-700) 55%, var(--color-azul-500) 100%);
    box-shadow: var(--shadow-azul);
}

.cert-hero-media {
    position: relative;
    width: 42%;
    flex-shrink: 0;
}

.cert-hero-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* En movil la franja es baja y ancha: sube el encuadre a la cara. */
    object-position: 50% 22%;
    display: block;
}

/* Funde la foto con el degradado del hero para que el texto siempre contraste. */
.cert-hero-media::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(30, 27, 75, 0) 0%, rgba(30, 27, 75, .12) 45%, rgba(30, 27, 75, .32) 75%, rgba(30, 27, 75, .5) 100%);
}

.cert-hero-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 48px 44px;
}

.cert-hero-title {
    font-size: 44px;
    font-weight: 900;
    line-height: 1.02;
    letter-spacing: -1px;
    color: #fff;
    margin: 0;
}

.cert-hero-sub {
    font-size: 19px;
    font-weight: 400;
    color: var(--color-azul-100);
    margin: 14px 0 0;
    max-width: 460px;
}

/* ── Buscador ── */
.cert-intro {
    background: var(--color-azul-50);
    border: 1px solid var(--color-azul-100);
    border-radius: 14px;
    padding: 18px 22px;
    margin-top: 22px;
}

.cert-intro p {
    margin: 0;
    font-size: 15.5px;
    color: var(--color-texto-secundario);
}

.cert-search-box {
    display: flex;
    gap: 12px;
    margin-top: 18px;
    align-items: stretch;
}

.cert-input {
    flex: 1;
    font-size: 16px;
    color: var(--color-texto-principal);
    border: 1.5px solid var(--color-azul-100);
    border-radius: 10px;
    padding: 13px 18px;
    outline: none;
    background: #fff;
}

.cert-input:focus {
    border-color: var(--color-azul-500);
}

.cert-input::placeholder {
    color: var(--color-placeholder);
}

/* ── Botones ── */
.cert-btn {
    font-weight: 700;
    font-size: 16px;
    letter-spacing: .3px;
    border: none;
    border-radius: 10px;
    padding: 12px 26px;
    cursor: pointer;
    transition: background .18s, box-shadow .18s, transform .05s;
    text-transform: uppercase;
    white-space: nowrap;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-align: center;
}

.cert-btn:active {
    transform: translateY(1px);
}

.cert-btn--primary {
    background: var(--color-azul-700);
    color: #fff;
    box-shadow: var(--shadow-btn);
}

.cert-btn--primary:hover {
    background: var(--color-azul-900);
    color: #fff;
}

.cert-btn--ghost {
    background: var(--color-azul-100);
    color: var(--color-azul-900);
}

.cert-btn--ghost:hover {
    background: var(--color-azul-300);
    color: #fff;
}

.cert-search-box .cert-btn {
    padding-inline: 34px;
}

/* ── Avisos ── */
.cert-alert {
    margin-top: 14px;
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 15px;
    font-weight: 600;
}

.cert-alert--error {
    background: #fdecec;
    border: 1px solid #f5c2c2;
    color: #c0392b;
}

.cert-alert a {
    color: inherit;
    font-weight: 700;
}

/* ── Resultado ── */
.cert-card {
    background: #fff;
    border: 1px solid var(--color-azul-100);
    border-radius: 16px;
    box-shadow: 0 2px 14px rgba(30, 27, 75, .05);
    padding: 32px 34px;
    margin-top: 22px;
    text-align: center;
}

.cert-card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    margin-bottom: 16px;
    border-radius: 50%;
    background: var(--color-azul-700);
    color: #fff;
    box-shadow: var(--shadow-btn);
}

.cert-card-icon svg {
    width: 30px;
    height: 30px;
    stroke: currentColor;
}

.cert-card-saludo {
    font-size: 32px;
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: -.5px;
    color: var(--color-azul-700);
    margin: 0;
}

.cert-card-text {
    font-size: 16px;
    color: var(--color-texto-secundario);
    line-height: 1.6;
    margin: 12px auto 0;
    max-width: 520px;
}

.cert-item {
    background: #fff;
    border: 1px solid var(--color-azul-100);
    border-radius: 16px;
    box-shadow: 0 2px 14px rgba(30, 27, 75, .05);
    padding: 26px 34px;
    margin-top: 14px;
}

.cert-item-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.cert-item-programa {
    font-size: 22px;
    font-weight: 800;
    line-height: 1.2;
    color: var(--color-azul-900);
    margin: 0;
}

.cert-item-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    padding: 5px 12px;
    border-radius: 999px;
    background: var(--color-azul-100);
    color: var(--color-azul-700);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .3px;
    text-transform: uppercase;
}

.cert-item-chip svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
}

.cert-item-text {
    font-size: 15.5px;
    color: var(--color-texto-secundario);
    line-height: 1.6;
    margin: 10px 0 0;
}

.cert-item-datos {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin: 18px 0 0;
}

.cert-item-datos div {
    background: var(--color-azul-50);
    border-radius: 10px;
    padding: 12px 16px;
}

.cert-item-datos dt {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .3px;
    text-transform: uppercase;
    color: var(--color-placeholder);
}

.cert-item-datos dd {
    font-size: 17px;
    font-weight: 700;
    color: var(--color-texto-principal);
    margin: 2px 0 0;
}

.cert-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-top: 26px;
}

.cert-contacto p + p {
    margin-top: 8px;
}

.cert-contacto a {
    color: var(--color-azul-700);
    font-weight: 700;
}

@media (max-width: 780px) {
    .cert-wrap { padding: 0 18px; }
    .cert-hero { flex-direction: column; min-height: 0; }
    .cert-hero-media { width: 100%; height: 160px; }
    .cert-hero-media::after { background: linear-gradient(180deg, rgba(30, 27, 75, 0) 0%, rgba(30, 27, 75, .2) 60%, rgba(30, 27, 75, .5) 100%); }
    .cert-hero-body { padding: 28px 24px; }
    .cert-hero-title { font-size: 32px; }
    .cert-hero-sub { font-size: 16px; max-width: none; }
    .cert-search-box { flex-direction: column; }
    .cert-card { padding: 26px 20px; }
    .cert-card-saludo { font-size: 26px; }
    .cert-item { padding: 22px 20px; }
    .cert-item-head { flex-direction: column; align-items: flex-start; }
    .cert-item-programa { font-size: 19px; }
    .cert-item-datos { grid-template-columns: 1fr; }
    .cert-actions .cert-btn { width: 100%; }
}
