/* ==========================================
   1. Reset y Variables Globales
   ================================---------- */
:root {
    --bg-primary: #0a0f1d;
    --bg-card: #131b2e;
    --accent: #2563eb;
    --accent-glow: rgba(37, 99, 235, 0.4);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border: #1e293b;
    --font: 'Inter', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font);
    background-color: var(--bg-primary);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

/* ==========================================
   2. Header y Navegación
   ================================---------- */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(10, 15, 29, 0.85);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
    padding: 1rem 0;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-weight: 700;
    font-size: 1.1rem;
}

.logo .highlight {
    color: var(--accent);
}

.main-nav {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.main-nav a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.main-nav a:hover {
    color: var(--text-main);
}

.btn-nav {
    background: var(--accent);
    color: white !important;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-weight: 600;
}

/* ==========================================
   3. Hero Section & Video Player
   ================================---------- */
.hero-section {
    padding: 10rem 0 6rem 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    align-items: center;
}

@media (min-width: 768px) {
    .hero-grid {
        grid-template-columns: 1.2fr 0.8fr;
    }
}

.badge-pill {
    display: inline-block;
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 0.4rem 0.8rem;
    border-radius: 50px;
    font-size: 0.85rem;
    color: var(--accent);
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.hero-content h1 {
    font-size: clamp(2.2rem, 4vw, 3.5rem);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.hero-content h1 strong {
    color: var(--accent);
}

.hero-content p {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-primary {
    background: var(--accent);
    color: white;
    box-shadow: 0 4px 14px var(--accent-glow);
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-main);
}

.btn:hover {
    transform: translateY(-2px);
}

/* Hero Visual (Video Component) */
.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 600px; 
    width: 100%;
    margin: 0 auto;
}

.card-video-wrapper {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-top: 3px solid var(--accent); 
    border-radius: 16px;
    padding: 0;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* Relación 16:9 */
}

.card-video-wrapper video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    outline: none;
    cursor: pointer;
}

.card-video-wrapper video::-webkit-media-controls-panel {
    background-color: rgba(0, 0, 0, 0.7);
}

.video-tag {
    position: absolute;
    bottom: 15px;
    left: 15px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.7rem;
    pointer-events: none;
    backdrop-filter: blur(4px);
    z-index: 2;
}

@media (min-width: 992px) {
    .hero-visual {
        max-width: 650px;
    }
}

/* ==========================================
   4. Solutions Bento Grid & Components
   ================================---------- */
.solutions-section {
    padding: 6rem 0;
    background-color: rgba(19, 27, 46, 0.4);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 4rem auto;
}

.section-header h2 {
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    font-weight: 800;
    margin-bottom: 1rem;
}

.section-header h2 strong {
    color: var(--accent);
}

.section-header p {
    color: var(--text-muted);
}

.bento-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-top: 3rem;
}

@media (min-width: 992px) {
    .bento-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.bento-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 2.5rem 2rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.3s ease, border-color 0.3s ease;
    position: relative;
    overflow: hidden;
}

.bento-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
}

.bento-main {
    grid-column: span 1;
}

@media (min-width: 992px) {
    .bento-main {
        grid-column: span 2;
        display: grid;
        grid-template-columns: 1.1fr 0.9fr;
        gap: 2rem;
        align-items: center;
    }
}

.tag-ia {
    display: inline-block;
    background: rgba(37, 99, 235, 0.15);
    color: var(--accent);
    padding: 0.3rem 0.8rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1rem;
}

.bento-card h3 {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 0.8rem;
}

.bento-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.5;
}

.bento-icon {
    font-size: 2.2rem;
    margin-bottom: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 55px;
    height: 55px;
    background: rgba(37, 99, 235, 0.1);
    border-radius: 12px;
}

/* Dashboard Mockup Component */
.dashboard-mockup {
    background: #070a14;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.2rem;
    margin-top: 1.5rem;
}

@media (min-width: 992px) {
    .dashboard-mockup {
        margin-top: 0;
    }
}

