/* --- VARIABLES Y RESET (TEMA TECH/CYBER) --- */
:root {
    --bg-color: #0b0c10;      /* Fondo principal muy oscuro */
    --secondary-bg: #1f2833;  /* Fondo secundario (tarjetas) */
    --text-color: #c5c6c7;    /* Texto gris claro legible */
    
    /* ACENTOS */
    --accent-color: #66fcf1;  /* Cian Eléctrico (Color principal) */
    --dark-accent: #45a29e;   /* Cian oscurecido (Hover/Detalles) */
    
    /* Dimensiones */
    --card-width: 350px;
    --card-gap: 30px;
    --port-card-width: 400px;
    --port-card-gap: 30px;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Poppins', sans-serif; scroll-behavior: smooth; }

body { 
    background-color: var(--bg-color); 
    color: var(--text-color); 
    overflow-x: hidden; 
    font-size: 16px; 
    position: relative; 
}

/* --- ANIMACIONES --- */
@keyframes light-shimmer { 0% { background-position: -100% 0; } 100% { background-position: 200% 0; } }
@keyframes pulse-glow {
    0% { box-shadow: 0 0 0 0 rgba(102, 252, 241, 0.4); }
    70% { box-shadow: 0 0 0 20px rgba(102, 252, 241, 0); }
    100% { box-shadow: 0 0 0 0 rgba(102, 252, 241, 0); }
}
@keyframes popIn { from { transform: scale(0.8); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes fadeInDown { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: translateY(0); } }

/* --- PANTALLA DE CARGA --- */
#intro-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100vh;
    background-color: #050505; z-index: 10000;
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    transition: transform 0.8s cubic-bezier(0.77, 0, 0.175, 1);
    padding: 20px;
}
.login-box { text-align: center; width: 90%; max-width: 400px; }
.user-avatar {
    width: 150px; height: 150px; background: #151515; border-radius: 50%;
    margin: 0 auto 25px; border: 4px solid var(--accent-color); 
    display: flex; align-items: center; justify-content: center; overflow: hidden;
    box-shadow: 0 0 30px rgba(102, 252, 241, 0.3); animation: pulse-glow 2s infinite;
}
.user-avatar img { width: 100%; height: 100%; object-fit: cover; }
.welcome-text { font-size: 2.5rem; margin-bottom: 10px; color: #fff; }
.status-text { color: var(--accent-color); margin-top: 15px; font-family: 'JetBrains Mono', monospace; font-size: 1.1rem; }
.loading-bar-container { width: 100%; height: 8px; background: #333; margin-top: 30px; border-radius: 10px; overflow: hidden; }
.loading-bar { width: 0%; height: 100%; background: var(--accent-color); box-shadow: 0 0 15px var(--accent-color); transition: width 0.1s linear; }
.percentage { color: #fff; font-family: 'JetBrains Mono', monospace; font-size: 1rem; margin-top: 10px; display: block; text-align: right; }

/* --- MODAL DE ÉXITO --- */
#success-modal {
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.8); z-index: 10001; justify-content: center; align-items: center; backdrop-filter: blur(5px);
}
.modal-content {
    background: var(--secondary-bg); padding: 50px; border-radius: 10px; text-align: center;
    border: 1px solid var(--accent-color); box-shadow: 0 0 40px rgba(102, 252, 241, 0.2);
    max-width: 450px; width: 90%; animation: popIn 0.3s ease-out;
}
.modal-icon { font-size: 5rem; color: var(--accent-color); margin-bottom: 25px; }
.modal-title { font-size: 2.2rem; margin-bottom: 15px; color: #fff; }
.modal-text { font-size: 1.2rem; color: #ccc; margin-bottom: 30px; }
.close-btn {
    background: transparent; color: var(--accent-color); border: 2px solid var(--accent-color); 
    padding: 12px 35px; font-weight: bold; font-size: 1.1rem; border-radius: 5px; cursor: pointer; transition: .3s;
}
.close-btn:hover { background: var(--accent-color); color: #000; box-shadow: 0 0 20px var(--accent-color); }

/* --- HEADER PRINCIPAL --- */
header {
    position: fixed; top: 0; left: 0; width: 100%; padding: 20px 8%; 
    display: flex; justify-content: space-between; align-items: center;
    background: rgba(11, 12, 16, 0.95); backdrop-filter: blur(10px); z-index: 100; 
    border-bottom: 1px solid rgba(102, 252, 241, 0.1); transition: padding 0.3s;
}
/* Busca y REEMPLAZA la clase .logo por esta versión mejorada: */

.logo { 
    font-size: 1.8rem; 
    font-weight: 800; 
    text-transform: uppercase; 
    letter-spacing: 2px; 
    text-decoration: none; 
    
    /* EL SECRETO: Un gradiente complejo para simular brillo metálico */
    background: linear-gradient(
        120deg, 
        #ffffff 0%, 
        #ffffff 40%, 
        var(--accent-color) 50%,  /* El punto brillante (Cian) */
        #ffffff 60%, 
        #ffffff 100%
    );
    
    background-size: 200% auto; /* Tamaño doble para poder moverlo */
    
    /* Hacemos que el fondo sea el color del texto */
    color: #fff; /* Fallback por si acaso */
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent; 
    
    /* Animación más lenta y fluida (ease-in-out) */
    animation: shine-pass 4s cubic-bezier(0.25, 1, 0.5, 1) infinite;
}

/* Agrega un pequeño brillo (glow) suave al pasar el mouse para interactividad */
.logo:hover {
    text-shadow: 0 0 20px rgba(102, 252, 241, 0.6);
}

/* --- ANIMACIÓN KEYFRAMES --- */
@keyframes shine-pass {
    0% {
        background-position: -200% center;
    }
    100% {
        background-position: 200% center;
    }
}
.logo:hover { color: var(--accent-color); text-shadow: 0 0 10px var(--accent-color); }

.navbar a { font-size: 1rem; color: #fff; text-decoration: none; font-weight: 500; margin-left: 40px; transition: .3s; position: relative; }
.navbar a:hover, .navbar a.active { color: var(--accent-color); }
.navbar a::after { content: ''; position: absolute; left: 0; bottom: -5px; width: 0; height: 2px; background: var(--accent-color); transition: 0.3s; }
.navbar a:hover::after, .navbar a.active::after { width: 100%; }

/* --- CLASE PARA ANIMACIÓN DE TEXTO (Igual al Logo) --- */
.hero-title-anim {
    /* Mismo gradiente y animación que el logo */
    background: linear-gradient(
        120deg, 
        var(--accent-color) 0%, 
        #ffffff 20%, 
        var(--accent-color) 50%, 
        #ffffff 80%, 
        var(--accent-color) 100%
    );
    background-size: 200% auto;
    
    color: #fff;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    
    animation: shine-pass 4s cubic-bezier(0.25, 1, 0.5, 1) infinite;
    
    /* Aseguramos que se vea grande e importante */
    font-size: 5rem; 
    font-weight: 700; 
    line-height: 1.1; 
    margin-bottom: 10px;
}

/* Ajuste para móvil para que el texto grande no rompa la pantalla */
@media (max-width: 768px) {
    .hero-title-anim {
        font-size: 3.5rem;
    }
}

/* --- AGREGA ESTO PARA QUE NO SALGA EN PC --- */
#menu-icon {
    display: none; /* Esto oculta la hamburguesa en PC */
    font-size: 2.5rem;
    color: #fff;
    cursor: pointer;
}

/* --- SECCIONES GENERALES (Ajustado para reducir espacios) --- */
section { 
    /* Reducimos el padding de 120px a 70px para acercar las secciones */
    padding: 70px 8%; 
    
    /* CAMBIO CLAVE: Cambiamos 'min-height: 100vh' a 'auto'.
       Esto hace que la sección mida solo lo que mide su contenido, 
       eliminando el espacio vacío gigante. */
    min-height: auto; 
}

/* ... (Las reglas de .heading siguen igual) ... */


/* --- ESTILOS ESPECÍFICOS: HOME --- */
#home {
    display: flex; 
    align-items: center; 
    justify-content: center; 
    gap: 10%; 
    padding-top: 80px; 
    
    /* IMPORTANTE: Le devolvemos la altura completa SOLO al Inicio 
       para que la primera impresión sea impactante */
    min-height: 100vh; 
    
    /* Resto del fondo... */
    background: linear-gradient(rgba(11, 12, 16, 0.9), rgba(11, 12, 16, 0.95)), url('https://images.unsplash.com/photo-1550751827-4bd374c3f58b?q=80&w=2070&auto=format&fit=crop');
    background-size: cover; 
    background-position: center; 
    background-attachment: fixed;
}
/* --- TÍTULOS DE SECCIÓN --- */

/* 1. El texto normal del título se queda quieto en blanco */
.heading { 
    font-size: 3.5rem; 
    text-align: center; 
    margin-bottom: 60px; 
    color: #fff;       /* Blanco sólido */
    font-weight: 700;
    
    /* Aseguramos que no tenga animación el contenedor padre */
    background: none;
    -webkit-text-fill-color: initial;
    animation: none;
}

/* 2. La animación se aplica SOLO a las palabras destacadas (span) */
.heading span { 
    /* Gradiente: Base Cian -> Brillo Blanco -> Base Cian */
    background: linear-gradient(
        120deg, 
        var(--accent-color) 0%, 
        var(--accent-color) 40%, 
        #ffffff 50%,  /* El rayo de luz blanca */
        var(--accent-color) 60%, 
        var(--accent-color) 100%
    );
    
    background-size: 200% auto; /* Tamaño doble para mover el fondo */
    
    /* Recortamos el fondo a la forma de las letras */
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    
    /* Animación infinita */
    animation: shine-pass 4s cubic-bezier(0.25, 1, 0.5, 1) infinite;
}

/* Ajuste Responsive */
@media (max-width: 768px) {
    .heading {
        font-size: 2.5rem; 
        margin-bottom: 40px;
    }
}

/* --- ESTILOS ESPECÍFICOS: HOME --- */
#home {
    display: flex; align-items: center;
    background: linear-gradient(rgba(11, 12, 16, 0.9), rgba(11, 12, 16, 0.95)), url('https://images.unsplash.com/photo-1550751827-4bd374c3f58b?q=80&w=2070&auto=format&fit=crop');
    background-size: cover; background-position: center; background-attachment: fixed;
}
.home-content h3 { font-size: 1.8rem; font-weight: 400; color: #fff; }
.home-content h1 { font-size: 5rem; font-weight: 700; line-height: 1.1; color: var(--accent-color); margin-bottom: 10px; text-shadow: 0 0 15px rgba(102, 252, 241, 0.3); }
.home-content p { margin: 25px 0 45px; max-width: 650px; font-size: 1.1rem; line-height: 1.8; color: var(--text-color); }
.btn-box {
    display: inline-block; padding: 12px 30px; background: transparent;
    border: 2px solid var(--accent-color); border-radius: 5px; font-weight: 600; 
    color: var(--accent-color); text-decoration: none; transition: .3s; cursor: pointer; font-size: 1rem;
}
.btn-box:hover { box-shadow: 0 0 20px rgba(102, 252, 241, 0.4); background: var(--accent-color); color: #0b0c10; transform: translateY(-3px); }

/* --- AGREGADO PARA FOTO HOME --- */

/* 1. Ajustamos el contenedor principal para que ponga elementos lado a lado */
#home {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10%; /* Espacio entre texto y foto */
    padding-top: 80px; /* Un poco de aire arriba */
}

/* 2. Estilo de la Foto Circular */
.home-img img {
    width: 380px;       /* Tamaño del círculo */
    height: 380px;      /* Debe ser igual al ancho para ser círculo perfecto */
    border-radius: 50%; /* Esto lo hace redondo */
    object-fit: cover;  /* Asegura que la foto no se estire feo */
    
    /* Estilo Tech */
    border: 4px solid var(--accent-color); 
    box-shadow: 0 0 40px var(--accent-color); /* Resplandor Cian */
    
    /* La Animación Mágica */
    animation: floatImage 4s ease-in-out infinite;
    transition: 0.3s;
    cursor: pointer;
}

/* Efecto al pasar el mouse (opcional) */
.home-img img:hover {
    box-shadow: 0 0 80px var(--accent-color), 0 0 20px #fff;
    border-color: #fff;
}

/* 3. Definición de la animación (Sube y Baja) */
@keyframes floatImage {
    0% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-25px); /* Sube 25 pixeles */
    }
    100% {
        transform: translateY(0);
    }
}

/* 4. AJUSTE RESPONSIVE (IMPORTANTE) */
/* Busca tu @media (max-width: 1024px) existente y asegúrate de incluir esto dentro: */

@media (max-width: 1024px) {
    #home {
        flex-direction: column-reverse; /* En celular: Foto arriba, texto abajo */
        gap: 30px;
        text-align: center;
    }

    .home-content {
        align-items: center;
        display: flex;
        flex-direction: column;
    }
    
    /* En celular hacemos la foto un poco más pequeña */
    .home-img img {
        width: 260px;
        height: 260px;
        margin-top: 30px;
    }
    
    /* Centrar los botones en celular */
    .home-content div[style*="display: flex"] {
        justify-content: center !important;
    }
}

/* --- ESTILOS ESPECÍFICOS: ABOUT --- */
#about { background-color: var(--secondary-bg); display: flex; align-items: center; gap: 60px; }
.about-img { flex: 1; text-align: center; }
.profile-pic { width: 300px; height: 300px; border-radius: 50%; object-fit: cover; border: 3px solid var(--accent-color); box-shadow: 0 0 30px rgba(102, 252, 241, 0.2); transition: 0.5s; }
.profile-pic:hover { filter: grayscale(100%); }
.about-content { flex: 1.5; }
.about-content h3 { font-size: 2rem; margin-bottom: 15px; color: #fff; }
.about-content p { font-size: 1.1rem; line-height: 1.8; margin-bottom: 20px; }

/* --- ESTILOS ESPECÍFICOS: ABOUT (MODO TEXTO) --- */
#about { 
    background-color: var(--secondary-bg); 
    display: block; /* Cambiamos flex por block para centrar todo */
    text-align: center;
}

.about-content { 
    width: 100%; 
    padding: 20px;
}

.about-content h3 { 
    font-size: 2.2rem; 
    margin-bottom: 25px; 
    color: var(--accent-color); /* Resaltamos el subtítulo en Cian */
}

.about-content p { 
    font-size: 1.15rem; 
    line-height: 1.9; 
    margin-bottom: 25px; 
    color: #ccc;
    text-align: justify; /* Justificado para que se vea como bloque profesional */
    text-align-last: center; /* La última línea centrada queda elegante */
}

/* Ajuste para móvil para que el texto no quede muy pegado a los bordes */
@media (max-width: 768px) {
    .about-content p {
        text-align: left; /* En celular es mejor leer alineado a la izquierda */
        font-size: 1rem;
    }
}

/* --- TARJETAS UNIFICADAS (Stack, Servicios, Contacto) --- */
.stack-card, .service-box, .contact-card {
    background: #15191d; padding: 40px 30px; border-radius: 10px; border: 1px solid #333;
    transition: all 0.4s ease; text-align: center; position: relative; box-shadow: 0 4px 6px rgba(0,0,0,0.3);
}
.stack-card:hover, .service-box:hover, .contact-card:hover { 
    transform: translateY(-10px); border-color: var(--accent-color); box-shadow: 0 0 25px rgba(102, 252, 241, 0.15);
}

/* --- ARQUITECTURA --- */
#stack-details { background-color: #0b0c10; text-align: center; }
.stack-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 40px; margin-top: 60px; }
.stack-icon { font-size: 4rem; color: var(--accent-color); margin-bottom: 25px; display: inline-block; }
.stack-card h3 { font-size: 1.8rem; color: #fff; margin-bottom: 20px; }
.stack-card p { font-size: 1rem; color: #a0a0a0; line-height: 1.6; margin-bottom: 25px; }
.stack-tags { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.tech-tag {
    background: rgba(102, 252, 241, 0.1); color: var(--accent-color); padding: 5px 15px; 
    border-radius: 4px; font-size: 0.85rem; font-weight: 600; border: 1px solid rgba(102, 252, 241, 0.3);
    font-family: 'JetBrains Mono', monospace;
}

/* --- SERVICIOS --- */
.services-container { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 30px; }
/* Busca y REEMPLAZA la regla de .service-box i por esto: */

/* Busca y REEMPLAZA el bloque de .service-box i por este COMBO: */

/* Aplicamos estilos a AMBOS tipos de tarjeta: Servicios (Inicio) y Features (CCTV) */
.service-box i, 
.feature-item i { 
    font-size: 3.5rem; 
    color: var(--accent-color); 
    margin-bottom: 20px; 
    transition: 0.3s ease; 
    
    /* Brillo base suave (siempre encendido) */
    text-shadow: 0 0 10px rgba(102, 252, 241, 0.3); 
}

/* --- EFECTO HOVER PARA AMBOS --- */
.service-box:hover i, 
.feature-item:hover i {
    /* El icono crece un poquito */
    transform: scale(1.15) translateY(-5px);
    
    /* El brillo se vuelve intenso (Efecto Neón Puro) */
    text-shadow: 
        0 0 20px var(--accent-color), 
        0 0 40px var(--accent-color), 
        0 0 60px rgba(102, 252, 241, 0.5);
        
    /* El centro se vuelve blanco por la intensidad de la luz */
    color: #fff; 
}
.service-box h3 { font-size: 1.5rem; margin-bottom: 15px; color: #fff; }
.service-box p { font-size: 1rem; line-height: 1.6; color: #ccc;}

/* --- PROYECTOS (CARRUSEL) --- */
.portfolio-slider {
    width: 100%; overflow: hidden; position: relative; padding: 20px 0;
    mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
}
.portfolio-track {
    display: flex; gap: var(--port-card-gap);
    width: calc((var(--port-card-width) + var(--port-card-gap)) * 8); 
    animation: scroll-portfolio 50s linear infinite;
}
.portfolio-track:hover { animation-play-state: paused; }
@keyframes scroll-portfolio { 0% { transform: translateX(0); } 100% { transform: translateX(calc((var(--port-card-width) + var(--port-card-gap)) * -4)); } }

.portfolio-card {
    position: relative; width: var(--port-card-width); height: 250px; flex-shrink: 0; border-radius: 10px; overflow: hidden;
    border: 1px solid #333; cursor: pointer; text-decoration: none; background: #000;
}
.portfolio-card img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; opacity: 0.7; }
.portfolio-card:hover img { transform: scale(1.1); opacity: 0.4; }
.portfolio-overlay {
    position: absolute; bottom: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to top, rgba(11, 12, 16, 0.95) 0%, rgba(11, 12, 16, 0.7) 60%, transparent 100%);
    display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center;
    transform: translateY(100%); transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1); padding: 20px;
}
.portfolio-card:hover .portfolio-overlay { transform: translateY(0); }
.portfolio-overlay h4 { font-size: 1.5rem; color: var(--accent-color); margin-bottom: 5px; font-weight: 700; text-transform: uppercase; }
.portfolio-overlay p { font-size: 1rem; color: #fff; margin-bottom: 20px; }
.portfolio-overlay i {
    font-size: 1.8rem; color: #0b0c10; background: var(--accent-color); border-radius: 50%; padding: 10px;
    box-shadow: 0 0 15px rgba(102, 252, 241, 0.5); transition: 0.3s;
}
.portfolio-overlay i:hover { transform: scale(1.1); background: #fff; }

/* --- TESTIMONIOS --- */
#testimonials { background-color: var(--secondary-bg); padding: 100px 0; overflow: hidden; display: flex; flex-direction: column; justify-content: center; }
.slider-container { width: 100%; margin-top: 40px; position: relative; mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent); -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent); }
.slider-track { display: flex; gap: var(--card-gap); width: calc((var(--card-width) + var(--card-gap)) * 12); animation: scroll 40s linear infinite; }
.slider-track:hover { animation-play-state: paused; }
@keyframes scroll { 0% { transform: translateX(0); } 100% { transform: translateX(calc((var(--card-width) + var(--card-gap)) * -6)); } }
.testimonial-card {
    background: #15191d; width: var(--card-width); flex-shrink: 0; padding: 40px 30px; border-radius: 10px; 
    border: 1px solid #333; text-align: left; display: flex; flex-direction: column; justify-content: space-between;
}
.testimonial-card:hover { transform: translateY(-5px); border-color: var(--accent-color); box-shadow: 0 0 15px rgba(102, 252, 241, 0.1); }
.quote-icon { font-size: 3rem; color: var(--dark-accent); margin-bottom: 20px; opacity: 0.5; }
.testimonial-card p { font-size: 1rem; color: #ccc; line-height: 1.6; font-style: italic; margin-bottom: 25px; }
.client-info h4 { color: #fff; font-size: 1.1rem; font-weight: bold; margin-bottom: 5px; }
.client-info span { color: var(--accent-color); font-size: 0.9rem; text-transform: uppercase; font-weight: 600; }

/* --- CONTACTO --- */
#contact { display: flex; flex-direction: column; align-items: center; justify-content: center; background: #0b0c10; }
.contact-content { text-align: center; max-width: 900px; width: 100%; }
.contact-container { display: flex; justify-content: center; gap: 30px; margin-top: 50px; margin-bottom: 50px; flex-wrap: wrap; }
.contact-card {
    background: var(--secondary-bg); padding: 30px; border-radius: 10px; text-align: center; min-width: 180px; border: 1px solid #333;
    text-decoration: none; color: #fff; transition: .3s;
}
.contact-card:hover { transform: translateY(-5px); border-color: var(--accent-color); box-shadow: 0 0 20px rgba(102, 252, 241, 0.2); }
.contact-card i { font-size: 2.5rem; color: var(--accent-color); margin-bottom: 15px; }
.contact-card h4 { margin-bottom: 8px; font-size: 1.2rem; color: #fff; }
.contact-card p { font-size: 0.95rem; color: #aaa; }
.contact-form { max-width: 700px; margin: 0 auto; background: var(--secondary-bg); padding: 40px; border-radius: 10px; border: 1px solid #333; display: flex; flex-direction: column; gap: 20px; }
.contact-form h3 { margin-bottom: 20px; color: #fff; font-size: 1.5rem; }
.contact-form input, .contact-form textarea { width: 100%; padding: 18px; background: #0b0c10; border: 1px solid #333; color: #fff; border-radius: 5px; font-size: 1rem; outline: none; transition: .3s; }
.contact-form input:focus, .contact-form textarea:focus { border-color: var(--accent-color); box-shadow: 0 0 10px rgba(102, 252, 241, 0.1); }
.contact-form textarea { resize: none; height: 180px; }

/* Botón flotante */
#scrollTopBtn {
    display: none; position: fixed; bottom: 30px; right: 30px; z-index: 99;
    font-size: 1.8rem; background-color: var(--secondary-bg); color: var(--accent-color); 
    padding: 12px 18px; border-radius: 5px; border: 1px solid var(--accent-color); cursor: pointer;
    box-shadow: 0 0 10px rgba(0,0,0,0.5); transition: 0.3s;
}
#scrollTopBtn:hover { background-color: var(--accent-color); color: #0b0c10; transform: translateY(-5px); }

/* --- ESTILOS ESPECÍFICOS: CCTV (Página Interna) --- */
.back-btn {
    position: fixed; top: 25px; left: 5%; z-index: 1000;
    background: rgba(11, 12, 16, 0.8); backdrop-filter: blur(5px);
    padding: 10px 20px; border-radius: 30px;
    color: #fff; text-decoration: none; border: 1px solid var(--accent-color);
    transition: 0.3s; display: flex; align-items: center; gap: 10px; font-weight: 600;
}
.back-btn:hover { background: var(--accent-color); color: #000; box-shadow: 0 0 15px rgba(102, 252, 241, 0.4); }

.cctv-header {
    min-height: 60vh; 
    background: linear-gradient(rgba(11, 12, 16, 0.85), rgba(11, 12, 16, 0.95)), url('https://images.unsplash.com/photo-1557597774-9d273605dfa9?q=80&w=2070&auto=format&fit=crop');
    background-size: cover; background-position: center;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    text-align: center; padding-top: 40px; padding-bottom: 120px;
    position: relative; z-index: 1; 
}

.cctv-hero-content { max-width: 900px; padding: 0 20px; display: flex; flex-direction: column; align-items: center; }
.hero-logo { max-width: 150px; height: auto; margin-bottom: 25px; filter: drop-shadow(0 5px 15px rgba(0,0,0,0.6)); animation: fadeInDown 1s ease-out; }
.cctv-title { font-size: 3.5rem; color: white; margin-bottom: 20px; line-height: 1.1; font-weight: 700; }
.cctv-subtitle { font-size: 1.2rem; color: #ccc; }

.detail-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px; padding: 0 8%; margin-top: -100px; position: relative; z-index: 100;
}
/* Reutilizamos el estilo de 'feature-item' que es muy similar a service-box, pero lo definimos específico por si acaso */
.feature-item {
    background: var(--secondary-bg); padding: 40px 30px; border-radius: 10px;
    text-align: center; border: 1px solid #333; transition: 0.4s;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3); display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.feature-item:hover { border-color: var(--accent-color); transform: translateY(-10px); box-shadow: 0 0 25px rgba(102, 252, 241, 0.15); }
.feature-item i { font-size: 3.5rem; color: var(--accent-color); margin-bottom: 20px; transition: 0.3s; }
.feature-item h3 { color: #fff; font-size: 1.5rem; margin-bottom: 15px; font-weight: 700; }
.feature-item p { font-size: 1rem; color: #a0a0a0; line-height: 1.6; margin-bottom: 20px; }

.brands-container { margin-top: 100px; text-align: center; padding: 0 20px; }
.brands-list { display: flex; justify-content: center; gap: 40px; color: gray; font-size: 1.2rem; flex-wrap: wrap; font-weight: bold; margin-top: 30px; }
.brand-item { transition: 0.3s; cursor: default; }
.brand-item:hover { color: var(--accent-color) !important; text-shadow: 0 0 15px rgba(102, 252, 241, 0.5); }
.cta-container { margin-top: 80px; text-align: center; padding-bottom: 80px; }

/* FOOTER UNIFICADO */
footer { text-align: center; padding: 20px; background: #000; color: #555; border-top: 1px solid #222; }

/* --- RESPONSIVE (MÓVIL Y TABLET) --- */
@media (max-width: 1024px) { 
    header { padding: 15px 5%; border-bottom: 1px solid rgba(255,255,255,0.1); }
    /* Corrección: Solo oculta elementos en el header principal, NO en el de CCTV */
header:not(.cctv-header) > *:not(.logo):not(.navbar):not(#menu-icon) { 
    display: none !important; 
}
    
    #menu-icon {
        display: block;
        font-size: 2.8rem;
        color: #fff;
        cursor: pointer;
        border: none !important; outline: none !important; background: transparent !important; box-shadow: none !important;
        -webkit-tap-highlight-color: transparent;
        transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55), color 0.3s ease, text-shadow 0.3s ease;
        z-index: 10002;
    }
    #menu-icon.bx-x {
        transform: rotate(90deg); color: var(--accent-color); text-shadow: 0 0 15px var(--accent-color), 0 0 30px var(--accent-color);
    }
    
    #home, #about, #stack-details, #contact, .cctv-header { 
        display: flex; flex-direction: column !important; padding-top: 120px; text-align: center; align-items: center; justify-content: center;
    } 
    .home-content h1 { font-size: 3.5rem; margin-bottom: 15px; } 
    .home-content h3 { font-size: 1.5rem; } 
    .about-img { margin-bottom: 50px; width: 100%; display: flex; justify-content: center; }
    .profile-pic { width: 220px; height: 220px; }
    .about-content { width: 100%; padding: 0 10px; }
    .navbar {
        position: absolute; top: 100%; left: 0; width: 100%; padding: 2rem 5%; 
        background: rgba(11, 12, 16, 0.98); border-top: 1px solid #333; display: none; flex-direction: column; z-index: 10000;
    }
    .navbar.active { display: flex; } 
    .navbar a { display: block; font-size: 1.2rem; margin: 1.5rem 0; border-bottom: 1px solid #333; padding-bottom: 15px; text-align: center;}
    .navbar a::after { display: none; }
    
    .contact-container { flex-direction: column; width: 100%; } 
    .contact-card { width: 100%; margin-bottom: 15px; }
    .stack-card { padding: 40px 20px; margin-bottom: 20px; } 
    
    :root { --card-width: 280px; --port-card-width: 280px; } 
    #testimonials { padding: 60px 0; }
    .portfolio-card { height: 200px; }
    .heading, .cctv-title { font-size: 2.5rem; margin-bottom: 40px; }
    .detail-grid { margin-top: -50px; }
}
/* --- 1. AJUSTE BOTÓN "IR ARRIBA" (Para que no estorbe al WhatsApp) --- */
#scrollTopBtn {
    display: none; 
    position: fixed; 
    bottom: 100px; /* Lo subimos para dejar espacio al WhatsApp */
    right: 30px; 
    z-index: 99;
    font-size: 1.8rem; 
    background-color: var(--accent-color); 
    color: #fff; 
    padding: 10px 15px; /* Un poco más compacto */
    border-radius: 10px; 
    border: none; 
    cursor: pointer;
    box-shadow: 0 0 10px rgba(0,0,0,0.5); 
    transition: 0.3s;
}
#scrollTopBtn:hover { 
    background-color: #fff; 
    color: var(--accent-color); 
    transform: translateY(-5px); 
}

/* --- 2. BOTÓN FLOTANTE WHATSAPP (LADO DERECHO) --- */
.whatsapp-btn {
    position: fixed;
    bottom: 30px;
    right: 30px; /* CAMBIO: Ahora a la derecha */
    width: 60px;
    height: 60px;
    background: #25d366;
    color: #fff;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    font-size: 35px;
    z-index: 1000;
    
    /* Efecto Neón y Sombra */
    box-shadow: 0 0 10px rgba(37, 211, 102, 0.5);
    transition: all 0.3s ease;
    
    /* Animación de pulso */
    animation: pulse-green 2s infinite;
}

.whatsapp-btn:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 0 20px #25d366, 0 0 40px rgba(37, 211, 102, 0.6);
    background: #128c7e;
}

@keyframes pulse-green {
    0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7); }
    70% { box-shadow: 0 0 0 15px rgba(37, 211, 102, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

/* Ajuste Móvil: Los alineamos a la derecha también */
@media (max-width: 768px) {
    .whatsapp-btn {
        bottom: 20px;
        right: 20px;
        width: 55px;
        height: 55px;
        font-size: 30px;
    }
    #scrollTopBtn {
        bottom: 90px; /* Ajustado proporcionalmente */
        right: 20px;
    }
}
/* ============================================================
   MEJORAS JZ.DEV — GERMAN JUÁREZ
   Agregado sobre el código original sin romper estilos
============================================================ */

/* --- SECCIÓN EXPERIENCIA / TIMELINE --- */
#experience { background-color: #0b0c10; }

.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding-left: 2.5rem;
}
.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--accent-color), transparent);
    border-radius: 2px;
}
.timeline-item {
    position: relative;
    margin-bottom: 3rem;
}
.timeline-dot {
    position: absolute;
    left: -2.9rem;
    top: .4rem;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--accent-color);
    border: 2px solid #0b0c10;
    box-shadow: 0 0 10px rgba(102, 252, 241, 0.5);
}
.timeline-content {
    background: var(--secondary-bg);
    border: 1px solid #333;
    border-radius: 10px;
    padding: 2rem;
    transition: border-color 0.3s, box-shadow 0.3s;
}
.timeline-content:hover {
    border-color: var(--accent-color);
    box-shadow: 0 0 20px rgba(102, 252, 241, 0.08);
}
.timeline-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: .5rem;
    flex-wrap: wrap;
}
.tl-badge {
    font-size: .7rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 99px;
    text-transform: uppercase;
    letter-spacing: .05em;
}
.tl-badge.current {
    background: rgba(102, 252, 241, 0.12);
    color: var(--accent-color);
    border: 1px solid rgba(102, 252, 241, 0.3);
}
.tl-date {
    font-size: .8rem;
    color: #666;
    font-family: 'JetBrains Mono', monospace;
}
.timeline-content h3 {
    font-size: 1.2rem;
    color: #fff;
    margin-bottom: .2rem;
}
.tl-company {
    font-size: .9rem;
    color: var(--accent-color);
    margin-bottom: 1rem;
}
.tl-achievements {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: .5rem;
    margin-bottom: 1.25rem;
}
.tl-achievements li {
    font-size: .95rem;
    color: #aaa;
    padding-left: 1.25rem;
    position: relative;
    line-height: 1.6;
}
.tl-achievements li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--accent-color);
}
.tl-tags {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
}
.tl-tags span {
    font-size: .72rem;
    background: rgba(102, 252, 241, 0.07);
    color: var(--accent-color);
    border: 1px solid rgba(102, 252, 241, 0.2);
    padding: 2px 9px;
    border-radius: 99px;
    font-family: 'JetBrains Mono', monospace;
}

