/* ================= VARIABLES ================= */
:root {

    --azul: #0C2340;
    --celeste: #0EA5E9;
    --dorado: #DAA520;
    --claro: #F4FAFF;
    --texto: #1E3A5F;
    --gris: #64748B;
    --borde: #BAE6FD;

}

/* ================= GENERAL ================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {

    font-family: 'Plus Jakarta Sans', sans-serif;
    background: #ffffff;
    color: var(--texto);

}

/* ================= HEADER ================= */

header {

    background: white;
    box-shadow:
        0 5px 20px rgba(0, 0, 0, .08);

}

.logo {

    width: 55px;
    height: 55px;
    object-fit: contain;

}

.brand-title {

    display: block;
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--celeste);

}

.nav-link {

    font-weight: 600;
    margin: 0 8px;
    color: #334155;
    transition: .3s;

}

.nav-link:hover,
.nav-link.active {

    color: var(--celeste);

}

.btn-inscripcion {

    background:
        linear-gradient(135deg,
            var(--celeste),
            #0369A1);
    color: white;
    padding: 10px 25px;
    border-radius: 50px;
    font-weight: 700;
    text-decoration: none;
    margin-left: 20px;
    transition: .3s;
}

.btn-inscripcion:hover {

    transform: translateY(-3px);
    color: white;

}

.btn-darkmode {

    border: none;
    background: #f1f5f9;
    width: 42px;
    height: 42px;
    border-radius: 50%;
}

/* ================= HERO ================= */

.hero-formatos {
    background:
        linear-gradient(135deg,
            #0C2340,
            #164E63);
    min-height: 350px;
    display: flex;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-formatos::before {

    content: "";
    position: absolute;
    width: 400px;
    height: 400px;
    background:
        radial-gradient(circle,
            rgba(14, 165, 233, .25),
            transparent);
    right: -100px;
    top: -100px;
    border-radius: 50%;
}

.hero-content {
    position: relative;
    z-index: 2;

}

.badge-documentos {

    display: inline-block;
    background:
        rgba(220, 38, 38, .15);

    color: #FCA5A5;
    border: 1px solid rgba(255, 255, 255, .2);
    padding: 10px 18px;
    border-radius: 50px;
    font-weight: 700;
    text-transform: uppercase;
    font-size: .75rem;
}

.hero-formatos h1 {

    color: white;
    font-size: 3rem;
    font-weight: 800;
    margin-top: 20px;
}

.hero-formatos p {

    color:
        rgba(255, 255, 255, .8);
    font-size: 1.1rem;

}

.contador-documentos {


    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 25px;
    padding: 12px 25px;
    border-radius: 50px;
    background:
        rgba(255, 255, 255, .12);

    color: white;
    font-weight: 700;
}

/* ================= BUSCADOR ================= */

.buscador-box {
    display: flex;
    align-items: center;
    gap: 15px;
    background: white;
    border: 2px solid var(--borde);
    padding: 14px 20px;
    border-radius: 18px;
    box-shadow: 0 8px 25px rgba(14, 165, 233, 0.07);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    margin-bottom: 0;
}

.buscador-box:focus-within {
    border-color: var(--celeste);
    box-shadow: 0 8px 30px rgba(14, 165, 233, 0.18);
}

.buscador-box i {
    color: var(--celeste);
    font-size: 1.2rem;
    flex-shrink: 0;
}

.buscador-box input {
    border: none;
    outline: none;
    width: 100%;
    font-size: 1rem;
    font-family: 'Plus Jakarta Sans', sans-serif;
    color: var(--texto);
}

.buscador-box input::placeholder {
    color: #94a3b8;
}

.btn-clear {
    background: none;
    border: none;
    cursor: pointer;
    color: #94a3b8;
    font-size: 1rem;
    padding: 2px 6px;
    border-radius: 50%;
    transition: all 0.2s;
    flex-shrink: 0;
}

.btn-clear:hover {
    background: #fee2e2;
    color: #ef4444;
}

/* ================= FILTROS CATEGORÍA ================= */
.btn-filter {
    background: white;
    border: 2px solid var(--borde);
    color: var(--texto);
    font-weight: 600;
    font-size: 0.85rem;
    border-radius: 12px;
    padding: 10px 14px;
    cursor: pointer;
    transition: all 0.25s ease;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.btn-filter:hover {
    border-color: var(--celeste);
    color: var(--celeste);
    background: #eff9ff;
}

.btn-filter.active {
    background: var(--celeste);
    border-color: var(--celeste);
    color: white;
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.3);
}

/* ================= INFORMACION ================= */

.info-box {
    display: flex;
    gap: 20px;
    align-items: center;
    background:
        linear-gradient(135deg,
            #eff9ff,
            #fff);
    padding: 25px;
    border-radius: 20px;
    border: 1px solid var(--borde);
    margin-bottom: 40px;
}

.info-box i {

    font-size: 2rem;
    color: var(--celeste);

}

.info-box h5 {
    font-weight: 800;

}

/* ================= CATEGORIA ================= */
.categoria-header {

    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
}

.categoria-header i {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        rgba(14, 165, 233, .1);
    color: var(--celeste);
    border-radius: 15px;
}

.categoria-header h2 {
    font-size: 1.5rem;
    font-weight: 800;
}

/* ================= TARJETAS ================= */

.card-formato {
    height: 100%;
    background: white;
    border-radius: 22px;
    border: 1px solid var(--borde);
    overflow: hidden;
    transition: all 0.35s ease;
    position: relative;
}

.card-formato::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--celeste), #0369a1);
    transform: scaleY(0);
    transform-origin: bottom;
    transition: transform 0.35s ease;
}

.card-formato:hover {
    transform: translateY(-7px);
    box-shadow: 0 20px 45px rgba(14, 165, 233, 0.15);
    border-color: rgba(14, 165, 233, 0.35);
}

.card-formato:hover::before {
    transform: scaleY(1);
}

.card-header-documento {
    display: flex;
    gap: 18px;
    align-items: center;
    padding: 25px;
    background:
        linear-gradient(135deg,
            #f8fcff,
            white);

}

.pdf-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        rgba(220, 38, 38, .12);
    color: #DC2626;
    border-radius: 18px;
    font-size: 1.8rem;
}

.card-header-documento h3 {
    font-size: 1rem;
    font-weight: 800;
    margin: 0 0 6px 0;
    color: var(--azul);
    line-height: 1.4;
}

.badge-documento {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 30px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.card-body-documento {
    padding: 25px;
}

.card-body-documento p {
    color: var(--gris);
    line-height: 1.7;
}

/* ================= BOTONES ================= */

.document-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.btn-ver,
.btn-descargar {
    flex: 1;
    padding: 10px;
    border-radius: 12px;
    text-align: center;
    font-weight: 700;
    text-decoration: none;
    transition: .3s;
}

.btn-ver {
    background: #e0f2fe;
    color: #0369A1;
    font-size: 0.88rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-descargar {
    background: linear-gradient(135deg, #DC2626, #991B1B);
    color: white;
    font-size: 0.88rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-ver:hover {
    background: var(--celeste);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(14, 165, 233, 0.3);
}

.btn-descargar:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(220, 38, 38, 0.35);
    color: white;
}

/* ================= FOOTER ================= */

.footer {
    background: #0C2340;
    color: white;
    padding: 50px 0;
    margin-top: 60px;
}

.footer h4,
.footer h5 {
    font-weight: 800;
}

.social-icons a {
    font-size: 1.5rem;

    color: white;

    margin-right: 15px;
}

/* ================= RESPONSIVE ================= */


@media(max-width:768px) {


    .hero-formatos h1 {

        font-size: 2rem;

    }

    .document-actions {

        flex-direction: column;

    }

    .btn-inscripcion {

        margin: 15px 0;

    }
}

/* ==========================================================================
   DARK MODE — Transparencia
   ========================================================================== */
body.dark-mode {
    background: #111827;
    color: #f9fafb;
}

body.dark-mode header {
    background: #1f2937;
}

body.dark-mode .buscador-box {
    background: #1f2937;
    border-color: rgba(14, 165, 233, 0.25);
}

body.dark-mode .buscador-box input {
    background: transparent;
    color: #f9fafb;
}

body.dark-mode .buscador-box input::placeholder {
    color: #6b7280;
}

body.dark-mode .info-box {
    background: linear-gradient(135deg, #1e3a5f, #1f2937);
    border-color: rgba(14, 165, 233, 0.25);
    color: #f9fafb;
}

body.dark-mode .card-formato {
    background: #1f2937;
    border-color: rgba(14, 165, 233, 0.2);
}

body.dark-mode .card-header-documento {
    background: linear-gradient(135deg, #1e3a5f, #1f2937);
}

body.dark-mode .card-header-documento h3 {
    color: #f9fafb;
}

body.dark-mode .btn-ver {
    background: rgba(14, 165, 233, 0.15);
    color: #93c5fd;
}

body.dark-mode .btn-darkmode {
    background: #374151;
    color: #f9fafb;
}