/* =========================================
   Variables Globales y Paleta Chúuk Labs
   ========================================= */
:root {
    --chuuk-black: #191919;
    --chuuk-white-1: #FFFFFF;
    --chuuk-white-2: #E9E9E9;
    --chuuk-blue: #0829A6;
    --chuuk-blue-hover: #061d78;
    --text-muted: #555555;
    --border-color: #D1D1D1;
}

/* =========================================
   Reset y Tipografía Base
   ========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--chuuk-white-2);
    color: var(--chuuk-black);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
    color: var(--chuuk-black);
    margin-bottom: 1rem;
    font-weight: 700;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* =========================================
   Botones
   ========================================= */
.btn {
    display: inline-block;
    padding: 0.8rem 1.8rem;
    border-radius: 8px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.btn-primary {
    background-color: var(--chuuk-blue);
    color: var(--chuuk-white-1);
}

.btn-primary:hover {
    background-color: var(--chuuk-blue-hover);
}

.btn-outline {
    background-color: transparent;
    border-color: var(--chuuk-black);
    color: var(--chuuk-black);
}

.btn-outline:hover {
    border-color: var(--chuuk-blue);
    color: var(--chuuk-blue);
}

.btn-purple {
    background-color: #6d28d9;
    color: var(--chuuk-white-1);
}

.btn-purple:hover {
    background-color: #5b21b6;
}

/* =========================================
   Barra de Navegación
   ========================================= */
.navbar {
    background-color: #FFFFFF; /* Color blanco sólido solicitado */
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo .logo {
    height: 45px;
    object-fit: contain; /* Ajuste para que el nuevo logo conserve proporciones */
    border-radius: 4px;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: var(--chuuk-black);
    font-size: 0.95rem;
    font-weight: 600;
}

.nav-links a:hover {
    color: var(--chuuk-blue);
}

/* =========================================
   Sección Hero
   ========================================= */
.hero-section {
    padding: 140px 0 80px;
    background-color: var(--chuuk-white-2); 
}

.hero-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    background-color: var(--chuuk-white-1); 
    border-radius: 24px;
    overflow: hidden; 
    box-shadow: 0 15px 40px rgba(0,0,0,0.06); 
    border: 1px solid var(--border-color);
}

.hero-content {
    padding: 4rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hero-content h1 {
    font-size: 2.8rem;
    line-height: 1.15;
    margin-bottom: 1.5rem;
    letter-spacing: -1px;
}

.hero-content p {
    font-size: 1.05rem;
    margin-bottom: 1.5rem;
    color: var(--text-muted);
}

.hero-list {
    margin-bottom: 2.5rem;
    padding-left: 1.2rem;
    color: var(--text-muted);
}

.hero-list li {
    margin-bottom: 0.5rem;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.hero-image {
    display: flex;
    align-items: stretch;
}

.hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; 
    border-radius: 0; 
    box-shadow: none; 
}

/* =========================================
   Secciones Generales
   ========================================= */
.section-header {
    text-align: center;
    margin-bottom: 4rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.section-header h2 {
    font-size: 2.5rem;
}

.section-header p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* =========================================
   Casos de Uso NDMI (Alternados)
   ========================================= */
.ndmi-section {
    padding: 80px 0;
    background-color: var(--chuuk-white-1);
}

.features-wrapper {
    display: flex;
    flex-direction: column;
    gap: 5rem;
}

.feature-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.feature-row.reverse {
    direction: rtl;
}

.feature-row.reverse > * {
    direction: ltr;
}

.feature-text h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.feature-text p {
    color: var(--text-muted);
    margin-bottom: 1rem;
    font-size: 1.05rem;
}

.feature-image img {
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

/* =========================================
   Cuadrícula de Índices
   ========================================= */
.indices-grid-section {
    padding: 80px 0;
    background-color: var(--chuuk-white-2);
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.grid-item {
    background-color: var(--chuuk-white-1);
    border-radius: 8px;
    padding: 1rem;
    border: 1px solid var(--border-color);
    text-align: center;
    transition: transform 0.3s ease;
}

.grid-item img {
    margin-bottom: 1rem;
    width: 100%;
}

.grid-item p {
    font-weight: 700;
    color: var(--chuuk-black);
}

.grid-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(8, 41, 166, 0.1);
}

/* =========================================
   Sección de Precios
   ========================================= */
.pricing-section {
    padding: 80px 0;
    background-color: var(--chuuk-white-1);
}

.pricing-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    align-items: stretch;
}

.pricing-card {
    background-color: var(--chuuk-white-1);
    border-radius: 12px;
    padding: 2.5rem 2rem;
    border: 1px solid var(--border-color);
    position: relative;
    display: flex;
    flex-direction: column;
}

.pricing-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.pricing-card .subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
    min-height: 40px;
    margin-bottom: 1rem;
}

.pricing-card .price {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--chuuk-black);
    margin-bottom: 0.5rem;
    line-height: 1.1;
}

.pricing-card .price span {
    font-size: 1rem;
    font-weight: 400;
    color: var(--text-muted);
}

.pricing-card .limit {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.pricing-card .features {
    list-style: none;
    margin-bottom: 2.5rem;
    flex-grow: 1;
}

.pricing-card .features li {
    margin-bottom: 0.8rem;
    font-size: 0.9rem;
    padding-left: 1.5rem;
    position: relative;
    color: var(--chuuk-black);
}

.pricing-card .features li::before {
    content: "✓";
    color: var(--chuuk-blue);
    position: absolute;
    left: 0;
    font-weight: bold;
}

.pricing-card .btn {
    width: 100%;
    margin-top: auto;
}

/* Tarjeta Enterprise Destacada */
.pricing-card.enterprise {
    background-color: #f3f0ff;
    border-color: #6d28d9;
}

.pricing-card.enterprise.highlighted {
    transform: scale(1.03);
    box-shadow: 0 15px 30px rgba(109, 40, 217, 0.2);
    border-width: 2px;
    z-index: 1;
}

.pricing-card.enterprise .features li::before {
    color: #6d28d9;
}

.pricing-card.enterprise .badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #6d28d9;
    color: var(--chuuk-white-1);
    padding: 0.25rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: uppercase;
    white-space: nowrap;
}

/* =========================================
   Footer
   ========================================= */
.footer {
    background-color: var(--chuuk-white-2);
    padding: 3rem 0;
    border-top: 1px solid var(--border-color);
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
}

.footer-info p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* =========================================
   Media Queries (Responsive)
   ========================================= */
@media (max-width: 992px) {
    .hero-card, .feature-row {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }
    
    .hero-content {
        padding: 3rem 2rem;
    }
    
    .hero-list {
        text-align: left;
        display: inline-block;
    }
    
    .feature-row.reverse {
        direction: ltr;
    }
    
    .pricing-card.enterprise.highlighted {
        transform: none;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .hero-content h1 {
        font-size: 2.2rem;
    }
}

/* =========================================
   Slider Antes / Después (Demo)
   ========================================= */
.demo-section {
    padding: 80px 0;
    background-color: var(--chuuk-white-1); /* Fondo blanco para aislar el cuadro oscuro */
}

.slider-container {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
    background-color: var(--chuuk-black);
    border: 8px solid var(--chuuk-black);
}

.slider-image-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; 
    --pos: 50%; /* Estado inicial maestro */
}

.slider-image-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

/* La imagen "Antes" empieza recortada exactamente al 50% por la derecha */
.slider-img-before {
    clip-path: polygon(0 0, var(--pos) 0, var(--pos) 100%, 0 100%);
    z-index: 2;
}

/* El input de rango es invisible, se posiciona arriba de todo y abarca 100% de la caja */
.slider-input {
    position: absolute;
    appearance: none;
    -webkit-appearance: none;
    width: 100%;
    height: 100%;
    background: transparent;
    outline: none;
    margin: 0;
    top: 0;
    left: 0;
    z-index: 4;
    cursor: ew-resize;
}

/* Esconder el "pulgar" (thumb) nativo del input para usar el nuestro propio en CSS */
.slider-input::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 0px; 
    height: 100%;
    background: transparent;
    cursor: ew-resize;
}
.slider-input::-moz-range-thumb {
    width: 0px;
    height: 100%;
    background: transparent;
    cursor: ew-resize;
    border: none;
}

/* Botón central interactivo y línea azul divisoria */
.slider-button {
    position: absolute;
    top: 0;
    bottom: 0;
    left: calc(var(--pos) - 2px); 
    width: 4px;
    background-color: var(--chuuk-blue);
    z-index: 3;
    pointer-events: none; 
}

/* El círculo central blanco/azul */
.slider-button::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 36px;
    height: 36px;
    background-color: var(--chuuk-white-1);
    border: 3px solid var(--chuuk-blue);
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

/* Las flechas en el centro */
.slider-button svg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    color: var(--chuuk-blue);
    z-index: 4;
}