/* =========================================================
   ESTILOS DE VENTAS Y HERO (ventas.css)
   ========================================================= */

/* 1. Fondo del Hero (Tech Neon) */
.fondo-paisaje {
    background: radial-gradient(circle at center, #1b2735 0%, #090a0f 100%) !important;
    position: relative;
    overflow: hidden;
    min-height: 100vh;
}

/* Patrón de cuadrícula tenue para dar toque Tech */
.fondo-paisaje::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: 
        linear-gradient(rgba(0, 255, 144, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 144, 0.05) 1px, transparent 1px);
    background-size: 40px 40px;
    z-index: 0;
}

/* Asegurar que el contenido principal resalte sobre el fondo */
.hero-principal {
    z-index: 1;
    position: relative;
    padding-top: 80px; /* Espacio para el Navbar */
}

/* 2. Botón Call to Action (CTA) */
.cta-btn-hero {
    display: inline-block;
    background: #00ff90;
    color: #090a0f;
    font-weight: 800;
    font-size: 1.25rem;
    padding: 15px 35px;
    border-radius: 50px;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 0 20px rgba(0, 255, 144, 0.4);
    transition: all 0.3s ease;
    border: 2px solid transparent;
    animation: neon-pulse 3s infinite ease-in-out; /* EFECTO PULSACIÓN */
}

@keyframes neon-pulse {
    0% {
        box-shadow: 0 0 20px rgba(0, 255, 144, 0.4);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 40px rgba(0, 255, 144, 0.8), 0 0 10px rgba(0, 255, 144, 0.4);
        transform: scale(1.05); /* Llama la atención sutilmente */
    }
    100% {
        box-shadow: 0 0 20px rgba(0, 255, 144, 0.4);
        transform: scale(1);
    }
}

.cta-btn-hero:hover {
    background: transparent;
    color: #00ff90;
    border-color: #00ff90;
    box-shadow: 0 0 30px rgba(0, 255, 144, 0.8), inset 0 0 10px rgba(0, 255, 144, 0.3);
    transform: translateY(-3px);
}

/* 3. Tarjetas "Los 3 Pilares" */
.pilar-card {
    background: #23272b;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.pilar-card:hover {
    transform: translateY(-10px);
    border-color: #00ff90;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5), 0 0 15px rgba(0, 255, 144, 0.1);
}

.pilar-card p {
    color: #a9b3c1;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* 4. Limpiar el Navbar (Quitar el bosque solo en Home) */
.navbar {
    background: rgba(9, 10, 15, 0.95) !important; /* Más oscuro y elegante */
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 255, 144, 0.2);
}

/* =========================================================
   5. CARRUSEL INFINITO (GLASSMORPHISM CLARO)
   ========================================================= */

