/* landing.css */

:root {
    --header-height-desktop: 60px;
    --header-height-mobile: 50px;
    --color-primary: #D53028;
    --color-text-light: #FFFFFF;
    --color-text-dark: #333;
    --color-background-dark: #000000;
    --color-background-light: #f9f9f9;
    --color-border-subtle: rgba(255, 255, 255, 0.1);
}

html {
    height: auto;
    min-height: 100%;
}

/* -------------------- ESTILOS GLOBALES / BODY -------------------- */
body {
    margin: 0;
    font-family: 'Poppins', sans-serif;
    overflow-x: hidden;
    position: relative;
    color: var(--color-text-light);
    min-height: 100vh;
    box-sizing: border-box;

    /* Mantener el padding-bottom que te funcionó para el scroll */
    padding-bottom: 150px; /* Ajusta este valor si es necesario */

    background-color: var(--color-background-dark);
    background-image:
        radial-gradient(circle at 10% 10%, #722F37 0%, rgba(114, 47, 55, 0) 65%),
        radial-gradient(circle at 90% 90%, #302020 0%, rgba(48, 32, 32, 0) 65%);
    background-position:
        5% 5%,
        95% 95%;
    background-size: cover;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="2" height="2" viewBox="0 0 2 2"><circle fill="%23ffffff" cx="0.5" cy="0.5" r="0.5"/><circle fill="%23000000" cx="1.5" cy="1.5" r="0.5"/></svg>');
    background-size: 2px 2px;
    opacity: 0.025;
}

body::after {
    display: none;
}

/* -------------------- SECCIÓN PRINCIPAL (HERO) -------------------- */
.content-wrapper {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 90px 1rem 0 1rem;
    box-sizing: border-box;
    min-height: 100vh;
    text-align: center;
}

#main-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 3.2rem;
    margin-bottom: 0.5rem;
    font-weight: 900;
    letter-spacing: -1px;
    color: var(--color-text-light);
    position: relative;
    cursor: default;
    line-height: 1.1;
    margin-left: auto;
    margin-right: auto;
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 0 10px;
    scroll-margin-top: var(--header-height-desktop);
}

.line {
    display: inline-block;
    white-space: nowrap;
}

#dynamic-word1, #dynamic-word2 {
    display: inline-block;
    font-weight: 900;
    color: var(--color-primary);
    transition: opacity 0.3s ease-in-out;
    white-space: nowrap;
}

.word-reserve {
    visibility: hidden;
    pointer-events: none;
    display: inline-block;
    position: absolute;
    left: -9999px;
    top: -9999px;
    font-size: 3.2rem;
    font-weight: 900;
    letter-spacing: -1px;
    line-height: 1.1;
    white-space: nowrap;
}

/* Ajustado: Este p ahora apunta al p del content-wrapper */
.content-wrapper p { 
    font-size: 1.25rem;
    margin-bottom: 2rem;
    color: var(--color-text-light);
    text-shadow: none;
    font-weight: 400;
    margin-left: auto;
    margin-right: auto;
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 0 10px;
}

.buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    width: 100%;
    box-sizing: border-box;
    padding: 0 10px;
}

.btn {
    padding: 1rem 2rem;
    font-size: 1rem;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    background-color: transparent;
    color: #F5F5DC;
    border: 1px solid #F5F5DC;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn:hover {
    background-color: #F5F5DC;
    color: #722F37;
}

/* -------------------- SECCIÓN "¿CÓMO FUNCIONA?" (CON PESTAÑAS) -------------------- */
.how-it-works-section {
    padding: 60px 40px; /* Aumentamos el padding lateral de la sección */
    background-color: rgba(0, 0, 0, 0); /* Totalmente transparente */
    text-align: center;
    position: relative;
    z-index: 1;
    width: 100%;
    margin: 4rem auto 4rem auto;
    box-sizing: border-box;
    border-radius: 15px; 
}

/* Ajustado: Selector para el h2 dentro de section-header */
.how-it-works-section .section-header h2 { 
    font-family: 'Montserrat', sans-serif;
    font-weight: 900;
    font-size: 2.8em;
    color: var(--color-text-light);
    margin-bottom: 10px;
    text-align: center;
}

/* Ajustado: Selector para el p dentro de section-header */
.how-it-works-section .section-header p { 
    font-family: 'Poppins', sans-serif;
    font-size: 1.1em;
    color: #CCCCCC;
    max-width: 700px;
    margin: 0.5rem auto -1.4rem;
    text-align: center;
}

/* Estilos de las pestañas de navegación */
.tabs-navigation {
    display: flex;
    justify-content: center;
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    flex-wrap: wrap;
    gap: 15px;
}

