/* ============================================================
   MERCABASTOS — Landing moderna / Scrollytelling
   ============================================================ */

:root {
    --brand: #ff4d4d;
    --brand-2: #ff8a3d;
    --accent: #1e88e5;
    --accent-2: #00c2ff;
    --ink: #0f172a;
    --ink-soft: #334155;
    --paper: #f6f9fc;
    --white: #ffffff;
    --glass: rgba(255, 255, 255, 0.12);
    --glass-brd: rgba(255, 255, 255, 0.25);
    --shadow-lg: 0 20px 60px rgba(15, 23, 42, 0.18);
    --shadow-md: 0 10px 30px rgba(15, 23, 42, 0.12);
    --radius: 22px;
    --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* {
    scroll-behavior: smooth;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--paper);
    color: var(--ink);
    font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
    overflow-x: clip;
}

/* ---------- Barra de progreso de scroll ---------- */
#scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 4px;
    width: 0%;
    z-index: 2000;
    background: linear-gradient(90deg, var(--brand), var(--brand-2), var(--accent-2));
    box-shadow: 0 0 12px rgba(255, 77, 77, 0.6);
    transition: width 0.1s linear;
}

/* Progreso nativo con scroll-timeline (navegadores modernos) */
@supports (animation-timeline: scroll()) {
    #scroll-progress {
        width: 100%;
        transform-origin: 0 50%;
        animation: growProgress linear;
        animation-timeline: scroll(root);
    }

    @keyframes growProgress {
        from { transform: scaleX(0); }
        to { transform: scaleX(1); }
    }
}

/* ============================================================
   NAV / HEADER
   ============================================================ */
.gov-bar {
    background: linear-gradient(90deg, #0d47a1, #1565c0);
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 1500;
    background: linear-gradient(100deg, #0a2f6b 0%, #0d47a1 45%, #1565c0 100%);
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    transition: background 0.4s var(--ease), box-shadow 0.4s var(--ease);
}

.site-header.scrolled {
    background: linear-gradient(100deg, #082656 0%, #0d47a1 50%, #1565c0 100%);
    box-shadow: 0 8px 30px rgba(13, 71, 161, 0.35);
}

/* ---------- Nav píldoras elegante ---------- */
.navegador {
    position: relative;
    padding: 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.10);
    border: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.15);
    gap: 4px !important;
}

.navegador .nav-pill {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: #eaf2ff !important;
    border-radius: 999px !important;
    padding: 9px 18px !important;
    font-weight: 700;
    font-size: 0.92rem;
    white-space: nowrap;
    border: 1px solid transparent;
    transition: background 0.3s var(--ease), color 0.3s var(--ease), box-shadow 0.3s var(--ease), transform 0.2s var(--ease);
}

.navegador .nav-pill .nav-ic {
    font-size: 0.9rem;
    opacity: 0.85;
    transition: transform 0.3s var(--ease);
}

.navegador .nav-pill:hover {
    background: rgba(255, 255, 255, 0.16);
    color: #fff !important;
    transform: translateY(-1px);
}
.navegador .nav-pill:hover .nav-ic { transform: scale(1.15); }

/* Píldora activa: fondo claro, texto azul */
.navegador .nav-pill.active-link {
    background: #ffffff;
    color: #0d47a1 !important;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
    border-color: rgba(255,255,255,0.9);
}
.navegador .nav-pill.active-link .nav-ic { opacity: 1; }

/* Flecha del dropdown */
.navegador .dropdown-toggle::after {
    margin-left: 2px;
    border-top-color: currentColor;
    opacity: 0.7;
}

.dropdown-menu {
    border: 0;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    padding: 8px;
    margin-top: 8px !important;
}

.dropdown-item {
    border-radius: 10px;
    padding: 9px 14px;
    font-weight: 600;
    transition: background 0.2s var(--ease), padding-left 0.2s var(--ease), color 0.2s var(--ease);
}

.dropdown-item:hover {
    background: linear-gradient(90deg, rgba(13, 71, 161, 0.10), transparent);
    padding-left: 20px;
    color: #0d47a1;
}

/* ============================================================
   HERO — parallax + scrollytelling
   ============================================================ */
.hero {
    position: relative;
    min-height: 100vh;
    display: grid;
    place-items: center;
    overflow: hidden;
    isolation: isolate;
    text-align: center;
    color: #fff;
}

.hero__bg {
    position: absolute;
    inset: -10% 0 0 0;
    background: url('https://iili.io/d3ZTIe4.jpg') center/cover no-repeat;
    z-index: -3;
    will-change: transform;
}

.hero__overlay {
    position: absolute;
    inset: 0;
    z-index: -2;
    background:
        radial-gradient(1200px 600px at 70% 10%, rgba(0, 194, 255, 0.35), transparent 60%),
        linear-gradient(135deg, rgba(13, 71, 161, 0.82), rgba(255, 77, 77, 0.55));
}

/* blobs animados de fondo */
.hero__blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.55;
    z-index: -1;
    will-change: transform;
    animation: float 14s ease-in-out infinite;
}

