
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --bg: #06111c;
    --bg-secondary: #0a1d2b;
    --card: #0d2638;
    --card-hover: #12344a;
    --text: #eaf7ff;
    --muted: #a9c0ce;
    --accent: #22d3ee;
    --accent-light: #8be9f8;
    --accent-blue: #38bdf8;
    --border: rgba(125, 211, 252, 0.28);
    --shadow: rgba(0, 0, 0, 0.30);
    --radius: 18px;
}

html {
    min-height: 100%;
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    font-family: "Segoe UI", Roboto, Arial, sans-serif;
    color: var(--text);
    background:
        radial-gradient(
            circle at 10% 0%,
            rgba(34, 211, 238, 0.18),
            transparent 25%
        ),
        radial-gradient(
            circle at 90% 10%,
            rgba(56, 189, 248, 0.13),
            transparent 25%
        ),
        linear-gradient(
            180deg,
            var(--bg) 0%,
            var(--bg-secondary) 100%
        );
    line-height: 1.5;
    overflow-x: hidden;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(
            rgba(148, 163, 184, 0.045) 1px,
            transparent 1px
        ),
        linear-gradient(
            90deg,
            rgba(148, 163, 184, 0.045) 1px,
            transparent 1px
        );
    background-size: 24px 24px;
    mask-image: radial-gradient(
        circle at center,
        black 25%,
        transparent 90%
    );
}

    body::after {
        content: "";
        position: fixed;
        inset: 0;
        z-index: -1;
        pointer-events: none;
        background: url("logo-sena-negro-jpg-2022-removebg-preview.png") center 54% / min(42vw, 420px) auto no-repeat;
        filter: brightness(0) invert(1);
        opacity: 0.1;
    }

/* ENCABEZADO */

.site-header {
    position: relative;
    z-index: 2;
    width: 100%;
    border-bottom: 1px solid rgba(148, 163, 184, 0.16);
    background: rgba(7, 22, 35, 0.82);
    backdrop-filter: blur(14px);
}

.header-content {
    width: min(1180px, calc(100% - 40px));
    min-height: 82px;
    margin: 0 auto;
    padding: 16px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.header-text h1 {
    color: var(--accent-light);
    font-size: clamp(1.2rem, 2vw, 1.55rem);
    font-weight: 800;
    letter-spacing: 0.3px;
}

.subtitle {
    margin-top: 3px;
    color: var(--muted);
    font-size: 0.9rem;
}

/* BOTÓN VOLVER */

.volver {
    display: inline-block;
    border: 1px solid rgba(125, 211, 252, 0.35);
    border-radius: 10px;
    padding: 10px 17px;
    color: white;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.07);
    font: inherit;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: 0.25s ease;
}

.volver:hover {
    background: rgba(56, 189, 248, 0.16);
    border-color: rgba(56, 189, 248, 0.65);
    transform: translateY(-2px);
}

.volver:focus-visible {
    outline: 3px solid rgba(34, 211, 238, 0.45);
    outline-offset: 3px;
}

/* CONTENIDO PRINCIPAL */

.container {
    position: relative;
    z-index: 1;
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
    padding: 48px 0 30px;
}

.titulo {
    max-width: 720px;
    margin: 0 auto 48px;
    text-align: center;
}

.eyebrow {
    margin-bottom: 10px;
    color: var(--accent);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.14em;
}

.titulo h2 {
    color: #ffffff;
    font-size: clamp(2.6rem, 6vw, 4.2rem);
    line-height: 1;
    font-weight: 900;
    letter-spacing: -0.04em;
    text-shadow: 0 0 24px rgba(34, 211, 238, 0.35);
}

.intro {
    max-width: 620px;
    margin: 16px auto 0;
    color: var(--muted);
    font-size: 1rem;
}

/* GRID DE TARJETAS */

.contenedor {
    display: grid;
    gap: 22px;
}

.primera-fila {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.segunda-fila {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    max-width: 880px;
    margin: 22px auto 0;
}

/* TARJETAS Y ENLACES */

.tarjeta {
    position: relative;
    min-height: 285px;
    padding: 28px 20px 24px;
    overflow: hidden;

    border: 1px solid var(--border);
    border-radius: var(--radius);

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;

    color: inherit;
    text-decoration: none;

    background:
        linear-gradient(
            180deg,
            rgba(13, 38, 56, 0.96),
            rgba(8, 28, 43, 0.96)
        );

    box-shadow: 0 12px 30px var(--shadow);
    cursor: pointer;

    transition:
        transform 0.25s ease,
        border-color 0.25s ease,
        box-shadow 0.25s ease,
        background 0.25s ease;
}

.tarjeta:visited {
    color: inherit;
    text-decoration: none;
}

.tarjeta::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(
        90deg,
        var(--accent),
        var(--accent-blue)
    );
}

.tarjeta:hover {
    transform: translateY(-7px);
    border-color: rgba(56, 189, 248, 0.72);

    background:
        linear-gradient(
            180deg,
            rgba(18, 52, 74, 0.98),
            rgba(9, 31, 47, 0.98)
        );

    box-shadow:
        0 20px 42px rgba(0, 0, 0, 0.38),
        0 0 24px rgba(34, 211, 238, 0.13);

    text-decoration: none;
}

.tarjeta:focus,
.tarjeta:active {
    color: inherit;
    text-decoration: none;
}

