/* ==========================================================================
   FOOTER BOTTOM BAR - SCALA PERÚ
   ========================================================================== */

:root {
    --scala-azul-oscuro: #0a1f3d;
    --scala-azul-institucional: #0f2c54;
    --scala-azul-claro: #4d9fff;
    --scala-gris-claro: #b8c2cc;
    --scala-blanco: #ffffff;
    --scala-borde-sutil: rgba(255, 255, 255, 0.12);
    --scala-dorado: #E1A339;;

    --footer-transition: 0.3s ease;
    --footer-padding-y: clamp(1rem, 2vw, 1.5rem);
    --footer-padding-x: clamp(1rem, 4vw, 3rem);
}

.footerBottom {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem 2rem;

    padding: var(--footer-padding-y) var(--footer-padding-x);

    background-color: var(--scala-azul-oscuro);
    border-top: 1px solid var(--scala-borde-sutil);
    position: relative;
}

.footerBottom::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        var(--scala-azul-claro) 50%,
        transparent 100%
    );
    opacity: 0.4;
}

/* --- Texto de copyright --- */
.footerCopy {
    color: var(--scala-gris-claro);
    font-family: 'Inter', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    font-size: clamp(0.8rem, 1.5vw, 0.9rem);
    font-weight: 400;
    letter-spacing: 0.02em;
    order: 1;
}

/* --- Redes sociales --- */
.footerRedesSociales {
    display: flex;
    align-items: center;
    gap: 1rem;
    order: 2;
}

.footerRedesSociales a {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 38px;
    height: 38px;

    border-radius: 50%;
    background-color: var(--scala-blanco);
    border: 1px solid var(--scala-borde-sutil);

    transition:
        transform var(--footer-transition),
        background-color var(--footer-transition),
        border-color var(--footer-transition);
}

.footerRedesSociales a:hover,
.footerRedesSociales a:focus-visible {
    background-color: var(--scala-blanco);
    border-color: var(--scala-azul-claro);
    transform: translateY(-3px);
    outline: none;
}

.footerIcons {
    font-size: 1rem;
    color: var(--scala-gris-claro);
    transition: filter var(--footer-transition);
}

.footerRedesSociales a:hover .footerIcons,
.footerRedesSociales a:focus-visible .footerIcons {
    filter: brightness(1.15);
}

/* Colores de marca fijos desde la primera carga (no solo al pasar el cursor) */
.fa-linkedin.footerIcons {
    color: #0a66c2;
}

.fa-facebook.footerIcons {
    color: #1877f2;
}

.fa-instagram.footerIcons {
    color: #e1306c;
}

.fa-envelope.footerIcons {
    color: var(--scala-azul-claro);
}

/* --- Crédito de desarrollo --- */
.footerTexto {
    color: var(--scala-gris-claro);
    font-size: clamp(0.75rem, 1.5vw, 0.85rem);
    order: 3;
}

.footerUser {
    color: var(--scala-blanco);
    text-decoration: none;
    font-weight: 600;
    position: relative;
    display: inline-block;
    transition:
        color var(--footer-transition),
        transform var(--footer-transition);
}

.footerUser::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 0;
    height: 1px;
    background-color: var(--scala-dorado);
    transition: width var(--footer-transition);
}

.footerUser:hover,
.footerUser:focus-visible {
    color: var(--scala-dorado);
    transform: translateY(-2px) scale(1.03);
    outline: none;
}

.footerUser:hover::after,
.footerUser:focus-visible::after {
    width: 100%;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

/* Móvil y tablet (hasta 768px): iconos + "Created by" arriba centrados, copyright abajo */
@media (max-width: 768px) {
    .footerBottom {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
        text-align: center;
        row-gap: 0.75rem;
        column-gap: 3rem;
    }

    /* Iconos: arriba, primero */
    .footerRedesSociales {
        order: 1;
        justify-content: center;
    }

    /* Created by: arriba, junto a los iconos, centrado */
    .footerTexto {
        order: 2;
        text-align: center;
    }

    /* Copyright: abajo, en su propia línea, centrado */
    .footerCopy {
        flex: 0 0 100%;
        order: 3;
        text-align: center;
    }
}

/* Móviles pequeños: iconos un poco más grandes para facilitar el tap */
@media (max-width: 400px) {
    .footerRedesSociales a {
        width: 42px;
        height: 42px;
    }

    .footerRedesSociales {
        gap: 0.75rem;
    }
}

/* PC (pantalla grande): solo los iconos de redes sociales van centrados */
@media (min-width: 1025px) {
    .footerBottom {
        display: grid;
        grid-template-columns: 1fr auto 1fr;
        align-items: center;
    }

    .footerCopy {
        justify-self: start;
    }

    .footerRedesSociales {
        justify-self: center;
    }

    .footerTexto {
        justify-self: end;
    }
}

/* Tablet (769px - 1024px): iconos izquierda + Created by derecha en la misma fila,
   copyright en una segunda línea debajo, con margen para que respire */
@media (min-width: 769px) and (max-width: 1024px) {
    .footerBottom {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: space-between;
        align-items: center;
    }

    .footerRedesSociales {
        order: 1;
        justify-content: flex-start;
    }

    .footerTexto {
        order: 2;
        text-align: center;
    }

   .footerCopy {
    order: 3;
    flex: 0 0 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 0.5rem;
}
}