:root {
    --fuenteHeading: 'Merriweather', sans-serif;
    --fuenteParrafos: 'Inter' sans-serif;

    --blanco: #ffffff;
    --negro: #000000;
    --texto: #020202;
    --gris: #808080;
    --claro: #4A7FBB;
    --azul: #0A2A54;
}

html {
    box-sizing: border-box;
    font-size: 62.5%;
}

*,
*:before,
*:after {
    box-sizing: inherit;
}

body {
    background-color: var(--azul);
    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%, 120rem);
    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;
}
.color-t {
    color: var(--texto);
}
.color-b {
    color: var(--claro);
}
.color-w {
    color: var(--blanco);
}

/* HEADER */
.header {
    width: 100%;
    background: linear-gradient(180deg, var(--negro), var(--azul));
    display: flex;
    justify-content: center;
}
.barra {
    width: 100%;
    max-width: 900px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.navegacion__enlace {
    color: var(--blanco);
    text-decoration: none;
}
.header_img {
    width: 110px;
    height: auto;
}
.logo-wrapper {
    background: var(--blanco);
    padding: 15px 20px;
    display: flex;
    justify-content: center;
    align-items: center;

    border-bottom-left-radius: 120px;
    border-bottom-right-radius: 120px;

    width: fit-content;
    height: fit-content;
}
.logo-wrapper img {
    width: 20rem;
    height: auto;
}

/* Responsive */
@media (max-width: 480px) {
    .header_img {
        width: 70px;
    }
}
@media (max-width: 480px) {
    .logo-wrapper {
        padding: 8px 12px;
        border-bottom-left-radius: 60px;
        border-bottom-right-radius: 60px;
    }

    .logo-wrapper img {
        width: 10rem;
    }

    .barra {
        gap: 1rem;
        justify-content: space-around;
    }

    .navegacion__enlace {
        font-size: 1.4rem;
    }
}

/* Index */

.contenedor-hero {
    display: grid;
    grid-template-columns: 1fr 0.8fr;
    align-items: center;
    padding: 4rem 2rem;
    max-width: 1500px;
    margin: 0 auto;
    gap: 2rem;
    color: var(--blanco);
}
.hero-texto {
    text-align: left;      
    justify-self: start;
}
.hero-texto h1 {
    text-align: left;
    margin-left: auto;
}
.hero-img-contenedor {
    display: flex;
    justify-content: center;
    align-items: center;
}
.hero-img {
    width: 45rem;
    height: 45rem;
    border-radius: 50%;
    object-fit: cover;
}
@media (max-width: 480px) {
    .contenedor-hero {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 1.5rem;
    }
    .hero-texto {
        text-align: center;
        justify-self: center;
    }
    .hero-texto h1 {
        text-align: center; 
        margin-left: 0;
    }
    .hero-img-contenedor {
        order: -1;
    }
    .hero-img {
        width: 20rem;
        height: 20rem;
    }
}
.btn-servicio {
    display: inline-block;
    background-color: var(--claro);
    color: var(--blanco);
    padding: 0.25rem 0.75rem;
    border-radius: 0.75rem;
    text-decoration: none;
}
.btn-servicio:hover {
    background-color: var(--gris);
}
.contenedor-abg {
    background-color: var(--claro);
    color: var(--blanco);
    padding: 5rem;

    display: flex;
    flex-direction: column;
    gap: 3rem;
}
.contenedor-abg h2,
.contenedor-abg h4 {
    max-width: 200rem; 
    margin: 0 auto;
}
.contenedor-ser {
    background-color: var(--blanco);
    margin-top: -2rem;
    margin-bottom: 1rem;
    padding: 2rem;
}
.ser-texto h1 {
    text-align: center;
    margin-bottom: 2rem;
}
.desktop {
    display: grid;
    grid-template-columns: repeat(4,1fr);
    gap: 1.5rem;
    max-width: 80%;
    margin: 0 auto;
}
.servicio-item {
    border: 6px solid var(--gris);
    padding: 1.5rem 1rem;
    font-size: 3rem;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
}
.carusel-movil {
    display: none;
}
@media (max-width: 600px) {
    .desktop {
        display: none;
    }
    .carusel-movil {
        display: block;
        width: 100%;
        overflow: hidden;
        padding: 1rem 0;
    }
    .carusel-track {
        display: flex;
        gap: 2rem;
        width: max-content;
        animation: mover 18s linear infinite;
        will-change: transform;
    }
    .carusel-movil:hover .carusel-track {
        animation-play-state: paused;
        cursor: grab;
    }
    @keyframes mover {
        0%   { transform: translateX(0); }
        100% { transform: translateX(-50%); }
    }
    .carusel-track .servicio-item {
        min-width: 260px;
        flex: 0 0 auto;
    }
}

/* Mision y vision */

.mvsion {
    display: grid;
    grid-template-columns: repeat(2,1fr);
    padding-top: 2rem;
}
.mvsion-izq {
    background-color: var(--claro);
    color: var(--blanco);
}
.mvsion-izq h1,
p{
    max-width: 80%;
    text-align: center;
    justify-self: center;
}
.mvsion-der {
    background-color: var(--blanco);
    color: var(--texto);
}
.mvsion-der h1,
p{
    max-width: 80%;
    text-align: center;
    justify-self: center;
}
.logro {
    display: block;
    max-width: 95%;
    margin: 5rem;
}
.logros {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
}
.logros div {
    padding: 1.125rem 1.25rem;
    border: 6px solid var(--gris);
    color: var(--blanco);
    text-align: center;
    font-size: 3rem;
    display: flex;
    justify-content: center;
    align-items: center;
}
@media (max-width: 30rem) {
    .logros {
        grid-template-columns: 1fr;
    }
}

/* Formulario */

.form-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 4rem 2rem;
}

