.deco3, .deco4, .deco5, .deco6{
    display: none;
}

.page-fondo-dye [hidden]{
    display: none !important;
}

/* Círculos D / E */
.fondo-dye-circulo{
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    border: 2px solid var(--nuevo-rojo);
    border-radius: 50%;
    background-color: var(--nuevo-blanco);
    color: var(--nuevo-rojo);
    font-size: 16px;
    font-weight: 700;
    line-height: 1;
}
.fondo-dye-circulo-lg{
    width: 48px;
    height: 48px;
    font-size: 24px;
}

/* Sección 2: simulador */
.fondo-dye-simulador{
    max-width: 600px;
    margin: 0 auto;
}
.fondo-dye-simulador-filtros{
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--nuevo-espacio-sm);
    margin-bottom: var(--nuevo-espacio-md);
}
.fondo-dye-simulador-tipos{
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--nuevo-espacio-xs);
}
.fondo-dye-chip{
    -webkit-appearance: none;
    appearance: none;
    padding: 8px 20px;
    border: 1px solid var(--nuevo-borde);
    border-radius: var(--nuevo-radio-pill);
    background-color: var(--nuevo-blanco);
    color: var(--nuevo-negro);
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.2;
    cursor: pointer;
    transition: border-color 0.2s ease;
    &:hover{
        border-color: var(--nuevo-azul);
    }
    &.is-active{
        border-color: var(--nuevo-azul);
        cursor: default;
    }
    &:focus-visible{
        outline: 2px solid var(--nuevo-azul);
        outline-offset: 2px;
    }
}
.fondo-dye-simulador-card{
    padding: var(--nuevo-espacio-md) var(--nuevo-espacio-sm);
    border: 1px solid var(--nuevo-borde);
    border-radius: var(--nuevo-radio-md);
    background-color: var(--nuevo-blanco);
}
.fondo-dye-simulador-periodo{
    margin: 0 0 var(--nuevo-espacio-md);
    font-size: 14px;
    color: var(--nuevo-gris-texto);
    text-align: center;
}
.fondo-dye-simulador-fila{
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) 64px;
    align-items: center;
    gap: 12px;
    margin-bottom: var(--nuevo-espacio-sm);
}
.fondo-dye-simulador-label{
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    text-align: right;
    span{
        font-size: 11px;
        color: var(--nuevo-negro);
    }
    small{
        font-size: 9px;
        color: var(--nuevo-gris-texto);
    }
}
.fondo-dye-simulador-barra{
    display: flex;
    height: 24px;
    span{
        border-radius: var(--nuevo-radio-pill);
        display: block;
        height: 100%;
        background-color: var(--nuevo-azul);
        transition: width 0.4s ease;
    }
    &.is-negativa{
        justify-content: flex-end;
        span{
            background-color: #D1D1D6;
        }
    }
}
.fondo-dye-simulador-valor{
    font-size: 16px;
    font-weight: 700;
    text-align: right;
    &.is-negativa{
        color: var(--nuevo-negro);
    }
    &.is-positiva{
        color: #1E8E3E;
    }
}
.fondo-dye-simulador-mensaje{
    margin: var(--nuevo-espacio-md) 0 var(--nuevo-espacio-sm);
    padding: 12px;
    border-radius: var(--nuevo-radio-pill);
    background-color: var(--nuevo-rojo);
    color: var(--nuevo-blanco);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.3;
    text-align: center;
}