.beneficios-carousel {
    background: #f4f6f9; /* Fondo claro sutil (gris muy pálido) */
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

/* Modificar el título de la sección para que contraste con lo claro */
.beneficios-carousel .section-titulo {
    color: #1b2735 !important;
}

.marquee-container {
    width: 100%;
    overflow: hidden;
    position: relative;
    padding: 30px 0; /* Más espacio arriba y abajo para destacar las tarjetas */
}

/* El track interior es súper ancho y contiene los elementos. */
.marquee-track {
    display: flex;
    gap: 40px; /* Más espacio para respirar entre tarjetas grandes */
    width: max-content;
    animation: scrollHorizontal 45s linear infinite; /* Un poco más lento */
}

.marquee-track:hover {
    animation-play-state: paused;
}

@keyframes scrollHorizontal {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Diseño Individual GLASSMORPHISM (Vidrio esmerilado claro) */
.marquee-card {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.08); /* Sombra difuminada muy elegante */
    padding: 35px 30px;
    width: 380px; /* Tarjetas más anchas para el texto más grande */
    flex-shrink: 0;
    text-align: justify; /* TEXTO JUSTIFICADO */
    transition: all 0.3s ease;
}

.marquee-card:hover {
    border-color: #00c875;
    box-shadow: 0 10px 30px rgba(0, 200, 117, 0.15), 0 8px 32px rgba(31, 38, 135, 0.1);
    transform: translateY(-8px);
}

/* -----------------------------------------------------
   Sobrescribir las clases del HTML (Textos más grandes)
-------------------------------------------------------- */
.marquee-card p {
    color: #4a5568 !important; /* Gris oscuro para legibilidad */
    font-size: 1.5rem !important; /* TEXTO MÁS GRANDE */
    line-height: 1.6;
    margin-top: 30px;
}

/* Ajuste responsive para el Marquee (Beneficios) */
@media (max-width: 768px) {
    .marquee-card {
        width: 300px; /* Tarjetas un poco más compactas en móviles */
        padding: 20px;
    }
    
    .marquee-card h3.text-white {
        font-size: 1.25rem !important;
    }
    
    .marquee-card p.beneficio-desc {
        font-size: 0.95rem !important;
    }
}

.marquee-card h3.text-white {
    color: #1a202c !important; /* Titulo oscuro en lugar de blanco */
    font-size: 1.50rem !important; /* TÍTULO MÁS GRANDE */
    text-align: center;
    margin-bottom: 15px;
}

.marquee-card i.text-neon {
    color: #00c875 !important; /* Verde adaptado a fondo claro (sin ser molesto) */
    text-shadow: none !important; /* Quitamos brillo neón que no se ve en blanco */
    display: block;
    text-align: center;
}

/* =========================================================
   6. PORTAFOLIO DE PROYECTOS (TECH NEON GLASS)
   ========================================================= */

.carousel-container {
    padding: 20px 0;
}

.carousel-track {
    display: flex;
    gap: 30px;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.project-card {
    background: rgba(248, 249, 250, 0.95); /* Gris muy claro / Blanco */
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    flex: 0 0 calc(33.333% - 20px);
    display: flex;
    flex-direction: column;
    z-index: 1;
    color: #1a202c; /* Texto negro para contraste */
}
/* Justificar el texto de la descripción y cambiar color a negro */
.project-card p {
    text-align: justify;
    color: #2d3748 !important; /* Gris oscuro/Negro */
    font-size: 0.9rem;
}
/* Cambiar el color del título del proyecto a negro */
.project-card .project-title {
    color: #1a202c !important;
}

.project-card:hover {
    transform: translateY(-20px) scale(1.08); /* Más grande y elevado */
    border-color: #00ff90;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.8), 0 0 30px rgba(0, 255, 144, 0.2);
    z-index: 99; /* Se pone por encima de todo */
}

/* Insignias de Producción / Status */
.project-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 6px 15px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: bold;
    z-index: 10;
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
}

/* Imágenes de proyectos */
.project-card .image-container {
    height: 350px; /* AUMENTADO: Mucho más impactante */
    overflow: hidden;
    position: relative;
    background: #000; /* Fondo negro por si el video tarda */
}

.project-card .project-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s ease;
}

/* Botón flotante para maximizar VIDEO */
.video-overlay-expand {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0, 255, 144, 0.2);
    backdrop-filter: blur(5px);
    border: 1px solid #00ff90;
    color: #00ff90;
    padding: 10px 18px;
    border-radius: 50px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 20;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: bold;
    font-size: 0.9rem;
}

