﻿/* =========================================================================
   1. CORE & IDENTITY (BitSpark TI)
   ========================================================================= */
:root {
    --bs-primary: #003366; /* Azul Cobalto: Estabilidad y SQL */
    --bs-accent: #00E5FF; /* Cian: Innovación y Tecnología */
    --bs-spark: #FFD700; /* Amarillo: La chispa de la IA */
    --bs-dark: #1A1A1B; /* Antracita: Profesionalismo */
    --bs-white: #ffffff;
    --font-main: 'Montserrat', sans-serif;
}

html {
    scroll-behavior: smooth; /* Para que el navbar navegue suavemente */
}

body {
    font-family: 'Open Sans', sans-serif;
    background-color: #f4f7fa;
    color: var(--bs-dark);
    margin: 0;
    padding: 0;
}
/* Agrega esto a tu CSS si quieres que el logo se vea aún más grande sin mover el menú */
.navbar-brand img {
    transform: scale(1.4); /* Aumenta el logo un 40% visualmente */
    margin: 0 15px; /* Da espacio a los lados para que no choque */
}

/* Fondo con patrón de malla tecnológica (Dots) */
.bg-tech-dots {
    background-color: #f4f7fa;
    background-image: radial-gradient(var(--bs-primary) 0.8px, transparent 0.8px);
    background-size: 25px 25px;
    opacity: 0.9;
}

/* =========================================================================
   2. NAVBAR GLASS (Efecto Apple)
   ========================================================================= */
.navbar-glass {
    background: rgba(255, 255, 255, 0.8) !important;
    backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.navbar-nav .nav-link {
    transition: color 0.3s ease;
}

    .navbar-nav .nav-link:hover {
        color: var(--bs-accent) !important;
    }

:target {
    scroll-margin-top: 90px; /* Evita que el navbar tape los títulos */
}

/* =========================================================================
   3. HERO SLIDER (Carrusel de Impacto)
   ========================================================================= */
.carousel-item {
    height: 80vh;
    min-height: 500px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.carousel-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0,51,102,0.7), rgba(0,0,0,0.8));
}

.carousel-caption {
    bottom: 30%;
    z-index: 10;
}

/* =========================================================================
   4. NOSOTROS (Misión, Visión y Valores)
   ========================================================================= */
.about-card {
    background: var(--bs-white);
    border-radius: 25px;
    padding: 40px;
    border: 1px solid rgba(0, 51, 102, 0.1);
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
    height: 100%;
}

    .about-card:hover {
        transform: translateY(-5px);
        border-color: var(--bs-accent);
    }

.value-item {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.value-icon {
    color: var(--bs-accent);
    font-size: 1.1rem;
}

/* =========================================================================
   5. SERVICIOS (Cards Pro a la Medida)
   ========================================================================= */
.serv-card-pro {
    background: var(--bs-white);
    border-radius: 35px;
    padding: 45px 35px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
    transition: all 0.5s cubic-bezier(0.15, 0, 0.15, 1);
    box-shadow: 0 10px 30px rgba(0,0,0,0.03);
}

    .serv-card-pro:hover {
        transform: translateY(-12px);
        box-shadow: 0 30px 60px rgba(0, 51, 102, 0.15);
        border-color: var(--bs-accent);
    }

/* Icono Nodo: Superior Derecha */
.node-icon {
    position: absolute;
    top: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: var(--bs-primary);
    color: var(--bs-accent);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 8px 15px rgba(0, 51, 102, 0.2);
    transition: 0.4s;
}

.serv-card-pro:hover .node-icon {
    background: var(--bs-accent);
    color: var(--bs-primary);
    transform: rotate(10deg) scale(1.1);
}

/* =========================================================================
   6. DASHBOARD MACOS (Showcase de Sistema)
   ========================================================================= */
.bitspark-window {
    background: var(--bs-white);
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.1);
    box-shadow: 0 40px 80px rgba(0,0,0,0.1);
}

.macos-header {
    background: #f1f1f1;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #ddd;
}

.pulse-node {
    width: 10px;
    height: 10px;
    background: var(--bs-accent);
    border-radius: 50%;
    position: relative;
    box-shadow: 0 0 10px var(--bs-accent);
    animation: super-pulse 1.5s infinite;
}

@keyframes super-pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    100% {
        transform: scale(2.5);
        opacity: 0;
    }
}

/* =========================================================================
   7. AI TYPING & BUTTONS
   ========================================================================= */
.cursor-ai::after {
    content: '|';
    color: var(--bs-accent);
    animation: blink-caret 0.8s infinite;
    font-weight: 400;
}

@keyframes blink-caret {
    50% {
        opacity: 0;
    }
}

.btn-spark {
    background: linear-gradient(135deg, var(--bs-accent), var(--bs-primary));
    color: white;
    border: none;
    border-radius: 50px;
    transition: all 0.4s ease;
    font-weight: 700;
}

    .btn-spark:hover {
        transform: scale(1.05);
        box-shadow: 0 10px 25px rgba(0, 229, 255, 0.4);
        color: var(--bs-spark);
    }

/* =======================================================
   REPARACIÓN: SECCIÓN METODOLOGÍA (TIMELINE)
   ======================================================= */

.timeline-container {
    position: relative;
    padding: 40px 0;
}

