/* Reset y variables */
:root {
    --primary: #00459c; /* Azul oscuro del header */
    --secondary: #e62b3b; /* Rojo de botones/acento */
    --light-blue: #0b61e2;
    --text-main: #333333;
    --text-muted: #666666;
    --bg-gray: #f4f6fa;
    --white: #ffffff;
    --border: #e2e8f0;
}

body {
    font-family: 'Poppins', sans-serif;
    margin: 0;
    padding: 0;
    color: var(--text-main);
    background-color: var(--bg-gray);
    line-height: 1.6;
}

/* Navbar */
.top-navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    padding: 15px 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    z-index: 1000;
    display: flex;
    align-items: center;
}
.btn-volver {
    text-decoration: none;
    color: var(--primary);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Wrapper general */
.cs-wrapper {
    max-width: 1200px;
    margin: 60px auto 0; /* Espacio para el nav */
    background: var(--white);
    box-shadow: 0 5px 30px rgba(0,0,0,0.05);
    overflow: hidden;
}

/* Header / Hero */
.cs-header {
    background: var(--primary);
    position: relative;
    padding: 80px 60px 80px;
    color: var(--white);
    clip-path: ellipse(150% 100% at 50% 0%); /* Curva tipo mockup */
    display: flex;
    justify-content: space-between;
}

.cs-header-content {
    max-width: 60%;
    position: relative;
    z-index: 2;
}

.cs-header h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.1;
}

.cs-header h2 {
    font-size: 1.5rem;
    font-weight: 400;
    color: #aed0ff;
    margin: 10px 0 40px;
}

.tool-icons {
    display: flex;
    gap: 15px;
    background: var(--white);
    padding: 12px 20px;
    border-radius: 30px;
    display: inline-flex;
    margin-bottom: 30px;
}
.tool-icon {
    width: 30px;
    height: 30px;
    background: #e2e8f0;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

/* CSS Phones */
.css-phones-container {
    position: absolute;
    right: 5%;
    top: 50px;
    display: flex;
    gap: 20px;
    align-items: flex-end;
}
.css-phone {
    width: 180px;
    height: 380px;
    border-radius: 25px;
    background: #111;
    border: 6px solid #222;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.css-phone-large {
    width: 220px;
    height: 440px;
    z-index: 5;
    margin-bottom: -40px;
}
.phone-notch {
    width: 50%;
    height: 20px;
    background: #222;
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
    margin: 0 auto;
}
.phone-ui-header {
    background: var(--primary);
    height: 50px;
    width: 100%;
}
.phone-ui-body {
    background: #fff;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 20px;
}
.phone-ui-btn {
    width: 100px;
    height: 100px;
    border-radius: 50px;
    background: var(--secondary);
    color: white;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 20px rgba(230, 43, 59, 0.4);
    font-size: 0.8rem;
    text-align: center;
}

/* Secciones genéricas */
.cs-section {
    padding: 40px 60px;
    border-bottom: 1px solid var(--border);
}
.cs-section:last-of-type {
    border-bottom: none;
}
.cs-section-title {
    color: var(--primary);
    font-size: 1.8rem;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.cs-section-title span.icon {
    font-size: 2rem;
}

/* Mi Rol */
.text-block p {
    margin-bottom: 20px;
    font-size: 1.05rem;
    color: var(--text-muted);
}

/* Comprender los problemas */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 30px;
}
.step-item {
    border-top: 3px solid var(--primary);
    padding-top: 15px;
}
.step-item h4 {
    color: var(--primary);
    margin: 5px 0 10px;
    font-size: 1.1rem;
}
.step-item p {
    font-size: 0.95rem;
    color: var(--text-muted);
}

/* Gantt Chart Nativo */
.gantt-chart {
    background: var(--bg-gray);
    padding: 40px;
    border-radius: 12px;
    margin-top: 30px;
    position: relative;
}
.gantt-timeline {
    display: flex;
    justify-content: space-between;
    border-bottom: 2px solid #ccc;
    padding-bottom: 10px;
    margin-bottom: 20px;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.9rem;
}
.gantt-rows {
    position: relative;
}
.gantt-bar {
    height: 40px;
    border-radius: 8px;
    color: var(--white);
    display: flex;
    align-items: center;
    padding: 0 15px;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 15px;
    position: relative;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}
.gantt-bar.blue { background: var(--primary); }
.gantt-bar.red { background: var(--secondary); }
.gantt-label {
    position: absolute;
    top: -25px;
    left: 0;
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* Arquetipos / Persona */
.persona-flex {
    display: flex;
    gap: 40px;
    margin-top: 30px;
    background: #f8faff;
    padding: 40px;
    border-radius: 15px;
    border-left: 5px solid var(--light-blue);
}
.persona-img {
    width: 150px;
    height: 150px;
    border-radius: 75px;
    background: var(--primary);
    flex-shrink: 0;
}
.persona-content h3 {
    margin: 0 0 10px;
    color: var(--primary);
}

/* Tablas nativas */
.custom-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 30px;
    background: var(--white);
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    border-radius: 10px;
    overflow: hidden;
}
.custom-table th {
    background: var(--primary);
    color: white;
    padding: 15px 20px;
    text-align: left;
}
.custom-table td {
    padding: 15px 20px;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
}
.custom-table tr:last-child td { border-bottom: none; }
.custom-table td.brand-col {
    background: #eef2f7;
    font-weight: 600;
    color: var(--primary);
    width: 150px;
}

/* Contenedores de placeholder pro para gráficos */
.graphic-box {
    width: 100%;
    min-height: 400px;
    background: #fafbfc;
    border: 2px dashed #d1d5db;
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    margin-top: 30px;
}
.graphic-box svg {
    margin-bottom: 20px;
    color: #9ca3af;
}

/* Etiquetas y badgets */
.badge {
    background: #e0f2fe;
    color: #0284c7;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: bold;
    display: inline-block;
}
.badge-red {
    background: #fee2e2;
    color: #b91c1c;
}


/* =========================================
   FLOATING BUTTONS (WhatsApp & Go to Top)
   ========================================= */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: #25d366;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(37, 211, 102, 0.4);
    z-index: 1000;
    transition: transform 0.3s;
}