/* Sección 3: ¿En qué invierten? */
.fondo-dye-inversion{
    max-width: 680px;
}
.fondo-dye-inversion-texto{
    margin-bottom: var(--nuevo-espacio-md);
    strong, b{
        color: var(--nuevo-gris-texto);
    }
}
.fondo-dye-porcentajes-select{
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: relative;
    background-color: var(--nuevo-rojo);
    border-radius: var(--nuevo-radio-pill);
    padding: 10px;
    margin: 0 0 30px;
    outline: none;
    .fondo-dye-porcentajes-select-title{
        display: block;
        font-size: 14px;
        font-weight: 500;
        margin: 0;
        width: 100%;
        padding-right: 15px;
        text-align: center;
        color: var(--nuevo-blanco);
        cursor: pointer;
    }
    svg{
        position: absolute;
        right: 14px;
        top: 50%;
        transform: translateY(-50%);
        transition: transform 0.3s ease;
        color: var(--nuevo-blanco);
    }
    .fondo-dye-porcentajes-select-list{
        position: absolute;
        top: 100%;
        left: 0;
        background-color: var(--nuevo-blanco);
        border-radius: 10px;
        margin: 4px 0 0;
        padding: 0;
        list-style: none;
        z-index: 10;
        width: 100%;
        max-height: 0;
        overflow: hidden;
        transition: all 0.3s ease;
        .fondo-dye-porcentajes-select-list-item{
            font-size: 14px;
            font-weight: 400;
            padding: 10px;
            color: var(--nuevo-negro);
            cursor: pointer;
            &:hover{
                background-color: var(--nuevo-gris);
            }
        }
        .fondo-dye-porcentajes-select-list-item.active{
            cursor: default;
            user-select: none;
            pointer-events: none;
            font-weight: 700;
            background-color: var(--nuevo-gris);
        }
        &::-webkit-scrollbar{
            width: 5px;
        }
        &::-webkit-scrollbar-thumb{
            background-color: var(--nuevo-gris);
            border-radius: 10px;
        }
        &::-webkit-scrollbar-track{
            background-color: var(--nuevo-blanco);
            border-radius: 10px;
        }
    }
    &:focus-visible{
        box-shadow: 0 0 0 3px rgba(226, 0, 26, 0.35);
    }
    &.active{
        svg{
            transform: translateY(-50%) rotate(180deg);
        }
        .fondo-dye-porcentajes-select-list{
            overflow-y: auto;
            max-height: 300px;
            box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.2);
        }
    }
}
.fondo-dye-porcentajes-container{
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: var(--nuevo-espacio-sm);
    .fondo-dye-porcentaje-item{
        display: flex;
        align-items: center;
        gap: 12px;
    }
    .fondo-dye-porcentaje-item-bar{
        position: relative;
        flex: 1;
        height: 34px;
        background-color: var(--nuevo-blanco);
        border-radius: var(--nuevo-radio-pill);
        overflow: hidden;
        .fondo-dye-porcentaje-item-bar-fill{
            position: relative;
            z-index: 1;
            display: flex;
            align-items: center;
            height: 100%;
            margin: 0;
            padding: 0 14px;
            border-radius: var(--nuevo-radio-pill);
            background-color: var(--nuevo-azul);
            color: var(--nuevo-blanco);
            font-size: 14px;
            font-weight: 400;
            white-space: nowrap;
            box-sizing: border-box;
            transition: width 0.4s ease;
        }
        .fondo-dye-porcentaje-item-otros{
            position: absolute;
            top: 50%;
            right: 16px;
            z-index: 0;
            transform: translateY(-50%);
            font-size: 12px;
            color: var(--nuevo-gris-texto);
        }
    }
}

/* Sección tablas */
.fondo-dye-tabla-bloque + .fondo-dye-tabla-bloque{
    margin-top: var(--nuevo-espacio-lg);
}
.fondo-dye-table-wrap{
    overflow-x: auto;
    margin: var(--nuevo-espacio-md) 0;
}
.fondo-dye-table{
    width: auto;
    max-width: 100%;
    margin: 0 auto;
    border-collapse: separate;
    border-spacing: 6px;
}
.fondo-dye-table th, .fondo-dye-table td{
    padding: 10px;
    border: 1px solid #0B2A5B1A;
    border-radius: 20px;
    background-color: #E9ECEF;
    color: var(--nuevo-azul);
    font-size: 13px;
    font-weight: 400;
    text-align: center;
}
.fondo-dye-table th{
    font-weight: 500;
}
.fondo-dye-table tr th:first-child, .fondo-dye-table tr td:first-child{
    text-align: left;
}
.fondo-dye-table th:not(:first-child), .fondo-dye-table td:not(:first-child){
    white-space: nowrap;
}
.fondo-dye-tabla-btn{
    min-width: 220px;
}