@media (max-width: 768px) {
    .timeline { padding-left: 1.75rem; }
    .timeline-dot { left: -2.15rem; }
    .timeline-content { padding: 1.25rem; }
}


/* --- PORTFOLIO: MÉTRICAS Y BOTONES DE CÓDIGO --- */
.port-metric {
    display: block;
    font-size: .72rem;
    color: rgba(255,255,255,0.65);
    font-style: italic;
    margin-bottom: .4rem;
    letter-spacing: .02em;
}
.port-actions {
    display: flex;
    gap: .5rem;
    margin-top: .6rem;
    flex-wrap: wrap;
    justify-content: center;
}
.port-btn-demo,
.port-btn-code {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .35rem .9rem;
    border-radius: 5px;
    font-size: .78rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform .2s, box-shadow .2s;
    text-decoration: none;
}
.port-btn-demo {
    background: var(--accent-color);
    color: #0b0c10;
}
.port-btn-code {
    background: rgba(255,255,255,0.08);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.2);
}
.port-btn-demo:hover { transform: translateY(-2px); box-shadow: 0 0 12px rgba(102,252,241,0.4); }
.port-btn-code:hover { background: rgba(255,255,255,0.15); transform: translateY(-2px); }


/* --- TESTIMONIOS: AVATARES Y BADGE VERIFICADO --- */
.testimonial-card .client-info { margin-top: 0; }

