:root {
    --fuenteHeading: 'Lora', sans-serif;
    --fuenteParrafos: 'Noto Sans' sans-serif;

    --blanco: #ffffff;
    --negro: #000000;
    --texto: #191970;
    --gris: #5D8AA8;
    --naranja: #FF4500;
    --rojo: #8F2A30;
}

html {
    box-sizing: border-box;
    font-size: 62.5%;
}

*,
*:before,
*:after {
    box-sizing: inherit;
}

body {
    background-color: var(--blanco);
    font-family: var(--fuenteParrafos);
    font-size: 1.6rem;
    line-height: 2;
    /* interlineado */
}

.hidden-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    visibility: hidden;
    transition: opacity 600ms ease-out, transform 600ms ease-out, visibility 0s linear 600ms;
    will-change: opacity, transform;
}

.hidden-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
    transition-delay: 0s;
}

/* Globales */

.contenedor {
    width: min(90%, 240rem);
    margin: 0 auto;
}

main.contenedor {
    /* * Duración: 0.7 segundos
     * Efecto: 'ease-out' (rápido al inicio, suave al final)
     * Relleno: 'forwards' (mantiene el estado final de la animación)
     */
    animation: fadeInOnLoad 0.7s ease-out forwards;
}

@keyframes fadeInOnLoad {
    /* Estado inicial: 0% */
    from {
        opacity: 0;
        /* Hacemos que también se deslice sutilmente desde abajo */
        transform: translateY(30px); 
    }
    
    /* Estado final: 100% */
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.contenedor-barra {
    width: min(100%, 200rem);
    margin: 0 auto;
}

a {
    text-decoration: none;
    color: var(--texto);
    line-height: 2;
    font-size: 3rem;
}

h1,
h2,
h3 {
    text-align: center;
    font-family: var(--fuenteHeading);
    line-height: 1.2;
    text-transform: uppercase;
}

h4 {
    text-align: left;
    font-family: var(--fuenteHeading);
    line-height: 1.2;
    text-align: center;
    font-size: 2rem;
}

p {
    line-height: 2rem;
    text-align: justify;
    font-size: 2rem;
}

img {
    max-width: 100%;
    width: 100%;
    align-items: center;
}

h1 {
    font-size: 4rem;
}

@media (min-width: 768px) {
    h1 {
        font-size: 5rem;
    }
}

h2 {
    font-size: 3rem;
}

@media (min-width: 768px) {
    h2 {
        font-size: 4rem;
    }
}

h3 {
    font-size: 2rem;
}

@media (min-width: 768px) {
    h3 {
        font-size: 3rem;
    }
}

/* Utilidades */

.no-margin {
    margin: 1;
}

.no-padding {
    padding: 1;
}

.centrar-texto {
    text-align: center;
}
.der-texto{
    text-align: right;
}
.izq-texto{
    text-align: left;
}
.blue{
    color: var(--texto);
}

/* HEADER */
.header {
    width: 100%;
    display: flex;
    justify-content: center;
}
.barra {
    width: 100%;
    max-width: 240rem; /* ajusta si quieres */
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.header_img {
    width: 20rem;
    height: auto;
}
.navegacion {
    display: flex;
    gap: 3rem;
}
.navegacion__enlace {
    color: var(--texto);
    text-decoration: none;
    transition: color 0.3s ease;
}
.navegacion__enlace:hover {
    color: var(--naranja);
}
@media (max-width: 480px) {
    .header_img {
        width: 12rem;
    }
    .barra {
        align-items: center;
    }
    .navegacion {
        flex-direction: column;
        align-items: flex-end;
        gap: 0.5rem;
    }
    .navegacion__enlace {
        font-size: 2rem;
    }
}

/* Index */

.barra_calidad {
    position: relative;
    width: 100%;
    overflow: hidden;
}
.barra_calidad-bg {
    position: absolute;
    inset: 0;
    background-color: var(--gris);
    clip-path: polygon(
        0 0,
        100% 0,
        100% 65%,
        0 100%
    );
    z-index: 1;
}
.barra_calidad-content {
    position: relative;
    z-index: 2;

    padding: 5rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
    color: var(--blanco);
}
.boton_credito {
    background-color: var(--naranja);
    color: var(--blanco);
    padding: 0.8rem 2.2rem;
    border-radius: 1.2rem;
    transition: background-color 0.3s ease;
}
.boton_credito:hover {
    background-color: var(--texto);
}
@media (max-width: 480px) {
    .barra_calidad-content {
        padding: 4rem 1.5rem;
    }
}
.grid3 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 45rem));
    justify-content: center;
    gap: 10rem;
}
.grid2{
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 45rem));
    justify-content: center;
    gap: 10rem;
    margin-top: 3rem;
    margin-bottom: 5rem;
}
.caja {
    background-color: var(--gris);
    color: var(--blanco);
    border-radius: 2rem;

    padding: 1rem 1.5rem 2rem;

    display: flex;
    flex-direction: column;

    max-height: 37rem; /* mismo tamaño */
}
.caja-roja {
    background-color: var(--rojo);
    padding: 0.8rem 1rem;
    font-size: 3rem;
    width: 100%;
    text-align: center;
    margin-top: 1rem;
    margin-bottom: 1rem;
}
.texto {
    flex: 1;
    display: flex;
    align-items: center;     
    justify-content: center; 
    text-align: center;
    font-size: 2.5rem;
    line-height: 1.5;
    margin: 0;
}
@media (max-width: 480px) {
    .grid3 {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    .grid2{
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    .caja {
        min-height: auto;
    }
    .texto {
        font-size: 2rem;
        line-height: 1.35;
    }
    .caja-roja {
        font-size: 2.5rem;
    }
}

/* Conócenos */

.barra_dgo {
    position: relative;
    width: 100%;
    overflow: hidden;
}
.barra_dgo-bg {
    position: absolute;
    inset: 0;
    background-color: var(--gris);
    clip-path: polygon(
        0 0,
        100% 0,
        100% 100%,
        0 75%
    );
    z-index: 1;
}
.barra_dgo-content {
    position: relative;
    z-index: 2;
    padding: 5rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    color: var(--blanco);
}
.barra_dgo-content h1,
.barra_dgo-content h2,
.barra_dgo-content h3,
.barra_dgo-content p {
    margin: 0;
    text-align: center;
}

.barra_dgo-content h1 {
    margin-bottom: 0.5rem;
}

.barra_dgo-content h2 {
    margin-bottom: 0.5rem;
}
@media (max-width: 480px) {
    .barra_dgo-bg {
        clip-path: polygon(
            0 0,
            100% 0,
            100% 100%,
            0 80%
        );
    }
}
.mv-container {
    max-width: 150rem;
    margin: 0 auto;
    padding: 0 2rem;

    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10rem;
}
.mv-card {
    position: relative;
    background-color: var(--gris);
    color: var(--blanco);
    padding: 3.5rem 2.5rem 2.5rem;
    border-radius: 0.75rem;
}
.mv-icon {
    position: absolute;
    top: 0;
    left: 0;

    background-color: var(--rojo);
    padding: 1.5rem;

    border-top-left-radius: 0.75rem;
    border-bottom-right-radius: 0.75rem;

    display: flex;
    align-items: center;
    justify-content: center;
}
.mv-icon img {
    width: 8rem;
    height: auto;
}
.mv-content {
    padding-left: 10rem;
}
.mv-content h2 {
    margin: 0 0 1rem;
}
.mv-content p {
    margin: 0;
    line-height: 1.5;
}
.titulo {
    text-align: left;
    justify-content: center;
    margin-left: 10rem;
    margin-top: -0.5rem;
    margin-bottom: 5rem;
}
@media (max-width: 480px) {
    .mv-container {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    .mv-content {
        padding-left: 8rem;
    }
    .mv-icon img {
        width: 6rem;
    }
}
.grid32 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 45rem));
    justify-content: center;
    gap: 10rem;
}
.caja-borde {
    border: 3px solid var(--gris);
    border-radius: 2rem;
    color: var(--texto);
    padding: 3rem 2rem;
    text-align: center;
    margin-bottom: 2rem;
}
@media (max-width: 480px) {
    .grid32 {
        grid-template-columns: repeat(2, 1fr);
        gap: 2.5rem;
        margin-bottom: auto;
    }
    .grid32 .caja-borde:nth-child(3) {
        grid-column: 1 / -1;
        max-width: 75%;
        margin: 0 auto;
        margin-bottom: 2rem;
    }
}

