/* ===== RESET / BASE ===== */
*,
*::before,
*::after {
    box-sizing: border-box;
}

/* ===== FONDO BASE ===== */
:root {
    --text: #e6e6e6;
    --bg-top: #020a35;
    --bg-bottom: #000006;
}

html,
body {
    margin: 0;
    padding: 0;
    font-family: Arial, Helvetica, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    color: var(--text);
    line-height: 1.4;
    background: linear-gradient(180deg, var(--bg-top) 0%, var(--bg-bottom) 100%);
    background-attachment: fixed;
}

/* ===== UTILIDADES ===== */
a {
    text-decoration: none;
    color: inherit;
}

img {
    will-change: transform;
    display: block;
    max-width: 100%;
    height: auto;
}

.hidden {
    display: none !important;
}

.center {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ===== TOP INFO ===== */
.top-info {
    padding: 15px;
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--text);
}

/* ===== GRID PRINCIPAL ===== */
.icon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 2rem;
    padding: 2rem;
    max-width: 1600px;
    margin: auto;

}

.icon-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform .2s ease-in-out;
}

.icon-card span {
    position: absolute;
    bottom: -30px;
    left: 0;
    right: 0;
    margin: auto;
    /* Centrado perfecto sin translate */
    text-align: center;

    background: transparent;
    color: #00fd61;
    padding: 6px 10px;
    border-radius: 6px;
    white-space: nowrap;
    font-size: 20px;

    opacity: 0;
    visibility: hidden;

    transform: scale(0);
    /* Solo zoom, sin desplazamiento */
    transform-origin: center top;

    transition: opacity .25s ease, transform .25s ease;
    pointer-events: none;
    z-index: 10;
}

.icon-card:hover span {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
    /* Zoom perfecto sin moverse */
}



.icon-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform .2s ease-in-out;
    position: relative;
    z-index: 1;

}

.icon-card img {
    transition: transform .3s ease, filter .3s ease, box-shadow .3s ease;
    filter: brightness(1);
    box-shadow: none;
}

.icon-card span {
    opacity: 0;
    transform: translateY(6px);
    transition: opacity .3s ease, transform .3s ease;
}

/* Halo eléctrico multicolor con destellos */
@keyframes halo-electrico-multicolor {
    0% {
        filter: brightness(1.45) drop-shadow(0 0 8px rgba(255, 0, 0, 0.8)) drop-shadow(0 0 18px rgba(255, 0, 0, 0.5));
    }

    20% {
        filter: brightness(1.55) drop-shadow(0 0 10px rgba(255, 140, 0, 1)) drop-shadow(0 0 22px rgba(255, 140, 0, 0.6));
    }

    40% {
        filter: brightness(1.5) drop-shadow(0 0 10px rgba(255, 255, 0, 1)) drop-shadow(0 0 24px rgba(255, 255, 0, 0.6));
    }

    60% {
        filter: brightness(1.55) drop-shadow(0 0 12px rgba(0, 255, 0, 1)) drop-shadow(0 0 26px rgba(0, 255, 0, 0.6));
    }

    80% {
        filter: brightness(1.6) drop-shadow(0 0 12px rgba(0, 180, 255, 1)) drop-shadow(0 0 28px rgba(0, 180, 255, 0.7));
    }

    100% {
        filter: brightness(1.45) drop-shadow(0 0 8px rgba(255, 0, 255, 0.9)) drop-shadow(0 0 20px rgba(255, 0, 255, 0.5));
    }
}

.icon-card img:hover {
    transform: scale(1.12);
    animation: halo-electrico-multicolor 1s ease-in-out infinite;
    opacity: 1;
    transform: translateY(1);
}



/* ===== BUSCADOR SIMPLE ===== */
.buscador-simple {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    max-width: 500px;
    margin-top: 10px;
}

.buscador-simple input {
    width: 100%;
    padding: 12px;
    font-size: 18px;
    border: 2px solid #ccc;
    border-radius: 6px;
    background: #fff;
    color: #0b1220;
}