.whatsapp-float:hover {
    transform: scale(1.1);
}

.go-top-btn {
    position: fixed;
    bottom: 100px;
    right: 30px;
    background-color: #6240C8; /* Morado de la muestra (estilo principal) */
    color: white;
    width: 60px;
    height: 60px;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.go-top-btn.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.go-top-btn:hover {
    background-color: #5031b0; /* Hover morado */
    transform: translateY(-5px);
}

.go-top-btn svg {
    width: 28px;
    height: 28px;
}

/* ==========================================================================
   MEDIA QUERIES (RESPONSIVE) - SOLUCIÓN PARA CABECERAS Y MÓVILES
   ========================================================================== */

@media (max-width: 992px) {
    /* Header (Hero) */
    .cs-header {
        flex-direction: column !important;
        padding: 60px 20px 40px !important;
        text-align: center !important;
        clip-path: none !important; /* Eliminar curva extrema en móviles para evitar recortes raros */
        border-bottom-left-radius: 30px !important;
        border-bottom-right-radius: 30px !important;
    }

    .cs-header-content {
        max-width: 100% !important;
        margin-bottom: 20px !important;
        padding: 0 10px !important;
    }

    .cs-header h1 {
        font-size: 2.5rem !important;
    }

    .cs-header h2 {
        font-size: 1.2rem !important;
    }

    .tool-icons {
        justify-content: center;
    }

    /* Contenedor de Teléfonos CSS */
    .css-phones-container {
        position: relative;
        top: 0;
        right: 0;
        justify-content: center;
        margin: 0 auto;
        transform: scale(0.8);
        transform-origin: top center;
    }
}

@media (max-width: 768px) {
    /* Layout general y wrapper */
    .cs-wrapper {
        margin: 55px 15px 15px; /* Más espacio en los bordes */
        border-radius: 15px;
    }

    /* Secciones */
    .cs-section {
        padding: 40px 20px !important;
    }

    .cs-section-title {
        font-size: 1.8rem !important;
    }

    .section-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    /* Fix para elementos inline con min-width y width estricto */
    div[style*="min-width: 300px"] {
        min-width: 100% !important;
    }
    div[style*="width: 250px"] {
        width: 200px !important;
        height: 200px !important;
    }

    /* Arquetipos / Personas */
    .persona-flex {
        flex-direction: column;
        text-align: center;
        padding: 30px 20px !important;
        gap: 20px;
    }
    .persona-img {
        margin: 0 auto;
        width: 120px;
        height: 120px;
    }

    /* Tablas de Benchmarking y Journey Map */
    .custom-table {
        font-size: 0.85rem !important;
        min-width: 500px; /* Para forzar scroll horizontal y evitar aplastamiento */
    }
    
    .custom-table th, .custom-table td {
        padding: 10px !important;
    }

    /* Gantt Chart Fixes */
    .gantt-chart {
        padding: 20px !important;
    }
    .gantt-timeline {
        font-size: 0.75rem !important;
    }
    .gantt-bar {
        font-size: 0.75rem !important;
        padding: 0 8px !important;
        height: 30px !important;
    }

    /* Teléfonos CSS muy pequeños */
    .css-phones-container {
        transform: scale(0.65);
        margin-bottom: -100px; /* Ajuste para compensar el escalado */
    }
}

@media (max-width: 480px) {
    /* Ajustes extremos para teléfonos pequeños (iPhone SE, etc) */
    .cs-header {
        padding: 40px 15px 30px !important;
    }

    .cs-header h1 {
        font-size: 2rem !important;
    }

    .cs-header h2 {
        font-size: 1rem !important;
        margin-bottom: 20px !important;
    }

    .cs-section {
        padding: 30px 15px !important;
    }

    .cs-section-title {
        font-size: 1.5rem !important;
        flex-direction: column;
        align-items: flex-start;
    }

    /* Alinear íconos en columnas si son muchos */
    .tool-icons {
        flex-wrap: wrap !important;
    }
    
    /* Fix para flechas en el user flow */
    div[style*="font-size: 1.5rem;"] {
        transform: rotate(90deg) !important;
        margin: 10px 0 !important;
    }
}

/* Fix específico para los mockups absolutos en los headers de proyectos 1 al 5 */
@media (max-width: 992px) {
    .hero-mockup-container {
        position: relative !important;
        right: auto !important;
        top: auto !important;
        transform: none !important;
        width: 100% !important;
        height: 300px !important;
        max-height: 350px !important;
        margin: 30px auto 0 !important;
        display: flex !important;
        justify-content: center !important;
    }
    .hero-mockup-container img {
        object-position: center !important;
        height: auto !important;
        max-height: 100% !important;
        width: auto !important;
        max-width: 100% !important;
    }
}

img {
    max-width: 100%;
    height: auto;
}