/* Formulario */

.barra-fin{
    background-color: var(--gris);
    color: var(--blanco);
    padding: 2rem;
}
.contenedor2 {
    max-width: 50%;
    margin: 1.25rem auto;
}
.formulario {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}
.campo {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.campo label,
.etiqueta {
    background: var(--rojo);
    color: var(--blanco);
    padding: 0.5rem 0.75rem;
    border-radius: 1.5rem;
    min-width: 7.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    white-space: nowrap;
}
.label-sec {
    margin-left: 1.25rem;
}
input,
select,
textarea {
    flex: 1;
    padding: 0.75rem;
    border-radius: 1rem;
    border: 3px solid var(--gris);
    outline: none;
}
textarea {
    height: 6rem;
    resize: none;
}
.fila {
    flex-wrap: wrap;
}
.acciones {
    display: flex;
    justify-content: center;
    margin-top: 0.75rem;
}
button {
    background: var(--rojo);
    color: var(--blanco);
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 1.5rem;
    cursor: pointer;
}
button:hover {
    background: var(--gris);
}
@media (max-width: 480px) {
    .contenedor2 {
        max-width: 95%;
    }
    .campo {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }
    .label-sec {
        margin-left: 0;
    }
    .campo label,
    .etiqueta {
        min-width: 100%;
    }
    input,
    select,
    textarea {
        width: 100%;
    }
}

/* FOOTER */
.footer {
    width: 100%;
    display: flex;
    justify-content: center;
    border-top: 0.5rem solid var(--naranja);
}
.barra_f {
    width: 100%;
    max-width: 240rem;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    color: var(--texto);
}
.barra_f p {
    margin: 0;
    white-space: nowrap;
}
@media (max-width: 480px) {
    .barra_f {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 1rem;
    }
    .barra_f img {
        width: 12rem;
    }
    .barra_f p {
        white-space: normal;
    }
}