/* Sección tasas + balanza */
.fondo-dye-tasas{
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--nuevo-espacio-lg);
    align-items: start;
}
.fondo-dye-tasas-texto{
    margin-bottom: var(--nuevo-espacio-md);
    strong, b{
        color: var(--nuevo-negro);
    }
}
.fondo-dye-tasas-lista{
    margin: var(--nuevo-espacio-xs) 0 0;
    padding: 0;
    list-style: none;
    li{
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 12px 0;
        border-bottom: 1px solid var(--nuevo-borde);
        font-size: 16px;
        color: var(--nuevo-negro);
    }
}
.fondo-dye-tasas-flecha{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background-color: var(--nuevo-rosa);
    color: var(--nuevo-rojo);
    font-size: 14px;
}
.fondo-dye-tasas-destacado{
    margin: var(--nuevo-espacio-md) 0 0;
    padding: 16px 20px;
    border-left: 3px solid var(--nuevo-rojo);
    background-color: var(--nuevo-rosa);
    color: var(--nuevo-negro);
}
.fondo-dye-balanza{
    padding: var(--nuevo-espacio-md);
    border: 1px solid var(--nuevo-borde);
    border-radius: var(--nuevo-radio-md);
    background-color: var(--nuevo-blanco);
}
.fondo-dye-balanza-svg{
    display: block;
    width: 100%;
    max-width: 380px;
    height: auto;
    margin: var(--nuevo-espacio-sm) auto 0;
}
.fondo-dye-balanza-pesas{
    transform-box: fill-box;
    transform-origin: center bottom;
    animation: fondo-dye-pesas 1.4s ease-in-out infinite alternate;
}
@keyframes fondo-dye-pesas{
    from{
        transform: scaleY(1);
    }
    to{
        transform: scaleY(1.25);
    }
}
.fondo-dye-balanza-flecha{
    transition: transform 0.4s ease;
}
.fondo-dye-balanza.is-bajan .fondo-dye-balanza-flecha{
    transform: rotate(180deg);
}
.fondo-dye-balanza-flecha-anim{
    animation: fondo-dye-flecha 1.2s ease-in-out infinite;
}
@keyframes fondo-dye-flecha{
    0%, 100%{
        transform: translateY(-3px);
        opacity: 0.6;
    }
    50%{
        transform: translateY(4px);
        opacity: 1;
    }
}
.fondo-dye-balanza-labels{
    display: flex;
    justify-content: space-between;
    max-width: 380px;
    margin: 4px auto 0;
    p{
        display: flex;
        flex-direction: column;
        width: 40%;
        margin: 0;
        font-size: 12px;
        line-height: 1.3;
        color: var(--nuevo-gris-texto);
        text-align: center;
    }
    strong{
        color: var(--nuevo-azul);
    }
}
.fondo-dye-balanza-resultado{
    margin: var(--nuevo-espacio-md) 0 0;
    padding: 12px 2px;
    border: 2px solid var(--nuevo-rojo);
    border-radius: var(--nuevo-radio-pill);
    color: var(--nuevo-rojo);
    font-size: 12px;
    line-height: 1.3;
    text-align: center;
}

/* Sección estrategia */
.fondo-dye-estrategia-fondos{
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: var(--nuevo-espacio-md);
}
.fondo-dye-estrategia-objetivo{
    max-width: 560px;
    margin: 0 auto;
    padding: 16px 32px;
    border: 1px solid var(--nuevo-rojo);
    border-radius: var(--nuevo-radio-pill);
    color: var(--nuevo-rojo);
    font-size: 20px;
    font-style: italic;
    line-height: 1.4;
}

/* Sección video */
.fondo-dye-video{
    display: flex;
    align-items: center;
    gap: var(--nuevo-espacio-md);
    max-width: 760px;
}
.fondo-dye-video-media{
    display: block;
    flex: 0 0 120px;
    width: 120px;
    aspect-ratio: 9 / 16;
    height: auto;
    border: 0;
    border-radius: var(--nuevo-radio-md);
    background-color: #000;
    object-fit: cover;
    overflow: hidden;
}
.fondo-dye-video-contenido{
    flex: 1;
    min-width: 0;
}

/* Sección comunicados */
.fondo-dye-comunicados-ctas{
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 700px;
    margin: 0 auto;
    .nuevo-btn{
        width: 100%;
    }
}