.author-row {
    display: flex;
    align-items: center;
    gap: .65rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}
.author-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: .8rem;
    flex-shrink: 0;
    color: #fff;
    border: 1.5px solid rgba(255,255,255,0.15);
}
.av-blue   { background: #1d4ed8; }
.av-green  { background: #15803d; }
.av-purple { background: #7e22ce; }
.av-red    { background: #b91c1c; }
.av-amber  { background: #b45309; }
.av-teal   { background: #0f766e; }

.author-details { flex: 1; min-width: 0; }
.author-details h4 { color: #fff; font-size: 1rem; font-weight: bold; margin-bottom: 2px; }
.author-details span { color: var(--accent-color); font-size: .78rem; text-transform: uppercase; font-weight: 600; }

.verified-badge {
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    font-size: .65rem;
    color: #4ade80;
    background: rgba(34,197,94,.1);
    border: 1px solid rgba(34,197,94,.25);
    padding: 2px 7px;
    border-radius: 99px;
    white-space: nowrap;
    font-weight: 600;
    margin-left: auto;
}

/* Aseguramos que .client-info no conflictúe */
.testimonial-card .client-info h4,
.testimonial-card .client-info span { display: none; } /* Ocultamos los h4/span sueltos, usamos author-row */
.author-details h4,
.author-details span { display: block !important; }