.tarjeta:focus-visible {
    outline: 3px solid rgba(34, 211, 238, 0.65);
    outline-offset: 4px;
}

/* ICONOS */

.icono {
    position: relative;
    width: 112px;
    height: 112px;
    margin-bottom: 20px;
    overflow: hidden;

    border: 1px solid rgba(186, 230, 253, 0.7);
    border-radius: 16px;

    display: flex;
    align-items: center;
    justify-content: center;

    background:
        linear-gradient(145deg, rgba(186, 230, 253, 0.2), transparent 38%),
        linear-gradient(135deg, rgba(8, 47, 73, 0.9), rgba(6, 24, 40, 0.72));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.46),
        inset 0 -14px 24px rgba(14, 165, 233, 0.1),
        0 0 18px rgba(34, 211, 238, 0.18);
    backdrop-filter: blur(8px) saturate(1.25);

    transition:
        transform 0.25s ease,
        border-color 0.25s ease,
        box-shadow 0.25s ease;
}

.icono::before {
    content: "";
    position: absolute;
    inset: -45% 32% -45% -42%;
    z-index: 2;
    pointer-events: none;
    transform: rotate(28deg);
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.27),
        transparent
    );
    animation: lcd-reflejo 5s ease-in-out infinite;
}

.icono::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    border-radius: inherit;
    background: repeating-linear-gradient(
        0deg,
        rgba(186, 230, 253, 0.045) 0,
        rgba(186, 230, 253, 0.045) 1px,
        transparent 1px,
        transparent 5px
    );
    mix-blend-mode: screen;
}

.tarjeta:hover .icono {
    transform: scale(1.06);
    border-color: rgba(56, 189, 248, 0.8);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.58),
        inset 0 -14px 24px rgba(14, 165, 233, 0.16),
        0 0 28px rgba(34, 211, 238, 0.34);
}

.icono img {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    padding: 8px;
    border-radius: 13px;
    object-fit: contain;
    filter: saturate(1.18) contrast(1.04) drop-shadow(0 5px 5px rgba(0, 0, 0, 0.28));
}

@keyframes lcd-reflejo {
    0%, 45% {
        transform: translateX(-34%) rotate(28deg);
        opacity: 0;
    }
    58% {
        opacity: 1;
    }
    78%, 100% {
        transform: translateX(210%) rotate(28deg);
        opacity: 0;
    }
}

.tarjeta h3 {
    margin-bottom: 10px;
    color: #70dcff;
    font-size: 1.15rem;
    font-weight: 800;
}

.tema {
    max-width: 100%;
    padding: 6px 10px;

    border: 1px solid rgba(125, 211, 252, 0.18);
    border-radius: 8px;

    color: #c8dce7;
    background: rgba(255, 255, 255, 0.045);

    font-size: 0.76rem;
}

/* DIBUJOS DE LOS JUEGOS */

.rana {
    font-size: 58px;
    filter: drop-shadow(
        0 0 8px rgba(34, 197, 94, 0.3)
    );
    transition: transform 0.25s ease;
}

.tarjeta:hover .rana {
    transform: scale(1.12);
}

.dibujo-crucigrama {
    width: 78px;
    height: 54px;

    display: grid;
    grid-template-columns: repeat(3, 24px);
    grid-template-rows: repeat(2, 24px);
    gap: 3px;
}

.dibujo-crucigrama span {
    border: 1px solid #0ea5e9;
    background: linear-gradient(
        135deg,
        #7dd3fc,
        #38bdf8
    );
}

.dibujo-crucigrama span:nth-child(2) {
    grid-column: 2;
    grid-row: 1 / 3;
}

.columnas {
    position: relative;
    width: 82px;
    height: 72px;
}

.columnas div,
.columnas b {
    position: absolute;
    width: 20px;
    height: 14px;
    border-radius: 4px;
}

.columnas div {
    left: 0;
    border: 1px solid #7dd3fc;
    background: #38bdf8;
}

.columnas div:nth-child(1) {
    top: 2px;
}

.columnas div:nth-child(2) {
    top: 29px;
}

.columnas div:nth-child(3) {
    top: 56px;
}

.columnas b {
    right: 0;
    border: 1px solid #6ee7b7;
    background: #22c55e;
}

.columnas b:nth-child(4) {
    top: 2px;
}

.columnas b:nth-child(5) {
    top: 29px;
}

.columnas b:nth-child(6) {
    top: 56px;
}

/* PIE DE PÁGINA */

footer {
    position: relative;
    z-index: 1;
    padding: 25px 20px 32px;
    text-align: center;
    color: #7890a0;
    font-size: 0.8rem;
}

/* RESPONSIVE */

@media (max-width: 1000px) {
    .primera-fila {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .segunda-fila {
        max-width: none;
    }
}

@media (max-width: 650px) {
    .header-content {
        width: min(100% - 28px, 560px);
        flex-direction: column;
        justify-content: center;
        text-align: center;
    }

    .container {
        width: min(100% - 28px, 560px);
        padding-top: 35px;
    }

    .titulo {
        margin-bottom: 35px;
    }

    .primera-fila,
    .segunda-fila {
        grid-template-columns: 1fr;
    }

    .tarjeta {
        min-height: 260px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}

.header-logo {
    width: 54px;
    height: 54px;
    object-fit: contain;
}