.buscador-simple button {
    padding: 12px;
    font-size: 18px;
    background-color: #0078ff;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

.buscador-simple button:hover {
    background-color: #005fcc;
}

/* ===== BANNERS / NEWS / FRASES ===== */
.banner-block {
    text-align: center;
}

.banner-block img {
    margin: auto;
    max-width: 100%;
    display: block;
}

.google-block img {
    width: 200px;
    max-width: 200px;
    height: auto;
    display: block;
    margin: 0 auto;
    object-fit: contain;
    transition: none !important;
    transform: none !important;
}

/* news grid */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 2rem;
    padding: 2rem;
    max-width: 1600px;
    margin: auto;
}

.news-card img {
    max-width: 160px;
    height: auto;
    transition: transform .2s ease-in-out;
}

.news-card:hover img {
    transform: scale(1.1);
}

/* frases */
.frase {
    font-size: 1.3rem;
    color: #99FF00;
    margin: 0 auto;
    max-width: 1000px;
    line-height: 1.5;
}

/* ===== STACKING: contenido interactivo por encima ===== */
header,
main,
.container,
.buscador-simple,
.icon-grid,
footer {
    position: relative;
    z-index: 1;
}

/* ===== CAPA DE ESTRELLAS CONSOLIDADA ===== */
.stars,
.stars-deep,
#svg-stars {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background: transparent;
    mix-blend-mode: screen;
}

/* Estrellas principales (pseudo-elemento) */
.stars::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle 1px rgba(255, 255, 255, 0.95), transparent 1px),
        radial-gradient(circle 1px rgba(255, 255, 255, 0.85), transparent 1px),
        radial-gradient(circle 0.8px rgba(255, 255, 255, 0.7), transparent 0.8px);
    background-size: 120px 120px, 200px 200px, 320px 320px;
    background-position: 10px 20px, 60px 140px, 200px 60px;
    opacity: 0.18;
    filter: blur(0.6px);
    transform: translateZ(0);
    will-change: transform, opacity;
}

/* Capa profunda de micro-estrellas (cuando usas JS) */
.stars-deep {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.stars-deep .micro-star {
    position: absolute;
    width: 1px;
    height: 1px;
    background: rgba(255, 255, 255, 1);
    border-radius: 50%;
    opacity: 0;
    transition: opacity 600ms ease;
    will-change: opacity, transform;
    transform: translateZ(0);
    pointer-events: none;
}

.stars-deep .micro-star.small {
    transform: translate(-50%, -50%) scale(0.6);
}

.stars-deep .micro-star.mid {
    transform: translate(-50%, -50%) scale(1);
}

.stars-deep .micro-star.large {
    transform: translate(-50%, -50%) scale(1.6);
}

/* SVG overlay */
#svg-stars {
    z-index: 0;
    opacity: 1;
    filter: drop-shadow(0 0 2px rgba(255, 255, 255, 0.06));
}

/* ===== GOOGLE PORTAL (para evitar escala por ancestros) ===== */
.google-block-portal {
    pointer-events: auto;
    z-index: 9999;
    position: fixed;
}

.google-block-portal .google-block img {
    width: 200px !important;
    max-width: 200px !important;
    height: auto !important;
    transform: none !important;
    transition: none !important;
    display: block !important;
    margin: 0 auto !important;
    object-fit: contain !important;
}

.google-block-placeholder {
    display: block;
    width: 100%;
    height: auto;
}

/* ===== MEDIA QUERIES ===== */
@media (max-width: 640px) {
    .stars-deep {
        display: none;
    }

    .stars::before {
        background-size: 180px 180px, 360px 360px, 520px 520px;
        opacity: 0.10;
        filter: blur(0.9px);
    }

    #svg-stars {
        opacity: 0.8;
    }

    .google-block-portal {
        display: none !important;
    }
}