/* TÍTULO 80% */
.form-title-wrapper {
    width: 70%;
    max-width: 200rem;
}

/* FORMULARIO 70% */
.form-body-wrapper {
    width: 50%;
    max-width: 200rem;
}

/* TÍTULO */
.form-title {
    background-color: var(--claro);
    color: var(--blanco);
    text-align: center;
    padding: 1rem;
    margin-bottom: 3rem;
}

/* FORMULARIO */
.form {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* GRUPOS INDIVIDUALES */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
    color: var(--blanco);
}

/* DOS COLUMNAS */
.form-row {
    display: flex;
    gap: 3rem;
}

/* INPUTS */
.form input,
.form select,
.form textarea {
    width: 100%;
    padding: 0.8rem;
    border: none;
    outline: none;
}

/* TEXTAREA */
.form textarea {
    height: 12rem;
    resize: none;
}

/* BOTÓN */
.form-btn {
    margin: 0 auto;
    padding: 1rem 2rem;
    background-color: var(--gris);
    color: var(--blanco);
    border: none;
    border-radius: 0.6rem;
    cursor: pointer;
    transition: 0.3s ease;
}

.form-btn:hover {
    background-color: var(--claro);
}

/* RESPONSIVE */
@media (max-width: 480px) {

    .form-title-wrapper {
        width: 100%;
    }

    .form-body-wrapper {
        width: 100%;
    }

    .form-row {
        flex-direction: column;
        gap: 2rem;
    }
}

/* Footer */

.footer {
    padding: 2rem 3rem;
    color: var(--blanco);
    font-size: 3rem;
}
.footer-container {
    width: min(90%, 250rem);
    margin: 0 auto;
    border-top: 3px solid var(--blanco);

    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding-top: 1.5rem;
}
.footer-left {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
}
.footer-logo {
    width: 45rem;
    height: auto;
}
.footer-info,
.footer-info p {
    margin: 1rem 0;
    color: var(--blanco);
}
.footer-right {
    text-align: right;
}
.footer-link {
    text-decoration: none;
    display: block;
    margin-top: 0.3rem;
    color: var(--blanco);
}
@media (max-width: 480px) {
    .footer-container {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 2rem;
        padding-top: 2rem;
        font-size: 2rem;
    }
    .footer-left {
        align-items: center;
    }
    .footer-right {
        text-align: center;
    }
    .footer-right .footer-info,
    .footer-right .footer-link {
        text-align: center;
        width: 100%;
    }
}