.hero__blob.b1 { width: 380px; height: 380px; background: #00c2ff; top: 8%; left: 6%; }
.hero__blob.b2 { width: 300px; height: 300px; background: #ff8a3d; bottom: 10%; right: 8%; animation-delay: -5s; }
.hero__blob.b3 { width: 240px; height: 240px; background: #ff4d4d; top: 40%; left: 45%; animation-delay: -9s; }

@keyframes float {
    0%, 100% { transform: translateY(0) translateX(0) scale(1); }
    50% { transform: translateY(-40px) translateX(20px) scale(1.08); }
}

.hero__content {
    max-width: 860px;
    padding: 2rem;
    z-index: 1;
}

.hero__badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    border-radius: 999px;
    background: var(--glass);
    border: 1px solid var(--glass-brd);
    backdrop-filter: blur(10px);
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    margin-bottom: 1.5rem;
}

.hero__badge .dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: #34d399; box-shadow: 0 0 10px #34d399;
}

.hero h1 {
    font-size: clamp(2.4rem, 6vw, 4.6rem);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -1px;
    margin-bottom: 1.2rem;
    text-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
}

.hero h1 .grad {
    background: linear-gradient(90deg, #00c2ff, #ff8a3d);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero p.lead {
    font-size: clamp(1rem, 2vw, 1.3rem);
    opacity: 0.95;
    max-width: 620px;
    margin: 0 auto 2rem;
}

.hero__scroll {
    position: absolute;
    bottom: 26px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    color: #fff;
    font-size: 0.75rem;
    letter-spacing: 2px;
    opacity: 0.85;
}

.hero__scroll .mouse {
    width: 24px; height: 40px;
    border: 2px solid #fff;
    border-radius: 14px;
    position: relative;
}

.hero__scroll .mouse::after {
    content: "";
    position: absolute;
    top: 8px; left: 50%;
    width: 4px; height: 8px;
    background: #fff;
    border-radius: 4px;
    transform: translateX(-50%);
    animation: wheel 1.6s infinite;
}

@keyframes wheel {
    0% { opacity: 1; top: 8px; }
    100% { opacity: 0; top: 20px; }
}

/* ============================================================
   BOTONES ELEGANTES
   ============================================================ */
.btn-glow {
    --c1: var(--brand);
    --c2: var(--brand-2);
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 30px;
    border: 0;
    border-radius: 999px;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, var(--c1), var(--c2));
    box-shadow: 0 10px 30px rgba(255, 77, 77, 0.4);
    cursor: pointer;
    overflow: hidden;
    transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
    text-decoration: none;
}

.btn-glow::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.5), transparent);
    transform: translateX(-120%);
    transition: transform 0.6s var(--ease);
}

.btn-glow:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 18px 44px rgba(255, 77, 77, 0.55);
    color: #fff;
}

.btn-glow:hover::before { transform: translateX(120%); }

.btn-ghost {
    --c1: var(--accent);
    --c2: var(--accent-2);
    background: var(--glass);
    border: 1px solid var(--glass-brd);
    backdrop-filter: blur(10px);
    box-shadow: none;
}

.btn-ghost:hover {
    background: linear-gradient(135deg, var(--c1), var(--c2));
    box-shadow: 0 18px 44px rgba(30, 136, 229, 0.5);
}

/* Botones-icono servicios */
.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 18px;
}

.service-tile {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 26px 14px;
    border-radius: var(--radius);
    background: var(--white);
    border: 1px solid rgba(15, 23, 42, 0.06);
    box-shadow: var(--shadow-md);
    color: var(--ink);
    text-decoration: none;
    font-weight: 700;
    text-align: center;
    overflow: hidden;
    transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}

.service-tile::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--accent), var(--brand));
    opacity: 0;
    transition: opacity 0.4s var(--ease);
    z-index: 0;
}

.service-tile i, .service-tile span { position: relative; z-index: 1; transition: color 0.4s var(--ease); }

.service-tile i {
    font-size: 2.2rem;
    background: linear-gradient(135deg, var(--accent), var(--brand));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.service-tile:hover {
    transform: translateY(-8px);
    box-shadow: 0 24px 50px rgba(30, 136, 229, 0.3);
    color: #fff;
}

.service-tile:hover::before { opacity: 1; }
.service-tile:hover i { color: #fff; -webkit-text-fill-color: #fff; }

/* ============================================================
   SECCIONES / SCROLL REVEAL
   ============================================================ */
.section {
    position: relative;
    padding: 96px 0;
}

.section-title {
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 8px;
}

.section-kicker {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--brand);
    margin-bottom: 10px;
}

/* Reveal al entrar en viewport */
.reveal {
    opacity: 0;
    transform: translateY(48px);
    transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
    will-change: transform, opacity;
}

.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: 0.1s; }
.reveal.d2 { transition-delay: 0.2s; }
.reveal.d3 { transition-delay: 0.3s; }
.reveal.d4 { transition-delay: 0.4s; }