.tab-button {
    background-color: transparent;
    border: none;
    padding: 15px 25px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 1.1em;
    color: #888;
    cursor: pointer;
    transition: color 0.3s ease, border-bottom 0.3s ease;
    position: relative;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tab-button:hover {
    color: var(--color-primary);
}

.tab-button.active {
    color: var(--color-primary);
    border-bottom: 3px solid var(--color-primary);
}

/* Contenedor de las columnas de contenido (este sigue siendo para las tabs principales) */
.how-it-works-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 40px;
    width: 100%;
    margin: 0 auto;
    padding: 0 10px;
    box-sizing: border-box;
}

/* Estilos de cada columna de rol (Influencer, Empresa, Agencia) */
.role-column {
    background-color: transparent; 
    border: none;
    box-shadow: none; 
    padding: 2.5rem; 
    text-align: left;
    width: 100%;
    max-width: 1200px; /* Mantener este max-width para centrar el contenido de la pestaña */    
    opacity: 0;
    transform: translateY(20px);
    display: none;
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.role-column.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.role-column h3 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 900;
    font-size: 2rem;
    color: var(--color-primary);
    margin-bottom: 2rem;
    text-align: center;
}

/* --- NUEVOS ESTILOS PARA LA DISTRIBUCIÓN DE PASOS --- */
.steps-grid {
    display: flex; /* CAMBIO CLAVE: Usamos flexbox para ponerlos uno al lado del otro */
    flex-wrap: nowrap; /* Evitamos que se envuelvan a la siguiente línea por defecto */
    justify-content: center;
    align-items: stretch; /* Asegura que todas las tarjetas tengan la misma altura */
    gap: 30px; /* Espacio entre las tarjetas */
    padding-top: 0px;
    max-width: 1100px; /* Centra el flex-container dentro de .role-column */
    margin-left: auto;
    margin-right: auto;
    overflow-x: auto; /* Permite scroll horizontal si no caben todas */
    padding-bottom: 10px; /* Pequeño padding si hay scroll horizontal */
    -webkit-overflow-scrolling: touch; /* Suaviza el scroll en iOS */
    scrollbar-width: thin; /* Para navegadores basados en Firefox */
    scrollbar-color: var(--color-primary) transparent; /* Para navegadores basados en Firefox */
}

/* Estilos para el scrollbar en Webkit (Chrome, Safari) */
.steps-grid::-webkit-scrollbar {
    height: 8px; /* Altura del scrollbar horizontal */
}

.steps-grid::-webkit-scrollbar-thumb {
    background-color: var(--color-primary);
    border-radius: 10px;
    border: 2px solid transparent;
    background-clip: padding-box;
}

.steps-grid::-webkit-scrollbar-track {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

/* Estilos de cada tarjeta de paso */
.step-card {
    background-color: rgba(15, 15, 15, 0.7); /* Fondo muy oscuro, casi negro, con transparencia */
    backdrop-filter: blur(5px); /* Efecto de desenfoque para dar profundidad (opcional) */
    border-radius: 10px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.4); /* Sombra más pronunciada para que "flote" */
    border: 1px solid rgba(255, 255, 255, 0.08); /* Borde sutil blanco para definirla */
    flex: 0 0 auto;
    width: 280px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    position: relative;
    transition: transform 0.3s ease, border-color 0.3s ease; /* Transiciones para el efecto hover */
}

/* Efecto al pasar el cursor (opcional) */
.step-card:hover {
    transform: translateY(-5px);
    border-color: var(--color-primary); /* El borde se ilumina con el color principal */
}

/* Estilos para el contenedor de la imagen */
.step-card .step-image-wrapper {
    width: 100%;
    margin-bottom: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    border-radius: 0;
    background-color: rgba(255, 255, 255, 0.05); /* Fondo muy sutil para que el número resalte */
}

.step-card .step-image-wrapper img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
}

.step-card .step-number {
    background-color: var(--color-primary);
    color: var(--color-text-light);
    border-radius: 50%;
    width: 45px;
    height: 45px;
    min-width: 45px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: 'Montserrat', sans-serif;
    font-weight: 900;
    font-size: 1.3rem;
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    margin-bottom: 0;
    border: 2px solid rgba(255, 255, 255, 0.2); /* Borde para el número */
}


.step-card h4 {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 1.3rem;
    color: var(--color-text-light); /* Color de texto blanco para el título */
    margin-top: 0;
    margin-bottom: 0.5rem;
}

.step-card p {
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    color: #b3b3b3; /* Un gris claro para el párrafo que contrasta bien */
    line-height: 1.6;
    margin-bottom: 0;
    margin-top: 0;
    flex-grow: 1;
}


/* Ocultar el separador de columna, ya que las columnas se muestran de a una */
.column-separator {
    display: none;
}