.mockup-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.6rem;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}
.dot.red { background: #ef4444; }
.dot.yellow { background: #f59e0b; }
.dot.green { background: #10b981; }

.mockup-title {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-left: 8px;
    font-family: monospace;
}

.metric-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    margin-bottom: 0.4rem;
}

.text-success {
    color: #10b981;
}

.progress-bar-container {
    width: 100%;
    height: 6px;
    background: var(--border);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.progress-bar {
    height: 100%;
    background: var(--accent);
    border-radius: 10px;
}

.ai-transcript-box {
    background: rgba(255, 255, 255, 0.03);
    border-left: 3px solid var(--accent);
    padding: 0.8rem;
    border-radius: 4px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Coach IA Component Badge */
.coach-mockup-badge {
    background: rgba(37, 99, 235, 0.08);
    border: 1px solid rgba(37, 99, 235, 0.3);
    border-radius: 12px;
    padding: 1rem;
    margin-top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.coach-score-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.score-label {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.score-value {
    font-size: 1rem;
    color: var(--text-main);
    font-weight: 700;
}

.coach-status-tag {
    display: inline-block;
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    text-align: center;
}

/* Ecosystem Marquee Card Component */
.ecosystem-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.ecosystem-header {
    margin-bottom: 1.5rem;
}

.card-marquee-slider {
    position: relative;
    width: 100%;
    overflow: hidden;
    display: flex;
    padding: 0.5rem 0;
    mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
}

.card-marquee-track {
    display: flex;
    gap: 1rem;
    width: max-content;
    animation: scrollCardMarquee 20s linear infinite;
}

.card-marquee-slider:hover .card-marquee-track {
    animation-play-state: paused;
}

.c-item {
    background: rgba(37, 99, 235, 0.08);
    border: 1px solid rgba(37, 99, 235, 0.25);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    white-space: nowrap;
    font-size: 0.8rem;
    color: var(--text-main);
    font-weight: 600;
    transition: border-color 0.3s ease, background 0.3s ease;
}

.c-item:hover {
    border-color: var(--accent);
    background: rgba(37, 99, 235, 0.2);
}

@keyframes scrollCardMarquee {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* ==========================================
   5. Partners / Distribuidores Section
   ================================---------- */
.partners-section {
    padding: 6rem 0;
    background-color: rgba(19, 27, 46, 0.4);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.partners-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
}

@media (min-width: 768px) {
    .partners-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.partner-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 2.5rem 2rem;
    border-radius: 16px;
    text-align: center;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.partner-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
}

.partner-icon {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 70px;
    height: 70px;
    background: rgba(37, 99, 235, 0.1);
    border-radius: 14px;
}

.partner-card h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.8rem;
}

.partner-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.partners-cta-box {
    background: linear-gradient(135deg, var(--bg-card) 0%, rgba(37, 99, 235, 0.15) 100%);
    border: 1px solid var(--accent);
    padding: 3rem 2rem;
    border-radius: 20px;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.partners-cta-box h3 {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.partners-cta-box p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}
/* --- Estilos para la sección de Trayectoria (CV con Asteroides) --- */

.cv-section {
    padding: 6rem 0;
}

.cv-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
    max-width: 1000px;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .cv-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.cv-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.3s ease, border-color 0.3s ease;
    position: relative;
    overflow: hidden;
}

.cv-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--accent);
}

.cv-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
}

.cv-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.2rem;
}

.cv-badge {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--accent);
    background: rgba(37, 99, 235, 0.1);
    padding: 0.3rem 0.8rem;
    border-radius: 50px;
}

.cv-date {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 600;
}

.cv-card h3 {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
}

.cv-card h4 {
    font-size: 0.95rem;
    font-weight: 400;
    color: var(--text-muted);
    margin-bottom: 1.2rem;
}

.cv-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 2rem;
}

/* Etiquetas de tecnologías (Tech Stack) */
.cv-tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.cv-tech-stack span {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    padding: 0.3rem 0.7rem;
    border-radius: 6px;
    font-size: 0.75rem;
    color: var(--text-muted);
    font-family: monospace;
}
/* --- Nuevos Estilos para el Hero Visual (Imagen + Pop-up) --- */

.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 600px; 
    width: 100%;
    margin: 0 auto;
}

.card-video-wrapper {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* Proporción 16:9 */
    background: #000; /* Fondo negro mientras carga */
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1); /* Transición suave al flotar */
}

/* --- Estado 1: Imagen Fija (Por defecto) --- */
.video-cover-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 2; /* Imagen encima del video */
    opacity: 1;
    transition: opacity 0.3s ease;
}

/* Ocultar controles nativos de video mientras está la imagen */
.net2phone-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1; /* Video debajo de la imagen */
    opacity: 0;
}

/* Etiqueta de texto sobre la imagen */
.video-tag {
    position: absolute;
    bottom: 15px;
    left: 15px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.7rem;
    pointer-events: none;
    backdrop-filter: blur(4px);
    z-index: 3;
    transition: opacity 0.3s ease;
}

/* --- Estado 2: Modo Flotante (Pop-up) --- */
.card-video-wrapper.is-floating {
    position: fixed !important;
    bottom: 25px;
    right: 25px;
    width: 320px !important; /* Tamaño fijo del pop-up */
    height: 180px !important;
    padding-bottom: 0 !important;
    z-index: 9999;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
    border: 2px solid var(--accent);
    border-radius: 12px;
    animation: slideUpFloat 0.3s ease-out forwards;
}

/* Cuando flota, ocultamos la imagen y mostramos el video */
.card-video-wrapper.is-floating .video-cover-image {
    opacity: 0;
}

.card-video-wrapper.is-floating .net2phone-video {
    opacity: 1;
    z-index: 4; /* Video encima al flotar */
}

/* Ocultar etiqueta al flotar */
.card-video-wrapper.is-floating .video-tag {
    opacity: 0;
}

@keyframes slideUpFloat {
    from {
        transform: translateY(30px) scale(0.9);
    }
    to {
        transform: translateY(0) scale(1);
    }
}