/* =========================================
   1. GLOBAL & RESET
   ========================================= */
html, body {
    background-color: #0a0a0c !important; /* Tu negro profundo */
    color: #e0e0e0;
    font-family: 'Montserrat', Helvetica, Arial, sans-serif; /* Forzamos la fuente base */
    height: 100%;
    margin: 0;
    /* Scrollbar oscura para navegadores webkit (Chrome, Edge) */
    scrollbar-width: thin;
    scrollbar-color: #333 #0a0a0c;
}
html {
    /* 1. Activa el deslizamiento suave */
    scroll-behavior: smooth;
    /* 2. Compensación para el menú fijo (Vital) */
    /* Como tu MudAppBar es 'Fixed="true"', necesitamos que el scroll
       pare 80px antes para que el título no quede tapado por la barra. */
    scroll-padding-top: 80px;
}

/* Personalización de scrollbar (opcional pero recomendada en dark mode) */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #0a0a0c;
}

::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 5px;
}

    ::-webkit-scrollbar-thumb:hover {
        background: #8c9eff; /* Tu color primario al pasar el mouse */
    }

/* =========================================
   2. UI DE ERROR (Restyling Dark)
   ========================================= */
#blazor-error-ui {
    background: #1e1e24; /* Fondo oscuro en lugar de amarillo */
    color: #ff5252; /* Texto rojo suave */
    border-top: 1px solid #ff5252;
    bottom: 0;
    box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.5);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 9999; /* Asegura que quede por encima de MudBlazor */
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
        color: white;
    }

/* =========================================
   3. LOADING SPINNER (Personalizado N3BULOSA)
   ========================================= */
.loading-progress {
    position: relative;
    display: block;
    width: 8rem;
    height: 8rem;
    margin: 20vh auto 1rem auto;
}

    .loading-progress circle {
        fill: none;
        stroke: #1f1f2e; /* Círculo de fondo gris oscuro, no blanco */
        stroke-width: 0.6rem;
        transform-origin: 50% 50%;
        transform: rotate(-90deg);
    }

        .loading-progress circle:last-child {
            stroke: #8c9eff; /* <--- AQUÍ ESTÁ EL CAMBIO: Tu color primario */
            stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
            transition: stroke-dasharray 0.05s ease-in-out;
            /* Efecto de brillo "Neon" opcional */
            filter: drop-shadow(0 0 4px rgba(140, 158, 255, 0.6));
        }

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
    color: #e0e0e0;
    font-family: 'Montserrat', sans-serif;
    letter-spacing: 1px;
}

    .loading-progress-text:after {
        content: var(--blazor-load-percentage-text, "Loading");
    }

/* Animación para las tarjetas de servicios */
.service-card {
    transition: transform 0.3s ease, background 0.3s ease !important;
}

    .service-card:hover {
        transform: translateY(-8px); /* Se eleva un poco */
        background: rgba(255,255,255,0.06) !important; /* Se aclara ligeramente */
        border-color: rgba(140, 158, 255, 0.3) !important; /* Borde sutil en tu color primario */
        cursor: default;
    }
.cursor-blink {
    display: inline-block;
    /* === EL TRUCO DE INGENIERÍA === */
    width: 0; /* 1. No ocupa espacio horizontal */
    overflow: visible; /* 2. El carácter se ve aunque la caja mida 0 */
    white-space: nowrap; /* 3. Prohíbe que se parta él solo */
    /* Animación y Estilo */
    animation: blink 1s step-end infinite;
    color: #8c9eff;
    font-weight: 700;
}

@keyframes blink {
    0%, 100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

/* --- FONDO ANIMADO N3BULOSA (MODO DARK DEEP) --- */

.nebula-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
    background: #0a0a0c;
}

/* 1. Rejilla más sutil (Bajamos de 0.03 a 0.015) */
.tech-grid {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
    background-size: 60px 60px; /* Cuadros un poco más grandes para más elegancia */
    z-index: 2;
    opacity: 0;
    animation: fadeInGrid 3s ease-out 0.5s forwards;
    /* Un gradiente radial para que la rejilla desaparezca en los bordes (Vignette) */
    mask-image: radial-gradient(circle, black 40%, transparent 100%);
    -webkit-mask-image: radial-gradient(circle, black 40%, transparent 100%);
}

/* 2. Orbes más oscuros y difusos */
.nebula-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px); /* Más desenfoque para que sea más "gas" y menos "bola" */
    opacity: 0; /* Empiezan invisibles */
    z-index: 1;
    mix-blend-mode: screen; /* Mezcla mejor con el fondo negro */
}

/* Orbe 1: Azul Profundo (Antes era pastel brillante) */
.orb-1 {
    background: #4a5bf0; /* Azul más oscuro y saturado */
    width: 70vw;
    height: 70vw;
    top: -20%;
    left: -10%;
    animation: expandOrb 3s cubic-bezier(0.2, 0.8, 0.2, 1) forwards, floatOrb1 18s ease-in-out infinite alternate 3s;
}

/* Orbe 2: Violeta Profundo */
.orb-2 {
    background: #6a4c93; /* Violeta oscuro */
    width: 60vw;
    height: 60vw;
    bottom: -20%;
    right: -10%;
    animation: expandOrb 3s cubic-bezier(0.2, 0.8, 0.2, 1) forwards, floatOrb2 15s ease-in-out infinite alternate 3s;
}

/* --- KEYFRAMES AJUSTADOS (Menos opacidad final) --- */

@keyframes expandOrb {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 0.15; /* <--- AQUÍ ESTÁ LA CLAVE: Bajamos de 0.4 a 0.15 */
    }
}

@keyframes fadeInGrid {
    to {
        opacity: 1;
    }
}

@keyframes floatOrb1 {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(40px, 20px) scale(1.05);
    }
}

@keyframes floatOrb2 {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(-30px, -15px) scale(0.95);
    }
}
/* RESPONSIVE HERO TITLE (Versión V2 - Fluid Typography) */
.hero-title {
    font-weight: 700 !important;
    text-transform: uppercase;
    color: #8c9eff;
    line-height: 1.1 !important; /* Líneas un poco más pegadas en móvil para que no se vea deslavazado */
    /* === LA SOLUCIÓN DE INGENIERÍA: CLAMP === */
    /* Sintaxis: clamp(MÍNIMO, IDEAL, MÁXIMO) */
    /* El navegador calculará matemáticamente el tamaño perfecto entre 1.8rem y 3.75rem según el ancho (vw) */
    font-size: clamp(1.75rem, 6vw, 3.75rem) !important;
    /* Espaciado dinámico: menos espacio en móvil, más en escritorio */
    letter-spacing: clamp(1px, 1vw, 4px) !important;
    /* SEGURIDAD ANTICORTE */
    overflow-wrap: break-word; /* Si una palabra es gigantesca, la parte para que no corte la pantalla */
    width: 100%;
}

/* AJUSTE MANUAL PARA PANTALLAS EXTRA PEQUEÑAS (< 380px) */
/* Para móviles muy estrechos donde incluso el clamp puede fallar */
@media (max-width: 380px) {
    .hero-title {
        font-size: 1.5rem !important; /* Tamaño de seguridad */
    }
}

.animate-pulse {
    animation: pulseText 2s infinite;
}

@keyframes pulseText {
    0%, 100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}