/* Sección ayuda + formulario */
.fondo-dye-ayuda-grid{
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 30px;
}
.fondo-dye-ayuda-item{
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px;
    border: 1px solid var(--nuevo-azul);
    border-radius: var(--nuevo-radio-sm);
    color: var(--nuevo-azul);
    transition: border-color 0.2s ease, transform 0.2s ease;
    cursor: default;
    &:hover{
        border-color: var(--nuevo-azul);
        transform: translateY(-3px);
    }
}
.fondo-dye-ayuda-etiqueta{
    font-size: 10px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.fondo-dye-ayuda-link{
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    color: var(--nuevo-azul);
    text-decoration: none;
}
a.fondo-dye-ayuda-link{
    &:hover, &:focus{
        color: var(--nuevo-azul);
        text-decoration: underline;
    }
}
.fondo-dye-ayuda-bajada{
    margin: 0;
    font-size: 12px;
    font-weight: 300;
    color: var(--nuevo-azul);
}
.fondo-dye-form-container{
    position: relative;
    z-index: 1;
    margin-top: var(--nuevo-espacio-lg);
    padding-top: var(--nuevo-espacio-lg);
    border-top: 1px solid #0B2A5B38;
    color: var(--nuevo-blanco);
}
.fondo-dye-form{
    .fondo-dye-form-title{
        font-size: 20px;
        font-weight: 700;
        margin: 0 0 20px;
    }
    .fondo-dye-form-grid{
        display: grid;
        grid-template-columns: 1fr;
        gap: 15px;
    }
    .fondo-dye-form-field{
        display: flex;
        flex-direction: column;
        gap: 8px;
        label{
            font-size: 14px;
            font-weight: 400;
            color: var(--nuevo-azul);
            margin: 0;
        }
        input{
            -webkit-appearance: none;
            -moz-appearance: none;
            appearance: none;
            box-sizing: border-box;
            width: 100%;
            height: 42px;
            padding: 0 12px;
            border: 1px solid var(--nuevo-azul);
            border-radius: var(--nuevo-radio-sm);
            background-color: var(--nuevo-blanco);
            color: var(--nuevo-azul);
            font-family: inherit;
            font-size: 16px;
            line-height: 1;
            box-shadow: none;
            outline: none;
            transition: border-color 0.2s ease, box-shadow 0.2s ease;
            &::placeholder{
                color: #8A8F98;
                opacity: 1;
            }
            &:focus{
                border-color: var(--nuevo-celeste);
                box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.35);
            }
            &:-webkit-autofill,
            &:-webkit-autofill:hover,
            &:-webkit-autofill:focus{
                -webkit-text-fill-color: var(--nuevo-negro);
                -webkit-box-shadow: 0 0 0 1000px #fff inset;
                transition: background-color 9999s ease-in-out 0s;
            }
            &::-ms-clear{
                display: none;
            }
        }
        &.has-error input{
            border-color: var(--nuevo-rojo-error);
        }
        .fondo-dye-form-error{
            min-height: 14px;
            font-size: 12px;
            font-weight: 400;
            line-height: 1.2;
            color: var(--nuevo-rojo-error);
        }
    }
    .fondo-dye-form-check{
        display: flex;
        flex-direction: column;
        gap: 6px;
        margin-top: 15px;
        .fondo-dye-form-check-label{
            position: relative;
            display: inline-flex;
            align-items: flex-start;
            gap: 10px;
            margin: 0;
            font-size: 12px;
            font-weight: 300;
            line-height: 1.4;
            color: var(--nuevo-azul);
            cursor: pointer;
            a{
                color: var(--nuevo-azul);
                font-weight: 700;
                text-decoration: underline;
            }
        }
        input[type="checkbox"]{
            -webkit-appearance: none;
            -moz-appearance: none;
            appearance: none;
            position: absolute;
            top: 0;
            left: 0;
            width: 18px;
            height: 18px;
            margin: 0;
            opacity: 0;
            pointer-events: none;
        }
        .fondo-dye-form-check-box{
            position: relative;
            flex: 0 0 18px;
            width: 18px;
            height: 18px;
            border: 2px solid var(--nuevo-azul);
            border-radius: 4px;
            background-color: transparent;
            transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
            &::after{
                content: '';
                position: absolute;
                top: 1px;
                left: 4px;
                width: 5px;
                height: 9px;
                border: solid var(--nuevo-blanco);
                border-width: 0 2px 2px 0;
                transform: rotate(45deg) scale(0);
                transition: transform 0.15s ease;
            }
        }
        input[type="checkbox"]:checked + .fondo-dye-form-check-box{
            background-color: var(--nuevo-azul);
            &::after{
                transform: rotate(45deg) scale(1);
            }
        }
        input[type="checkbox"]:focus-visible + .fondo-dye-form-check-box{
            box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.35);
        }
        input[type="checkbox"]:disabled + .fondo-dye-form-check-box{
            opacity: 0.6;
        }
        &.has-error .fondo-dye-form-check-box{
            border-color: var(--nuevo-rojo-error);
        }
        .fondo-dye-form-error{
            min-height: 14px;
            font-size: 12px;
            font-weight: 400;
            line-height: 1.2;
            color: var(--nuevo-rojo-error);
        }
    }
    .fondo-dye-form-submit{
        -webkit-appearance: none;
        -moz-appearance: none;
        appearance: none;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
        min-width: 160px;
        height: 48px;
        margin-top: 10px;
        padding: 0 28px;
        border: 0;
        border-radius: var(--nuevo-radio-pill);
        background-color: var(--nuevo-blanco);
        color: var(--nuevo-azul);
        font-family: inherit;
        font-size: 16px;
        font-weight: 500;
        cursor: pointer;
        outline: none;
        transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
        &:hover{
            background-color: var(--nuevo-azul);
            color: var(--nuevo-blanco);
        }
        &:focus-visible{
            box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.5);
        }
        .fondo-dye-form-spinner{
            display: none;
            width: 16px;
            height: 16px;
            border: 2px solid rgba(11, 42, 91, 0.25);
            border-top-color: var(--nuevo-azul);
            border-radius: 50%;
            animation: fondo-dye-spin 0.7s linear infinite;
        }
        &.is-loading{
            cursor: wait;
            pointer-events: none;
            box-shadow: none;
            .fondo-dye-form-spinner{
                display: inline-block;
            }
        }
    }
    .fondo-dye-form-message{
        margin: 10px 0 0;
        font-size: 12px;
        font-weight: 400;
        line-height: 1.2;
        color: var(--nuevo-rojo-error);
        &:empty{
            display: none;
        }
    }
}
.fondo-dye-form-success{
    outline: none;
    animation: fondo-dye-fade-in 0.4s ease;
    .fondo-dye-form-success-title{
        font-size: 18px;
        font-weight: 700;
        margin: 0 0 10px;
        color: var(--nuevo-azul);
    }
    .fondo-dye-form-success-text{
        font-size: 14px;
        font-weight: 300;
        margin: 0;
        color: var(--nuevo-azul);
    }
}
@keyframes fondo-dye-spin{
    to{
        transform: rotate(360deg);
    }
}
@keyframes fondo-dye-fade-in{
    from{
        opacity: 0;
        transform: translateY(10px);
    }
    to{
        opacity: 1;
        transform: translateY(0);
    }
}
@media (prefers-reduced-motion: reduce) {
    .fondo-dye-balanza-flecha,
    .fondo-dye-simulador-barra span,
    .fondo-dye-porcentaje-item-bar-fill{
        transition: none;
    }
    .fondo-dye-balanza-flecha-anim,
    .fondo-dye-balanza-pesas{
        animation: none;
    }
}