/* LÍNEA CENTRAL */
.timeline-line-bg, .timeline-line-progress {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    border-radius: 4px;
}

.timeline-line-bg {
    top: 0;
    bottom: 0;
    background-color: #e5e7eb;
    z-index: 1;
}

.timeline-line-progress {
    top: 0;
    height: 0%; /* JS lo controla */
    background: linear-gradient(180deg, #ef4444 0%, #b91c1c 100%);
    z-index: 2;
    transition: height 0.1s linear;
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.6);
}

/* FILAS DEL TIMELINE */
.timeline-row {
    display: flex;
    align-items: center;
    margin-bottom: 80px;
    position: relative;
    z-index: 3;
    opacity: 0.3; /* Efecto fade inicial */
    transition: all 0.5s ease-out;
}

    .timeline-row.active {
        opacity: 1;
        transform: translateY(0);
    }

/* CONTENIDO (IZQ / DER) */
.timeline-content {
    width: 45%;
    padding: 0 40px;
    position: relative;
}

.timeline-empty {
    width: 45%;
}

/* PUNTO CENTRAL (ICONO) */
.timeline-dot-wrapper {
    width: 10%;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.timeline-dot {
    width: 60px;
    height: 60px;
    background-color: #fff;
    border: 4px solid #e5e7eb;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #9ca3af;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 4;
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}

/* Estado Activo del Punto */
.timeline-row.active .timeline-dot {
    border-color: #ef4444;
    background-color: #ef4444;
    color: #fff;
    transform: scale(1.2);
    box-shadow: 0 0 25px rgba(239, 68, 68, 0.5);
}

.timeline-row.active .success-dot {
    border-color: #10b981;
    background-color: #10b981;
    box-shadow: 0 0 25px rgba(16, 185, 129, 0.5);
}

/* NÚMEROS GRANDES DE FONDO */
.step-number {
    position: absolute;
    top: -40px;
    font-size: 5rem;
    font-weight: 900;
    color: #f3f4f6; /* Gris muy claro */
    font-family: 'Orbitron', sans-serif;
    z-index: -1;
    line-height: 1;
}

.left-side .step-number {
    right: 20px;
}

.right-side .step-number {
    left: 20px;
}

/* RESPONSIVO (MÓVIL) */
@media (max-width: 991px) {
    .timeline-row {
        flex-direction: column;
        align-items: flex-start;
        margin-bottom: 50px;
    }

    .timeline-line-bg, .timeline-line-progress {
        left: 30px; /* Mover línea a la izquierda */
    }

    .timeline-content {
        width: 100%;
        padding-left: 80px; /* Espacio para la línea */
        padding-right: 0;
        text-align: left !important; /* Forzar alineación izquierda */
    }

    .timeline-empty {
        display: none;
    }

    .timeline-dot-wrapper {
        width: auto;
        position: absolute;
        left: 30px;
        top: 0;
        transform: translateX(-50%);
    }

    .step-number {
        top: -30px;
        font-size: 4rem;
        left: 70px !important; /* Ajustar número en móvil */
        right: auto !important;
    }
}
/* =======================================================
   EFECTO CONTADOR "PRO" (NAVBAR)
   ======================================================= */

/* Estado Normal del Contenedor */
.visit-counter-nav {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* Rebote suave */
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05); /* Vidrio sutil */
    border-radius: 50px;
    padding: 5px 15px;
}

    /* --- ESTADO "HIT" (Cuando cambia el número) --- */
    .visit-counter-nav.hit-update {
        /* Fondo Oscuro Tech */
        background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%) !important;
        /* Borde Neón Cyan */
        border-color: #22d3ee !important;
        /* Sombra resplandeciente */
        box-shadow: 0 0 20px rgba(34, 211, 238, 0.6), inset 0 0 10px rgba(34, 211, 238, 0.2);
        transform: scale(1.15); /* Crece un poco */
    }

        /* Animación del ÍCONO (Ojo) */
        .visit-counter-nav.hit-update .live-eye {
            color: #22d3ee !important; /* Cyan intenso */
            animation: iconShake 0.5s ease-in-out infinite; /* Tiembla */
        }

        /* Animación del NÚMERO */
        .visit-counter-nav.hit-update .counter-anim {
            color: #ffffff !important; /* Blanco puro */
            text-shadow: 0 0 10px #ffffff, 0 0 20px #22d3ee; /* Glow blanco y cyan */
            font-weight: 900;
        }

        /* Animación del PUNTO VERDE (Live Dot) */
        .visit-counter-nav.hit-update .live-dot {
            background-color: #ef4444 !important; /* Cambia a rojo brevemente (Grabando) */
            box-shadow: 0 0 10px #ef4444;
            animation: blinkFast 0.2s infinite;
        }

/* --- KEYFRAMES (Las animaciones) --- */
@keyframes iconShake {
    0% {
        transform: rotate(0deg);
    }

    25% {
        transform: rotate(-15deg) scale(1.2);
    }

    50% {
        transform: rotate(0deg);
    }

    75% {
        transform: rotate(15deg) scale(1.2);
    }

    100% {
        transform: rotate(0deg);
    }
}

@keyframes blinkFast {
    0%, 100% {
        opacity: 1;
    }

    50% {
        opacity: 0.3;
    }
}