.project-card:hover .video-overlay-expand {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.video-overlay-expand:hover {
    background: #00ff90;
    color: #090a0f;
    box-shadow: 0 0 15px rgba(0, 255, 144, 0.5);
}

.project-card:hover .project-image {
    transform: scale(1.15); /* Más zoom */
}

/* Etiquetas de tecnologías */
.tech-stack {
    margin-bottom: 0.2rem !important;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tech-tag {
    background: #e6fffa; 
    color: #008148;      
    border: 1px solid #b2f5ea;
    padding: 3px 10px;
    border-radius: 5px;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
}
/* Boton Neon Principal */
.btn-neon {
    background: #00ff90;
    color: #090a0f !important;
    font-weight: 800;
    text-transform: uppercase;
    font-size: 0.85rem;
    border: none;
    transition: all 0.3s;
}

.btn-neon:hover {
    background: #00c875;
    box-shadow: 0 0 15px #00ff90;
}

/* Boton Esqueleto Outline Neon */
.btn-outline-neon {
    background: #1a202c; 
    color: #ffffff !important;
    border: 1px solid #1a202c;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.8rem;
    transition: all 0.3s;
}
.btn-outline-neon:hover {
    background: #00ff90; 
    color: #1a202c !important;
    border-color: #00ff90;
    box-shadow: 0 4px 12px rgba(0, 255, 144, 0.3);
}


.card-info {
    padding: 1.25rem 1.5rem 1rem 1.5rem !important; /* Reducimos el padding inferior */
}

.card-info .btn-outline-dark {
    margin-bottom: 0.5rem !important; 
}


/* --- Ajuste para el botón de GitHub y otros botones light en tarjetas claras --- */
.project-card .btn-outline-light {
    color: #1a202c !important;        /* Icono y texto negro */
    border-color: #1a202c !important;  /* Borde negro */
    background: transparent;
    transition: all 0.3s ease;
}

.project-card .btn-outline-light:hover {
    background: #1a202c !important;    /* Fondo negro al pasar el mouse */
    color: #ffffff !important;         /* Icono blanco al pasar el mouse */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}


/* Controles de Carrusel Flexibles (Sobrescribe si hay antiguos) */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 255, 144, 0.2);
    color: #00ff90;
    border: 1px solid #00ff90;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 20;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-btn:hover {
    background: #00ff90;
    color: #090a0f;
}

.carousel-btn.prev { left: -20px; }
.carousel-btn.next { right: -20px; }

/* Responsive para Carrusel (Reforzado para anular conflictos) */
@media (max-width: 992px) {
    .project-card { 
        flex: 0 0 calc(50% - 15px) !important; 
    }
}

@media (max-width: 768px) {
    .carousel-track { 
        gap: 0 !important; 
    }

    .project-card { 
        flex: 0 0 100% !important; /* Una sola tarjeta a la vez en móviles */
        padding-left: 10px;
        padding-right: 10px;
    }
    
    .project-card .image-container {
        height: 300px; /* Reducido para no comerse toda la pantalla */
    }

    /* Ajuste de flechas para que no se corten */
    .carousel-btn.prev { 
        left: 5px !important; 
    }
    .carousel-btn.next { 
        right: 5px !important; 
    }

    .carousel-btn {
        width: 38px;
        height: 38px;
        background: rgba(0, 255, 144, 0.8) !important;
        color: #000 !important;
        border: none;
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .project-card .image-container {
        height: 250px; /* Altura ideal para celulares pequeños */
    }
    
    .project-title {
        font-size: 1.2rem;
    }
}

/* =========================================================
   7. MODAL FULLSCREEN PARA VIDEO
   ========================================================= */

.tech-modal-fullscreen {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(9, 10, 15, 0.98);
    backdrop-filter: blur(15px);
    z-index: 9999;
    display: none; /* Se activa con JS */
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.tech-modal-fullscreen.active {
    display: flex;
}

.modal-controls {
    width: 90%;
    max-width: 1200px;
    display: flex;
    justify-content: flex-end;
    margin-bottom: 20px;
}

.close-modal-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    padding: 10px 25px;
    border-radius: 50px;
    cursor: pointer;
    font-weight: bold;
    font-size: 1.1rem;
    transition: 0.3s;
}

.close-modal-btn:hover {
    background: #ff4d4d;
    border-color: #ff4d4d;
    box-shadow: 0 0 15px rgba(255, 77, 77, 0.5);
}

.modal-video-container {
    width: 95%; 
    max-width: 1200px;
    height: auto; 
    max-height: 80vh; 
    border-radius: 20px;
    overflow: hidden;
    border: 2px solid #00ff90;
    box-shadow: 0 0 50px rgba(0, 255, 144, 0.2);
    background: #000;
}

.modal-video-container video {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Para que se vea completo sin cortes */
}

/* Forzar que el video se adapte en pantallas pequeñas */
@media (max-width: 768px) {
    .modal-video-container {
        height: 60vh;
    }
}

/* =========================================================
   8. DETALLES FINALES (HOVERS Y BOTONES)
   ========================================================= */

/* Hover para el botón "Escríbeme" de la sección Hablemos */
.btn-hablemos-contacto {
    transition: all 0.3s ease !important;
    text-decoration: none;
}

.btn-hablemos-contacto:hover {
    background: #00ff90 !important;
    color: #090a0f !important;
    box-shadow: 0 0 20px rgba(0, 255, 144, 0.6) !important;
    transform: translateY(-3px);
}

/* Hover para las Skills en Sobre Mí */
.badge-skill {
    transition: all 0.3s ease;
    cursor: default;
}

.badge-skill:hover {
    background: #00ff90 !important;
    color: #090a0f !important;
    box-shadow: 0 0 15px rgba(0, 255, 144, 0.4);
    transform: scale(1.1);
}

/* =========================================================
   9. IDENTIDAD DE MARCA (HERO BRANDING)
   ========================================================= */

.brand-name-typing {
    font-family: 'Inter', sans-serif;
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: 4px;
    height: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 5px;
    margin-top: 15px;
}

.brand-char {
    display: inline-block;
    color: rgba(255, 255, 255, 0.2); /* Gris muy tenue inicial */
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    padding: 0 2px;
}

.brand-char.active {
    color: #00ff90 !important;
    text-shadow: 0 0 15px #00ff90, 0 0 30px rgba(0, 255, 144, 0.6);
    transform: translateY(-8px) scale(1.1);
}

@media (max-width: 768px) {
    .brand-name-typing {
        font-size: 1.8rem;
        height: 40px;
    }
}

/* Fondo estilo Hero pero con altura ajustable */
.fondo-tech-ajustable {
    background: radial-gradient(circle at center, #1b2735 0%, #090a0f 100%) !important;
    position: relative;
    overflow: hidden;
}

/* Agregamos también la rejilla neón para que se vea igual al Hero */
.fondo-tech-ajustable::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: 
        linear-gradient(rgba(0, 255, 144, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 144, 0.05) 1px, transparent 1px);
    background-size: 40px 40px;
    z-index: 0;
}

/* Aseguramos que el contenido de testimonios se vea por encima de la rejilla */
.testimonios-contacto .container {
    position: relative;
    z-index: 1;
}

/* =========================================================
   AJUSTE DE BENEFICIOS (CARRUSEL MÓVIL)
   ========================================================= */

@media (max-width: 768px) {
    .beneficios-section {
        overflow: hidden; 
        padding-bottom: 2rem;
    }

    .beneficios-track {
        display: flex !important;
        justify-content: flex-start !important;
        flex-wrap: nowrap !important;
        gap: 15px; 
        overflow-x: auto !important; /* 🔥 ACTIVA EL DEDO */
        scroll-snap-type: x mandatory; /* 🔥 EFECTO IMÁN */
        -webkit-overflow-scrolling: touch; 
        padding: 0 20px 20px 20px; 
        scroll-behavior: smooth;
    }

    .beneficios-track::-webkit-scrollbar {
        display: none; /* Carrusel limpio sin barrita fea */
    }

    .beneficios-track .col-12 {
        flex: 0 0 82% !important; /* 🔥 82% Garantiza el "Vistazo" */
        width: 82%;
        margin-bottom: 0 !important;
        scroll-snap-align: center; /* Se imanta al soltar el dedo */
    }
}