@media (min-width: 768px) {
    .fondo-dye-simulador-tipos{
        flex-direction: row;
    }
    .fondo-dye-simulador-card{
        padding: var(--nuevo-espacio-md) var(--nuevo-espacio-lg);
    }
    .fondo-dye-simulador-mensaje{
        width: fit-content;
        margin-left: auto;
        margin-right: auto;
        font-size: 14px;
    }
    .fondo-dye-porcentajes-select{
        width: fit-content;
        min-width: 220px;
    }
    .fondo-dye-table th, .fondo-dye-table td{
        font-size: 15px;
    }
    .fondo-dye-video-media{
        flex-basis: 170px;
        width: 170px;
    }
    .fondo-dye-video{
        gap: var(--nuevo-espacio-lg);
    }
    .fondo-dye-comunicados-ctas{
        flex-direction: row;
        flex-wrap: wrap;
        gap: 40px 20px;
        margin-top: 40px;
        .nuevo-btn{
            flex: 1 1 calc(50% - 12px);
            width: auto;
        }
    }
    .fondo-dye-form{
        .fondo-dye-form-grid{
            grid-template-columns: 1fr 1fr;
        }
        .fondo-dye-form-success-title{
            font-size: 24px;
        }
    }
    .fondo-dye-simulador-label{
        span{
            font-size: 15px;
        }
        small{
            font-size: 12px;
        }
    }
    .fondo-dye-porcentajes-container {
        gap: 20px;
    }
}
@media (min-width: 992px) {
    .fondo-dye-tasas{
        grid-template-columns: 1fr 1fr;
        gap: var(--nuevo-espacio-xl);
        align-items: center;
        &.is-una-columna{
            grid-template-columns: minmax(0, 560px);
            justify-content: center;
        }
    }
    .fondo-dye-ayuda-titulo{
        font-size: 30px;
    }
    .fondo-dye-ayuda-grid{
        grid-template-columns: repeat(4, 1fr);
        gap: 16px;
    }
    .fondo-dye-form{
        .fondo-dye-form-grid{
            grid-template-columns: repeat(4, 1fr);
        }
    }
}