.reveal-left { opacity: 0; transform: translateX(-60px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.reveal-left.in { opacity: 1; transform: none; }
.reveal-right { opacity: 0; transform: translateX(60px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.reveal-right.in { opacity: 1; transform: none; }
.reveal-zoom { opacity: 0; transform: scale(0.85); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.reveal-zoom.in { opacity: 1; transform: none; }

/* ============================================================
   QUIENES SOMOS — pinned scrollytelling
   ============================================================ */
.pin-story {
    position: relative;
    background:
        linear-gradient(135deg, rgba(13, 71, 161, 0.9), rgba(255, 77, 77, 0.7)),
        url('https://iili.io/dF21mzJ.jpg') center/cover fixed no-repeat;
    color: #fff;
    border-radius: var(--radius);
    margin: 0 12px;
    overflow: hidden;
}

.pin-sticky {
    position: sticky;
    top: 90px;
}

.quienestexto { text-align: justify; }

.quienestexto p { opacity: 0.95; }

.carrusel {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 3px solid rgba(255, 255, 255, 0.25);
}

.carousel-item img { transition: transform 6s var(--ease); }
.carousel-item.active img { transform: scale(1.08); }

/* ============================================================
   PORTAFOLIO
   ============================================================ */
.portafolio { background: linear-gradient(180deg, #eaf6ff, #dff1ff); }

.port-card {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease);
    height: 300px;
}

.port-card img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.7s var(--ease);
}

.port-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.port-card:hover img { transform: scale(1.12); }

.port-card .overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    padding: 22px;
    background: linear-gradient(to top, rgba(10, 20, 40, 0.9) 10%, rgba(10, 20, 40, 0.2) 55%, transparent);
    opacity: 1;
    transform: none;
    transition: background 0.4s var(--ease);
}

.port-card .overlay h2 { color: #fff; font-weight: 800; }
.port-card .overlay p { color: #cfe4ff; margin: 0; font-size: 0.9rem; }

/* ============================================================
   NOTICIAS
   ============================================================ */
.noticias { background: linear-gradient(180deg, #fff4f4, #ffe9e9); }

.news-card {
    background: var(--white);
    border: 0;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    transition: transform 0.45s var(--ease), box-shadow 0.45s var(--ease);
}

.news-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }

.imgnoticia {
    height: 150px !important;
    width: 150px !important;
    object-fit: cover;
    border-radius: 16px;
    transition: transform 0.5s var(--ease);
}

.news-card:hover .imgnoticia { transform: scale(1.05); }

.alinear { text-align: justify; font-weight: 600; }

.news-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--brand);
    font-weight: 700;
    text-decoration: none;
    transition: gap 0.25s var(--ease);
}

.news-link:hover { gap: 12px; color: var(--accent); }

/* ============================================================
   CONTACTO
   ============================================================ */
.contact-card {
    border: 0;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    height: 100%;
}

.contact-card .card-body { padding: 30px; }

.contact-line {
    display: flex;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px dashed rgba(15, 23, 42, 0.1);
}

.contact-line i {
    color: var(--brand);
    margin-top: 3px;
    min-width: 18px;
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
    background: linear-gradient(135deg, #0d47a1, #0a2a5e);
    color: #cfe0ff;
    padding: 40px 0;
}

/* ============================================================
   ANIM / MISC
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
    .reveal, .reveal-left, .reveal-right, .reveal-zoom {
        opacity: 1 !important;
        transform: none !important;
    }
    .hero__blob, .hero__scroll .mouse::after { animation: none; }
}

.text-danger { color: var(--brand) !important; }

/* ---------- Footer links ---------- */
.footer-link { color: #cfe0ff; text-decoration: none; transition: color 0.2s var(--ease); }
.footer-link:hover { color: #fff; text-decoration: underline; }

/* ============================================================
   PAGE HERO — cabecera de subpáginas
   ============================================================ */
.page-hero {
    position: relative;
    padding: 88px 0 40px;
    color: #fff;
    text-align: center;
    overflow: hidden;
    isolation: isolate;
    background: linear-gradient(135deg, #0d47a1, #1565c0);
}

.page-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(700px 300px at 80% 0%, rgba(0, 194, 255, 0.35), transparent 60%),
        radial-gradient(600px 300px at 10% 100%, rgba(255, 138, 61, 0.3), transparent 60%);
}

.page-hero h1 {
    font-size: clamp(2rem, 5vw, 3.4rem);
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 6px;
}

.page-hero__icon {
    width: 52px; height: 52px;
    margin: 0 auto 12px;
    display: grid; place-items: center;
    border-radius: 16px;
    font-size: 1.4rem;
    color: #fff;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18), inset 0 1px 0 rgba(255,255,255,0.3);
}

.page-hero::after {
    content: "";
    position: absolute;
    top: -30%; right: -6%;
    width: 340px; height: 340px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0,172,193,0.35), transparent 70%);
    filter: blur(10px);
    z-index: -1;
}

.page-hero .crumbs {
    font-size: 0.9rem;
    opacity: 0.85;
}

.page-hero .crumbs a { color: #cfe4ff; text-decoration: none; }
.page-hero .crumbs a:hover { text-decoration: underline; }

/* ---------- Tarjetas de contenido genéricas ---------- */
.info-card {
    background: var(--white);
    border: 0;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    padding: 34px;
    height: 100%;
    transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}

.info-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }

/* Badge numerado (listas ordenadas de tarjetas, ej. transparencia) */
.info-card { position: relative; }
.info-card__num {
    position: absolute;
    top: 18px; right: 18px;
    width: 30px; height: 30px;
    display: grid; place-items: center;
    border-radius: 50%;
    background: var(--paper);
    color: var(--accent);
    font-weight: 800;
    font-size: 0.82rem;
    transition: background 0.4s var(--ease), color 0.4s var(--ease);
}
.info-card:hover .info-card__num { background: var(--accent); color: #fff; }

/* ============================================================
   PANEL CARD — icono grande + línea + CTA (control interno, etc.)
   ============================================================ */
.panel-card {
    position: relative;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 20px;
    height: 100%;
    padding: 28px 24px;
    border-radius: 26px;
    background: var(--white);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.panel-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }

.panel-card__num {
    position: absolute; top: 18px; right: 18px;
    width: 30px; height: 30px;
    display: grid; place-items: center;
    border-radius: 50%;
    background: rgba(30, 136, 229, 0.1);
    color: var(--accent);
    font-weight: 800; font-size: 0.78rem;
}

.panel-card__icon {
    position: relative;
    flex-shrink: 0;
    width: 88px; height: 88px;
    display: grid; place-items: center;
    border-radius: 26px;
    font-size: 2.1rem; color: #fff;
    background: linear-gradient(135deg, var(--accent), var(--brand));
    box-shadow: 0 14px 28px rgba(30, 136, 229, 0.35);
}
.panel-card__icon::before {
    content: "";
    position: absolute; inset: -16px;
    z-index: -1;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(30, 136, 229, 0.12), transparent 70%);
}

.panel-card__body { flex: 1; min-width: 0; }
.panel-card__body h5 {
    font-weight: 800; font-size: 1.05rem; color: var(--ink);
    margin-bottom: 8px;
    line-height: 1.25;
}
.panel-card__bar {
    width: 44px; height: 3px; border-radius: 4px;
    background: linear-gradient(90deg, var(--accent), var(--brand));
    margin-bottom: 10px;
}
.panel-card__body p { color: var(--ink-soft); margin-bottom: 14px; font-size: 0.82rem; }

.panel-card__cta {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 9px 18px; border-radius: 999px;
    background: var(--paper); color: var(--accent);
    font-weight: 700; font-size: 0.78rem; text-decoration: none;
    white-space: nowrap;
    transition: background 0.3s var(--ease), gap 0.25s var(--ease), color 0.3s var(--ease);
}
.panel-card__cta:hover { background: var(--accent); color: #fff; gap: 11px; }

.panel-card__ghost { display: none; }

@media (max-width: 991px) {
    .panel-card { flex-direction: row; }
}
@media (max-width: 420px) {
    .panel-card { flex-direction: column; align-items: flex-start; }
}

.info-icon {
    width: 60px; height: 60px;
    display: grid; place-items: center;
    border-radius: 16px;
    font-size: 1.6rem;
    color: #fff;
    background: linear-gradient(135deg, var(--accent), var(--brand));
    margin-bottom: 18px;
}

.chip-list { list-style: none; padding: 0; margin: 0; }
.chip-list li {
    display: flex; gap: 12px; align-items: flex-start;
    padding: 12px 0;
    border-bottom: 1px dashed rgba(15, 23, 42, 0.1);
}
.chip-list li i { color: var(--brand); margin-top: 4px; }
.chip-list li:last-child { border-bottom: 0; }

/* Formularios */
.form-modern .form-control, .form-modern .form-select {
    border-radius: 14px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    padding: 12px 16px;
}
.form-modern .form-control:focus, .form-modern .form-select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(30, 136, 229, 0.15);
}
.form-modern label { font-weight: 600; margin-bottom: 6px; }

/* ============================================================
   TABLA MODERNA (entes de control, datos)
   ============================================================ */
.table-modern {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}
.table-modern table { margin: 0; }
.table-modern thead th {
    background: linear-gradient(135deg, #0d47a1, #1565c0);
    color: #fff;
    border: 0;
    padding: 16px;
    font-weight: 700;
}
.table-modern tbody td { padding: 14px 16px; vertical-align: middle; }
.table-modern tbody tr { transition: background 0.2s var(--ease); }
.table-modern tbody tr:hover { background: rgba(30, 136, 229, 0.06); }

/* ---------- PDF / documento link ---------- */
.doc-link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 22px;
    border-radius: 16px;
    background: var(--white);
    box-shadow: var(--shadow-md);
    text-decoration: none;
    color: var(--ink);
    transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.doc-link:hover { transform: translateX(6px); box-shadow: var(--shadow-lg); color: var(--brand); }
.doc-link .pdf-icon {
    width: 48px; height: 48px;
    display: grid; place-items: center;
    border-radius: 12px;
    background: linear-gradient(135deg, #ff4d4d, #c62828);
    color: #fff; font-size: 1.3rem;
    flex-shrink: 0;
}

/* ---------- Bloques por año (informes, documentos) ---------- */
.year-block { margin-bottom: 40px; }
.year-block__title {
    display: inline-flex; align-items: center; gap: 10px;
    font-weight: 800; color: var(--accent);
    margin-bottom: 18px;
    padding-bottom: 8px;
    border-bottom: 3px solid var(--accent);
}

/* ---------- Pestañas por año (todas visibles, sin scroll largo) ---------- */
.year-tabs__nav {
    display: flex;
    flex-wrap: nowrap;
    gap: 10px;
    margin-bottom: 30px;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 8px;
    scrollbar-width: thin;
    scrollbar-color: rgba(15, 23, 42, 0.2) transparent;
    -webkit-overflow-scrolling: touch;
}
.year-tabs__nav::-webkit-scrollbar { height: 6px; }
.year-tabs__nav::-webkit-scrollbar-track { background: transparent; }
.year-tabs__nav::-webkit-scrollbar-thumb { background: rgba(15, 23, 42, 0.2); border-radius: 3px; }
.year-tabs__nav::-webkit-scrollbar-thumb:hover { background: rgba(15, 23, 42, 0.35); }

/* Contenedor tipo tarjeta para el bloque de años + documentos */
.year-tabs--card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    padding: 28px 30px 30px;
}
.year-tabs--card .year-tabs__nav { margin-bottom: 0; }

/* Línea separadora entre los años y los documentos */
.year-tabs__divider {
    height: 1px;
    background: rgba(15, 23, 42, 0.08);
    margin: 22px 0 24px;
}

/* ---------- Lista compacta de documentos (scroll cuando hay muchos) ---------- */
.doc-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 360px;
    overflow-y: auto;
    padding-right: 6px;
}
.doc-list::-webkit-scrollbar { width: 6px; }
.doc-list::-webkit-scrollbar-track { background: transparent; }
.doc-list::-webkit-scrollbar-thumb { background: rgba(15, 23, 42, 0.15); border-radius: 6px; }

/* ---------- Tarjeta Normativa (icono outline + título azul) ---------- */
.norm-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 14px;
    padding: 40px 26px;
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--shadow-md);
    text-decoration: none;
    height: 100%;
    transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.norm-tile:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.norm-tile__icon {
    width: 70px; height: 70px;
    display: grid; place-items: center;
    font-size: 2.6rem;
    color: var(--ink);
    transition: color 0.3s var(--ease), transform 0.3s var(--ease);
}
.norm-tile:hover .norm-tile__icon { color: var(--accent); transform: scale(1.08); }
.norm-tile h5 { font-weight: 800; color: #0d47a1; margin: 0; }
.norm-tile p { color: var(--ink-soft); margin: 0; font-size: 0.9rem; }

/* Documentos agrupados por categoría (ej. Austeridad, PAAC, Auditorías) */
.doc-group { margin-bottom: 20px; }
.doc-group:last-child { margin-bottom: 0; }
.doc-group__title {
    display: flex; align-items: center; gap: 8px;
    font-size: 0.78rem; font-weight: 800;
    letter-spacing: 0.4px; text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 10px;
}
.doc-group__title i { font-size: 0.8rem; }
.doc-list--nested { max-height: none; overflow-y: visible; padding-right: 0; }
.doc-list::-webkit-scrollbar-thumb:hover { background: rgba(15, 23, 42, 0.28); }

.doc-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    border-radius: 12px;
    background: var(--paper);
    border: 1px solid transparent;
    text-decoration: none;
    transition: background 0.2s var(--ease), border-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.doc-row:hover {
    background: var(--white);
    border-color: rgba(30, 136, 229, 0.25);
    box-shadow: var(--shadow-md);
    transform: translateX(3px);
}
.doc-row__icon {
    flex-shrink: 0;
    width: 34px; height: 34px;
    display: grid; place-items: center;
    border-radius: 9px;
    font-size: 0.95rem; color: #fff;
    background: linear-gradient(135deg, #ff4d4d, #c62828);
}
.doc-row__title {
    flex: 1;
    min-width: 0;
    font-weight: 700; font-size: 0.88rem;
    color: var(--ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.doc-row__tag {
    flex-shrink: 0;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.68rem; font-weight: 800;
    letter-spacing: 0.4px;
    color: var(--accent);
    background: rgba(30, 136, 229, 0.1);
}
.doc-row__action {
    flex-shrink: 0;
    width: 30px; height: 30px;
    display: grid; place-items: center;
    border-radius: 50%;
    color: var(--accent);
    background: rgba(30, 136, 229, 0.08);
    font-size: 0.75rem;
    transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.doc-row:hover .doc-row__action { background: var(--accent); color: #fff; }

@media (max-width: 576px) {
    .doc-row__title { white-space: normal; }
}
.year-tab {
    padding: 10px 22px;
    border: 1px solid rgba(15, 23, 42, 0.1);
    border-radius: 999px;
    background: var(--white);
    color: var(--ink-soft);
    font-weight: 700;
    font-size: 0.92rem;
    cursor: pointer;
    flex-shrink: 0;
    white-space: nowrap;
    transition: background 0.3s var(--ease), color 0.3s var(--ease), box-shadow 0.3s var(--ease), transform 0.2s var(--ease);
}
.year-tab:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.year-tab.active {
    background: linear-gradient(135deg, var(--accent), var(--brand));
    color: #fff;
    border-color: transparent;
    box-shadow: 0 10px 24px rgba(30, 136, 229, 0.35);
}

.year-panel {
    display: none;
    animation: fadeInUp 0.4s var(--ease);
    max-height: 520px;
    overflow-y: auto;
    padding-right: 10px;
}
.year-panel.active { display: block; }
.year-panel::-webkit-scrollbar { width: 7px; }
.year-panel::-webkit-scrollbar-track { background: transparent; }
.year-panel::-webkit-scrollbar-thumb { background: rgba(15, 23, 42, 0.18); border-radius: 6px; }
.year-panel::-webkit-scrollbar-thumb:hover { background: rgba(15, 23, 42, 0.3); }
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   SIDEBAR DOCUMENTAL — buscador + índice desplegable
   ============================================================ */
.doc-sidebar {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    padding: 20px;
    position: sticky;
    top: 100px;
    z-index: 30;
}

.doc-sidebar__search {
    position: relative;
    margin-bottom: 20px;
}
.doc-sidebar__search i {
    position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
    color: var(--ink-soft); font-size: 0.85rem;
}
.doc-sidebar__search input {
    width: 100%;
    padding: 11px 14px 11px 38px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 12px;
    font-size: 0.9rem;
    background: var(--paper);
    transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.doc-sidebar__search input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(30, 136, 229, 0.12);
    background: #fff;
}

.doc-index { list-style: none; margin: 0; padding: 0; }
.doc-index__item { position: relative; border-bottom: 1px solid rgba(15, 23, 42, 0.06); }
.doc-index__item:last-child { border-bottom: 0; }

.doc-index__toggle {
    width: 100%;
    display: flex; align-items: center; justify-content: space-between;
    background: none; border: 0;
    padding: 11px 6px;
    font-weight: 700; font-size: 0.92rem;
    color: var(--ink);
    cursor: pointer;
    border-radius: 10px;
    transition: color 0.25s var(--ease), background 0.25s var(--ease);
}
.doc-index__toggle:hover { color: var(--accent); background: var(--paper); }
.doc-index__toggle .doc-index__caret { font-size: 0.72rem; color: var(--ink-soft); transition: transform 0.3s var(--ease), color 0.3s var(--ease); }
.doc-index__toggle.open .doc-index__caret { transform: rotate(180deg); color: var(--accent); }

.doc-index__label { display: flex; align-items: center; gap: 10px; }
.doc-index__ic {
    width: 30px; height: 30px;
    flex-shrink: 0;
    display: grid; place-items: center;
    border-radius: 9px;
    font-size: 0.8rem; color: #fff;
    background: linear-gradient(135deg, var(--accent), var(--brand));
    box-shadow: 0 4px 10px rgba(30, 136, 229, 0.3);
}

.doc-index__sub {
    list-style: none;
    margin: 0; padding: 8px;
    position: absolute;
    left: calc(100% + 10px); top: 0;
    width: 240px;
    z-index: 100;
    background: var(--white);
    border-radius: 14px;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateX(-8px);
    transition: opacity 0.22s var(--ease), transform 0.22s var(--ease), visibility 0.22s;
}
.doc-index__sub.open {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

@media (max-width: 991px) {
    .doc-index__sub {
        left: 0; right: 0; top: calc(100% + 2px);
        width: auto;
        transform: translateY(-6px);
    }
    .doc-index__sub.open { transform: translateY(0); }
}
.doc-index__sub li { padding: 2px 0; }
.doc-index__sub a {
    display: flex; align-items: center; gap: 9px;
    padding: 8px 10px;
    border-radius: 8px;
    color: var(--ink-soft);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.2s var(--ease), background 0.2s var(--ease);
}
.doc-index__sub a i { font-size: 0.78rem; color: var(--accent); width: 14px; text-align: center; flex-shrink: 0; }
.doc-index__sub a:hover { color: var(--brand); background: var(--paper); }
.doc-index__sub a:hover i { color: var(--brand); }

.doc-index__link {
    display: flex; align-items: center; gap: 10px;
    padding: 11px 6px;
    border-radius: 10px;
    font-weight: 700; font-size: 0.92rem;
    color: var(--ink);
    text-decoration: none;
    transition: color 0.25s var(--ease), background 0.25s var(--ease);
}
.doc-index__link:hover { color: var(--accent); background: var(--paper); }

@media (max-width: 991px) {
    .doc-sidebar { position: static; margin-bottom: 24px; }
}

/* Item activo del sidebar: fondo + barra lateral (conecta con el contenido) */
.doc-index__item--active {
    position: relative;
    margin: 0 -10px;
    padding: 0 10px;
    border-radius: 10px;
}
.doc-index__item--active > .doc-index__toggle { color: var(--accent); }
.doc-index__item--active > .doc-index__toggle .doc-index__ic { box-shadow: 0 4px 10px rgba(30, 136, 229, 0.4); }
.doc-index__item--active::before {
    content: "";
    position: absolute;
    left: 0; top: 8px; bottom: 8px;
    width: 3px;
    border-radius: 4px;
    background: linear-gradient(180deg, var(--accent), var(--brand));
}
.doc-index__sub .is-current { color: var(--accent); font-weight: 700; background: rgba(30, 136, 229, 0.08); }
.doc-index__sub .is-current i { color: var(--accent); }

/* Secciones internas que se alternan por JS (sin recarga de página) */
.docs-section { display: none; }
.docs-section.active { display: block; animation: fadeInUp 0.35s var(--ease); }

/* Breadcrumb compacto sobre el contenido */
.docs-crumb {
    display: flex; align-items: center; gap: 8px;
    font-size: 0.8rem; font-weight: 600;
    color: var(--ink-soft);
    margin-bottom: 14px;
}
.docs-crumb i:first-child { color: var(--accent); font-size: 0.76rem; }
.docs-crumb__sep { font-size: 0.6rem; color: rgba(15, 23, 42, 0.25); }
.docs-crumb__current { color: var(--ink); font-weight: 700; }

/* ---------- Glosario ---------- */
.glossary-term {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    padding: 26px;
    border-left: 5px solid var(--brand);
}
.glossary-term dt { font-weight: 800; color: var(--accent); font-size: 1.15rem; margin-bottom: 6px; }
.glossary-term dd { margin: 0; color: var(--ink-soft); }

/* ---------- Mapa del sitio ---------- */
.sitemap-col h5 { font-weight: 800; color: var(--accent); margin-bottom: 14px; }
.sitemap-col ul { list-style: none; padding: 0; }
.sitemap-col li { padding: 6px 0; }
.sitemap-col a {
    color: var(--ink-soft); text-decoration: none;
    transition: color 0.2s var(--ease), padding-left 0.2s var(--ease);
}
.sitemap-col a:hover { color: var(--brand); padding-left: 8px; }

.sitemap-col li.sitemap-sub {
    padding-left: 18px;
    font-size: 0.86rem;
    color: var(--ink-soft);
    opacity: 0.85;
    position: relative;
}
.sitemap-col li.sitemap-sub::before {
    content: "";
    position: absolute; left: 4px; top: 14px;
    width: 6px; height: 1px;
    background: var(--accent);
}
.sitemap-col li.sitemap-sub a { color: var(--ink-soft); }
.sitemap-col li.sitemap-sub a:hover { color: var(--brand); }

/* ============================================================
   JUEGOS (niños, jóvenes y adolescentes)
   ============================================================ */
.game-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    padding: 26px;
}
/* ---------- Tarjeta selectora de juego ---------- */
.game-tile {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 44px 28px;
    border-radius: var(--radius);
    border: 0;
    background: var(--white);
    box-shadow: var(--shadow-md);
    cursor: pointer;
    overflow: hidden;
    transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.game-tile::before {
    content: "";
    position: absolute; inset: 0;
    background: linear-gradient(135deg, var(--accent), var(--brand));
    opacity: 0;
    transition: opacity 0.4s var(--ease);
    z-index: 0;
}
.game-tile > * { position: relative; z-index: 1; }
.game-tile__icon {
    width: 76px; height: 76px;
    margin: 0 auto 18px;
    display: grid; place-items: center;
    border-radius: 22px;
    font-size: 2rem;
    color: #fff;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    box-shadow: 0 12px 28px rgba(30, 136, 229, 0.35);
    transition: transform 0.4s var(--ease);
}
.game-tile h3 { font-weight: 800; color: var(--ink); margin-bottom: 8px; transition: color 0.4s var(--ease); }
.game-tile p { color: var(--ink-soft); margin-bottom: 18px; transition: color 0.4s var(--ease); }
.game-tile__play {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 10px 22px; border-radius: 999px;
    background: var(--paper); color: var(--accent); font-weight: 700; font-size: 0.9rem;
    transition: background 0.4s var(--ease), color 0.4s var(--ease);
}
.game-tile:hover { transform: translateY(-8px); box-shadow: 0 24px 50px rgba(30, 136, 229, 0.3); }
.game-tile:hover::before { opacity: 1; }
.game-tile:hover h3, .game-tile:hover p { color: #fff; }
.game-tile:hover .game-tile__icon { transform: scale(1.1) rotate(-6deg); background: rgba(255,255,255,0.25); }
.game-tile:hover .game-tile__play { background: #fff; color: var(--brand); }

.game-modal { border: 0; border-radius: 26px; overflow: hidden; }

/* ---------- Rompecabezas deslizante ---------- */
.puzzle-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: 4px;
    width: 100%;
    max-width: 420px;
    aspect-ratio: 1;
    margin: 0 auto;
    border-radius: 16px;
    overflow: hidden;
    background: var(--ink);
}
.puzzle-piece {
    position: relative;
    background-size: 300% 300%;
    cursor: pointer;
    transition: transform 0.15s var(--ease), outline 0.15s var(--ease);
}
.puzzle-piece.blank { background: var(--paper); cursor: default; }
.puzzle-piece.sel { outline: 3px solid var(--accent); outline-offset: -3px; z-index: 2; }
.puzzle-piece:not(.blank):hover { filter: brightness(1.08); }

.puzzle-thumbs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}
.puzzle-thumb {
    aspect-ratio: 1;
    border-radius: 12px;
    background-size: cover;
    background-position: center;
    cursor: pointer;
    border: 3px solid transparent;
    transition: border-color 0.25s var(--ease), transform 0.25s var(--ease);
}
.puzzle-thumb:hover { transform: scale(1.05); }
.puzzle-thumb.active { border-color: var(--accent); }

/* ============================================================
   TRÁMITES — tarjeta de espacio (abre modal de proceso)
   ============================================================ */
.rent-tile {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
    padding: 38px 26px;
    border: 0;
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--shadow-md);
    cursor: pointer;
    overflow: hidden;
    transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.rent-tile::before {
    content: "";
    position: absolute; inset: 0;
    background: linear-gradient(135deg, #0d47a1, #00acc1);
    opacity: 0;
    transition: opacity 0.4s var(--ease);
    z-index: 0;
}
.rent-tile > * { position: relative; z-index: 1; }
.rent-tile__icon {
    width: 64px; height: 64px;
    margin-bottom: 16px;
    display: grid; place-items: center;
    border-radius: 18px;
    font-size: 1.7rem;
    color: #fff;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    box-shadow: 0 10px 24px rgba(30, 136, 229, 0.35);
    transition: transform 0.4s var(--ease), background 0.4s var(--ease);
}
.rent-tile h5 { font-weight: 800; color: var(--ink); margin-bottom: 4px; transition: color 0.4s var(--ease); }
.rent-tile p { color: var(--ink-soft); margin-bottom: 16px; font-size: 0.9rem; transition: color 0.4s var(--ease); }
.rent-tile__cta {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 9px 20px; border-radius: 999px;
    background: var(--paper); color: var(--accent); font-weight: 700; font-size: 0.85rem;
    transition: background 0.4s var(--ease), color 0.4s var(--ease), gap 0.25s var(--ease);
}
.rent-tile:hover { transform: translateY(-8px); box-shadow: 0 24px 50px rgba(13, 71, 161, 0.28); }
.rent-tile:hover::before { opacity: 1; }
.rent-tile:hover h5, .rent-tile:hover p { color: #fff; }
.rent-tile:hover .rent-tile__icon { transform: scale(1.08) rotate(-6deg); background: rgba(255,255,255,0.25); }
.rent-tile:hover .rent-tile__cta { background: #fff; color: var(--brand); gap: 12px; }

/* ---------- Modal de trámite: banner + cuerpo ---------- */
.rent-modal-content {
    border: 0;
    border-radius: 26px;
    overflow: hidden;
    max-height: 88vh;
}

/* Modales por encima del header sticky (z-index: 1500) */
.modal { z-index: 2000; }
.modal-backdrop { z-index: 1999; }

.rent-modal-banner {
    position: relative;
    width: 100%;
    height: 260px;
    flex-shrink: 0;
    overflow: hidden;
}
.rent-modal-banner img {
    width: 100%; height: 100%;
    object-fit: cover;
}
.rent-modal-banner__overlay {
    position: absolute; inset: 0;
    display: flex;
    align-items: flex-end;
    gap: 16px;
    padding: 24px 28px;
    background: linear-gradient(to top, rgba(9,29,66,0.92) 15%, rgba(9,29,66,0.35) 60%, transparent);
}
.rent-modal-banner__overlay h3 {
    color: #fff;
    font-size: clamp(1.2rem, 3vw, 1.7rem);
    text-shadow: 0 2px 10px rgba(0,0,0,0.4);
}
.rent-modal-banner__overlay p {
    color: #d6e4ff;
    font-size: 0.92rem;
}

.rent-modal-body {
    padding: 28px 30px 30px;
    overflow-y: auto;
}

.rent-modal-actions { border-top: 1px dashed rgba(15, 23, 42, 0.12); }

.rent-modal-icon {
    width: 54px; height: 54px;
    flex-shrink: 0;
    display: grid; place-items: center;
    border-radius: 16px;
    font-size: 1.4rem;
    color: #fff;
    background: rgba(255,255,255,0.18);
    border: 1px solid rgba(255,255,255,0.35);
    backdrop-filter: blur(8px);
}

@media (max-width: 576px) {
    .rent-modal-banner { height: 190px; }
    .rent-modal-body { padding: 22px 20px 24px; }
}

/* ============================================================
   ENTES DE CONTROL — cards horizontales
   ============================================================ */
.entes-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.ente-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 22px;
    padding: 22px 26px;
    border-radius: 20px;
    background: var(--white);
    box-shadow: var(--shadow-md);
    transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.ente-card:hover { transform: translateX(6px); box-shadow: var(--shadow-lg); }

.ente-card__icon {
    width: 58px; height: 58px;
    flex-shrink: 0;
    display: grid; place-items: center;
    border-radius: 16px;
    font-size: 1.4rem;
    color: #fff;
    background: linear-gradient(135deg, var(--accent), var(--brand));
    box-shadow: 0 10px 24px rgba(30, 136, 229, 0.3);
}

.ente-card__body { flex: 1; min-width: 0; }
.ente-card__body h5 { font-weight: 800; color: var(--ink); margin-bottom: 2px; }
.ente-card__func { color: var(--brand); font-size: 0.82rem; font-weight: 700; margin-bottom: 10px; }

.ente-card__meta {
    display: flex;
    flex-wrap: wrap;
    column-gap: 22px;
    row-gap: 6px;
    font-size: 0.85rem;
    color: var(--ink-soft);
}
.ente-card__meta span { display: inline-flex; align-items: center; gap: 7px; }
.ente-card__meta i { color: var(--accent); width: 14px; text-align: center; flex-shrink: 0; }
.ente-card__meta a { color: var(--ink-soft); text-decoration: none; }
.ente-card__meta a:hover { color: var(--accent); text-decoration: underline; }

.ente-card__link {
    flex-shrink: 0;
    width: 44px; height: 44px;
    display: grid; place-items: center;
    border-radius: 50%;
    background: var(--paper);
    color: var(--accent);
    font-size: 0.95rem;
    transition: background 0.3s var(--ease), color 0.3s var(--ease), transform 0.3s var(--ease);
}
.ente-card__link:hover { background: var(--accent); color: #fff; transform: scale(1.1) rotate(8deg); }

@media (max-width: 700px) {
    .ente-card { flex-wrap: wrap; padding: 20px; }
    .ente-card__link { position: absolute; top: 18px; right: 18px; width: 36px; height: 36px; }
}

.rent-steps {
    list-style: none;
    counter-reset: step;
    padding: 0; margin: 0;
}
.rent-steps li {
    counter-increment: step;
    position: relative;
    padding: 8px 0 8px 40px;
    color: var(--ink-soft);
    font-size: 0.94rem;
}
.rent-steps li::before {
    content: counter(step);
    position: absolute; left: 0; top: 6px;
    width: 26px; height: 26px;
    border-radius: 50%;
    display: grid; place-items: center;
    background: linear-gradient(135deg, var(--accent), var(--brand));
    color: #fff; font-weight: 700; font-size: 0.8rem;
}

.wordsearch-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 4px;
    max-width: 520px;
    margin: 0 auto;
    user-select: none;
}
.wordsearch-grid .cell {
    aspect-ratio: 1;
    display: grid; place-items: center;
    background: #eef4ff;
    border-radius: 6px;
    font-weight: 700;
    font-size: clamp(0.6rem, 2.4vw, 0.95rem);
    cursor: pointer;
    transition: background 0.15s, color 0.15s, transform 0.15s;
}
.wordsearch-grid .cell:hover { transform: scale(1.08); }
.wordsearch-grid .cell.sel { background: var(--accent-2); color: #fff; }
.wordsearch-grid .cell.found { background: linear-gradient(135deg, #34d399, #10b981); color: #fff; }

.word-chip {
    display: inline-block;
    padding: 6px 14px;
    margin: 4px;
    border-radius: 999px;
    background: #eef4ff;
    font-weight: 700;
    font-size: 0.85rem;
    transition: all 0.2s var(--ease);
}
.word-chip.done { background: #10b981; color: #fff; text-decoration: line-through; }

/* Juego de pesca */
#lago {
    position: relative;
    height: 320px;
    border-radius: var(--radius);
    overflow: hidden;
    background: linear-gradient(180deg, #4fc3f7, #0277bd);
    cursor: crosshair;
}
#lago .fish {
    position: absolute;
    font-size: 2rem;
    transition: transform 0.1s;
    animation: swim 6s linear infinite;
}
#lago .fish:hover { transform: scale(1.2); }
@keyframes swim {
    from { left: -8%; }
    to { left: 108%; }
}
.score-badge {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 8px 18px; border-radius: 999px;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    color: #fff; font-weight: 700;
}
