/**
 * RetoFitWeb CSS - Premium Solid Dark UI (Alta Conversión)
 * Tarjetas sólidas, textos puros en blanco y alta jerarquía visual.
 * Diseñado con mejores prácticas para facilitar la lectura y psicología del color.
 */

:root {
    --rf-dark: #111827;
    /* Dark elegant container (Zinc 900) */
    --rf-darker: #030712;
    --rf-primary: #FF6B00;
    --rf-primary-hover: #ff8533;
    --rf-text: #FFFFFF;
    /* Blanco puro de alta visibilidad */
    --rf-text-muted: #F3F4F6;
    /* Gris súper luminoso casi blanco */
    --rf-female: #d112b3;
    --rf-male: #00b4d8;

    font-family: 'Nunito', 'Roboto', sans-serif;
}

/* RESET APP CONTAINER */
#retofit-app-container {
    background-color: var(--rf-darker);
    /* El background-image ya está inyectado por PHP inline (frutas frescas) */
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: var(--rf-text);
    min-height: 100vh;
    font-family: 'Nunito', sans-serif;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 999999 !important;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

#retofit-app-container * {
    box-sizing: border-box;
}

/* ================= HEADER ================= */
.rf-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    z-index: 10;
}

.rf-logo {
    /* UI Moderna: Badge o Pill Design para Alto Contraste */
    background: rgba(17, 24, 39, 0.85);
    /* Fondo oscuro del contenedor sólido */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 107, 0, 0.3);
    /* Borde sutil naranja */
    padding: 10px 24px;
    border-radius: 50px;
    /* Forma de píldora */

    /* Efecto de Texto Naranja Sólido */
    color: var(--rf-primary);

    font-size: 1.8rem;
    font-weight: 900;
    letter-spacing: 1px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    /* Sombra para despegar del fondo frutal */
    display: inline-block;
}

.rf-btn-link {
    background: #111827;
    border: 2px solid var(--rf-text);
    color: var(--rf-text);
    padding: 10px 28px;
    border-radius: 40px;
    font-size: 0.95rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.3s ease;
}

.rf-btn-link:hover {
    background: var(--rf-text);
    color: var(--rf-darker);
}

/* ================= FUNNEL LOGIC ================= */
.rf-funnel-wrapper {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
}