/* Media Query para pantallas medianas (tabletas grandes y escritorios pequeños) */
@media (max-width: 992px) {
    .content-wrapper {
        padding: 90px 0 0 0;
    }

    #main-title {
        font-size: 2.8rem;
    }
    .content-wrapper p { 
        font-size: 1.1rem;
    }
    .buttons {
        gap: 1rem;
    }
    .btn {
        padding: 0.9rem 1.8rem;
    }

    .how-it-works-section {
        padding: 50px 15px;
        margin: 3rem auto 3rem auto;
    }
    .how-it-works-section .section-header h2 { 
        font-size: 2.4rem;
    }
    .how-it-works-section .section-header p { 
        font-size: 1.05rem;
    }
    .tabs-navigation {
        gap: 10px;
        margin-bottom: 30px;
    }
    .tab-button {
        padding: 12px 20px;
        font-size: 1em;
    }

    .role-column {
        max-width: 95%;
        padding: 2rem;
    }
    .role-column h3 {
        font-size: 2rem;
    }

    .steps-grid {
        gap: 20px; /* Reducir el gap para tabletas */
        max-width: 95%; /* Ajustar max-width del grid */
    }
    .step-card {
        width: 250px; /* Ajustar ancho de tarjeta en tabletas */
        padding: 1.2rem;
    }
    .step-card .step-image-wrapper {
        width: 80px; /* Tamaño de imagen en tabletas */
        height: 80px;
    }
    .step-card h4 {
        font-size: 1.15rem;
    }
    .step-card p {
        font-size: 0.9rem;
    }
    .step-card .step-number {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }
}

/* Media Query para pantallas pequeñas (móviles) */
@media (max-width: 768px) {
    body {
        background-position:
            20% 20%,
            80% 80%;
        background-size: cover;
    }
    body::before {
        opacity: 0.035;
    }

    .content-wrapper {
        padding: var(--header-height-mobile) 0 0 0;
        min-height: 100vh;
    }
    
    #main-title {
        font-size: 2.5rem;
        line-height: 1.2;
        padding: 0 5px;
        max-width: 100%;
    }
    .line {
        white-space: normal;
        display: block;
    }
    #dynamic-word1, #dynamic-word2 {
        white-space: normal;
    }
    .word-reserve {
        display: none;
    }
    .content-wrapper p { 
        font-size: 1rem;
        font-weight: 400;
    }
    .buttons {
        flex-direction: column;
        gap: 1rem;
    }
    .btn {
        width: 100%;
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
    }

    /* Ajustes específicos para la sección "Cómo funciona" en móviles */
    .how-it-works-section {
        padding: 40px 15px;
        margin: 2rem auto;
    }
    .how-it-works-section .section-header h2 { 
        font-size: 2rem;
    }
    .how-it-works-section .section-header p { 
        font-size: 1rem;
    }
    .tabs-navigation {
        flex-direction: column;
        gap: 10px;
        margin-bottom: 30px;
    }
    .tab-button {
        width: 100%;
        padding: 12px 15px;
        font-size: 1em;
    }
    .role-column {
        padding: 1.5rem;
        max-width: 100%;
    }
    .role-column h3 {
        font-size: 1.8rem;
    }

    .steps-grid {
        flex-wrap: wrap; /* Permite que las tarjetas se envuelvan a la siguiente línea */
        gap: 30px;
    }

    .step-card {
        width: 100%; /* Las tarjetas ocupan todo el ancho disponible en móvil */
        max-width: 300px; /* Limita el ancho máximo para que no sean demasiado anchas en pantallas pequeñas */
        margin: 0 auto; /* Centrar la tarjeta */
        padding: 1.2rem;
    }
    .step-card h4 {
        font-size: 1.1rem;
    }
    .step-card p {
        font-size: 0.9rem;
    }
    .step-card .step-image-wrapper {
        width: 70px; /* Tamaño de imagen en móvil */
        height: 70px;
    }
}

/* Media Query para pantallas muy pequeñas (celulares muy chicos) */
@media (max-width: 480px) {
    .landing-logo .logo-img {
        max-width: 45px;
    }
    .header-btn {
        font-size: 0.75rem;
        padding: 5px 10px;
        margin: 5px;
    }
    .how-it-works-section {
        padding: 30px 10px;
    }
    .how-it-works-section .section-header h2 { 
        font-size: 1.8rem;
    }
    .how-it-works-section .section-header p { 
        font-size: 0.9rem;
    }
    .role-column {
        padding: 1rem;
    }
    .step-card h4 {
        font-size: 1rem;
    }
    .step-card p {
        font-size: 0.85rem;
    }
    .step-card .step-image-wrapper {
        width: 60px; /* Tamaño de imagen en móviles muy pequeños */
        height: 60px;
    }
}