/* TARJETA PRINCIPAL SÓLIDA DE ALTA CONVERSIÓN */
.rf-step {
    width: 100%;
    max-width: 850px;
    display: none;
    text-align: center;

    /* ADIÓS TRANSPARENCIAS -> Hola Sólido Premium */
    background: var(--rf-dark);
    border-radius: 24px;
    padding: 60px 50px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.rf-step.rf-active {
    display: block;
    animation: fadeInStep 0.5s ease forwards;
}

@keyframes fadeInStep {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.rf-main-title {
    color: var(--rf-text);
    font-size: 2.2rem;
    font-weight: 900;
    margin-bottom: 50px;
    letter-spacing: 0px;
}

/* ================= P1: BOTONES GÉNERO CIRCULARES ================= */
.rf-gender-selector {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
    flex-wrap: wrap;
}

.rf-gender-btn {
    width: 220px;
    height: 220px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 1.4rem;
    font-weight: 800;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease;
}

.rf-gender-btn:hover {
    transform: scale(1.08);
}

.rf-btn-female {
    background: linear-gradient(135deg, #e81ec8 0%, #7d156c 100%);
    box-shadow: 0 15px 30px rgba(209, 18, 179, 0.4);
}

.rf-btn-male {
    background: linear-gradient(135deg, #0ed3f9 0%, #065b79 100%);
    box-shadow: 0 15px 30px rgba(0, 180, 216, 0.4);
}

.rf-gender-btn .material-icons {
    font-size: 5rem;
    margin-bottom: 15px;
}

.rf-separator-icon {
    font-size: 2rem;
    color: var(--rf-text-muted);
}

/* ================= P2: ACTIVIDAD FÍSICA ================= */
.rf-section-title {
    font-size: 2.2rem;
    margin-bottom: 40px;
    color: var(--rf-text);
    font-weight: 900;
}

.rf-activity-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.rf-activity-card {
    background: #1F2937;
    /* Gris oscuro sólido de alto contraste */
    border: 2px solid transparent;
    padding: 30px 20px;
    border-radius: 16px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.rf-activity-card:hover {
    background: #374151;
    border-color: var(--rf-primary);
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.rf-activity-level {
    font-size: 1.5rem;
    font-weight: 900;
    margin-bottom: 10px;
    color: var(--rf-primary);
}

.rf-activity-desc {
    font-size: 1.1rem;
    color: var(--rf-text-muted);
    font-weight: 700;
    /* Legibilidad máxima */
}

.rf-btn-back {
    background: none;
    border: none;
    color: #9CA3AF;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 1.1rem;
    font-weight: 800;
    margin-top: 20px;
    transition: color 0.2s;
}

.rf-btn-back:hover {
    color: white;
}

/* ================= P3: FORMULARIO SÓLIDO ================= */
.rf-title-orange {
    color: var(--rf-primary);
}

.rf-glass-form {
    /* Mantenemos la clase por compatibilidad HTML, pero le quitamos TODO lo transparente */
    background: transparent;
    border: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    padding: 20px 0 0 0;
    box-shadow: none;
    max-width: 550px;
    margin: 0 auto;
}

.rf-form-group {
    display: flex;
    align-items: center;
    background: #1F2937;
    /* Input con fondo sólido oscuro */
    border: 2px solid #374151;
    border-radius: 12px;
    margin-bottom: 25px;
    padding: 18px 25px;
    transition: border-color 0.3s ease;
}

.rf-form-group:focus-within {
    border-color: var(--rf-primary);
    background: #111827;
}

.rf-form-group .material-icons {
    color: var(--rf-primary);
    margin-right: 15px;
    font-size: 1.8rem;
}

.rf-form-group input {
    width: 100%;
    background: transparent;
    border: none;
    color: var(--rf-text);
    font-size: 1.3rem;
    /* Letra de input más grande */
    font-weight: 800;
    /* Súper visible */
    outline: none;
    font-family: inherit;
}

.rf-form-group input::placeholder {
    color: #9CA3AF;
    font-weight: 600;
    /* Placeholder bien definido */
}

.rf-form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 50px;
}

.rf-btn-submit {
    background: var(--rf-primary);
    border: none;
    color: white;
    padding: 18px 45px;
    border-radius: 40px;
    font-size: 1.3rem;
    font-weight: 900;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 10px 20px rgba(255, 107, 0, 0.4);
}

.rf-btn-submit:hover {
    background: var(--rf-primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(255, 107, 0, 0.5);
}

/* ================= CARGA / SPINNER ================= */
.rf-loader-container {
    padding: 80px 0;
}

.rf-spinner {
    width: 70px;
    height: 70px;
    border: 6px solid rgba(255, 107, 0, 0.2);
    border-top: 6px solid var(--rf-primary);
    border-radius: 50%;
    margin: 0 auto 30px;
    animation: rfSpin 1s linear infinite;
}

@keyframes rfSpin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.rf-loading-text {
    margin-bottom: 15px;
    color: var(--rf-text);
    font-size: 1.8rem;
    font-weight: 900;
}

.rf-loader-container p {
    font-size: 1.2rem;
    color: var(--rf-text-muted);
    font-weight: 700;
}

/* ================= RESULTADOS ALTA LEgIBILIDAD ================= */
.rf-results-dashboard {
    max-width: 750px;
    margin: 0 auto;
}

.rf-success-title {
    color: var(--rf-primary);
    font-size: 2.5rem;
    font-weight: 900;
    margin-bottom: 20px;
    text-transform: uppercase;
}

.rf-metrics-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 50px;
}

.rf-metric-card {
    background: #1F2937;
    /* Tarjetas de datos sólidas */
    border: 2px solid #374151;
    padding: 30px;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
}

.rf-metric-label {
    font-size: 1.1rem;
    font-weight: 900;
    color: var(--rf-text-muted);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.rf-metric-value {
    font-size: 3rem;
    font-weight: 900;
    color: var(--rf-text);
}

.rf-metric-status {
    color: #facc15;
    font-size: 1.1rem;
    font-weight: 800;
    margin-top: 10px;
}

/* OFERTA CON IMÁGENES - SÓLIDA */
.rf-offer-section {
    background: #1F2937;
    padding: 50px 40px;
    border-radius: 20px;
    text-align: left;
    margin-bottom: 50px;
    border: 2px solid #374151;
}

.rf-offer-title {
    margin-top: 0;
    margin-bottom: 40px;
    color: var(--rf-text);
    font-size: 2.2rem;
    font-weight: 900;
    text-align: center;
}

.rf-feature-item {
    display: flex;
    align-items: center;
    gap: 30px;
    margin-bottom: 40px;
}

.rf-feature-item.reverse {
    flex-direction: row-reverse;
}

.rf-feature-img {
    width: 45%;
    max-width: 300px;
    height: 220px;
    object-fit: cover;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

.rf-feature-icon-box {
    width: 45%;
    max-width: 300px;
    height: 220px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #111827;
    border-radius: 16px;
    border: 2px solid var(--rf-primary);
}

.rf-feature-icon-box .material-icons {
    font-size: 5rem;
    color: var(--rf-primary);
}

.rf-feature-text {
    flex: 1;
}

.rf-feature-text h4 {
    color: var(--rf-text);
    font-size: 1.8rem;
    font-weight: 900;
    margin-top: 0;
    margin-bottom: 15px;
}

.rf-feature-text p {
    color: var(--rf-text-muted);
    /* Gris muy visible */
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1.6;
    margin: 0;
}

/* SECCIONES DE COPY (TEXTOS) BLANCOS PUROS Y VIBRANTES */
.rf-copy-section {
    text-align: left;
    line-height: 1.7;
    margin-bottom: 50px;
    font-size: 1.3rem;
}

.rf-copy-section p {
    margin-bottom: 25px;
    color: var(--rf-text);
    /* ¡BLANCO PURO! */
    font-weight: 600;
    /* Letra ultra visible, adiós gris opaco */
}

.rf-copy-section strong {
    color: var(--rf-text);
    font-weight: 900;
    background: rgba(255, 107, 0, 0.2);
    /* Resalte tipo subrayado marca textos naranja */
    padding: 2px 8px;
    border-radius: 4px;
}

.rf-closing-panel {
    text-align: center;
    background: #1F2937;
    padding: 60px 40px;
    border-radius: 20px;
    border: 2px solid var(--rf-primary);
}

.rf-subtitle-results {
    color: var(--rf-text-muted);
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 40px;
}

.rf-btn-cta {
    display: block;
    width: 100%;
    margin: 40px auto 0;
    text-align: center;
    background: var(--rf-primary);
    color: white;
    padding: 25px 20px;
    font-size: 1.5rem;
    font-weight: 900;
    text-decoration: none;
    border-radius: 40px;
    transition: background 0.3s ease, transform 0.2s ease;
    box-shadow: 0 15px 30px rgba(255, 107, 0, 0.4);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.rf-btn-cta:hover {
    background: var(--rf-primary-hover);
    color: white;
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(255, 107, 0, 0.5);
}

/* RESPONSIVE PANTALLAS PEQUEÑAS */
@media (max-width: 768px) {
    .rf-step {
        padding: 40px 20px;
        border-radius: 20px;
    }

    .rf-main-title {
        font-size: 1.8rem;
    }

    .rf-gender-btn {
        width: 160px;
        height: 160px;
    }

    .rf-separator-icon {
        display: none;
    }

    .rf-metrics-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .rf-metric-value {
        font-size: 2.5rem;
    }

    .rf-form-actions {
        flex-direction: column-reverse;
        gap: 20px;
    }

    .rf-btn-submit {
        width: 100%;
    }

    .rf-feature-item,
    .rf-feature-item.reverse {
        flex-direction: column;
        text-align: center;
    }

    .rf-feature-img,
    .rf-feature-icon-box {
        width: 100%;
        max-width: 100%;
        height: auto;
        aspect-ratio: 16/9;
    }
}