.footer, 
.first-section, 
.second-section {
    position: fixed;
    width: 100%;
    bottom: 0;
}

.footer{
    transition: background 0.5s ease, height 0.5s ease;
    height: 0vh;
    overflow: hidden;
    background: linear-gradient(to top, #27609F 70%, rgba(39, 96, 159, 0));
}

.footer.show{
    transition: background 0.5s ease, height 0.5s ease;
    background: linear-gradient(to top, #27609F 70%, rgba(39, 96, 159, 0));
    height: 37vh;
}

.footer.blue{
    background: linear-gradient(to top, #ffffff, rgba(39, 96, 159, 0));
}

.footer.blue.show{
    background: linear-gradient(to top, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0.9) 10%, #ffffff 70%, rgba(39, 96, 159, 0) 90%);

}

.scroll-container{
    display: none;
}

.first-section{
    display: grid;
    grid-template-areas:  
        "carousel-pagination-container carousel-pagination-container carousel-pagination-container carousel-pagination-container carousel-pagination-container"
        "top-line top-line top-line top-line top-line"
        "switch-language social-media asteci-logo . collapse-footer";
    grid-template-columns: 5% 18% auto 12% 12%;
    place-items: center;
    z-index: 1;
    transition: transform 0.4s ease;
    transform: translateY(0px);
}

.first-section.show{
    transform: translateY(-11vh);
    z-index: 0;
}

.collapse-footer{
    transition: 0.4s ease;
}

.first-section.show .collapse-footer{
    transform: translateY(-44px) rotate(180deg);
}

.carousel-pagination-container{
    grid-area: carousel-pagination-container;
}

.top-line{
    width: 100%;
    margin: 10px 0 0 0;
    grid-area: top-line;
    transition: 0.4s ease;
}

.top-line hr {
    border: 0;
    height: 3px;
    background: linear-gradient(to right, #ffffff00, #ffffffd9, #ffffff00);
    transition: background 0.4s ease;
}

.top-line.blue hr{
    background: linear-gradient(to right, #ffffff00, #2C537F, #ffffff00);
    background-position: 50% 50%;
}

.social-media{
    grid-area: social-media;
    justify-content: flex-start;
    gap: 10px;
    width: 100%;
    flex-wrap: nowrap;
}

.social-media .icon-container{
    background-color: #fff;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    cursor: pointer;
    transition: 0.1s ease;
}

.social-media .icon-container:hover{
    transform: scale(1.1);
}

.asteci-logo{
    grid-area: asteci-logo;
    transition: 0.4s ease;
}
.asteci-logo img{
    width: 185px;
    height: 55px;
}

.collapse-footer{
    grid-area: collapse-footer;
}
.collapse-footer img{
    cursor: pointer;
}

.first-section .first-section .switch-language, .social-media, .asteci-logo, .collapse-footer{
    margin: 10px 0;
}

.first-section.show .asteci-logo{
    margin: 20px 0;
}

.second-section{
    display: grid;
    grid-template-areas:  
        ". privacy rights cookies certifications";
    grid-template-columns: 19% 16% auto 10% 25%;
    grid-template-rows: auto auto;
    place-items: center;
    transform: translateY(15vh);
    transition: opacity 0.3s ease, transform 0.3s ease;
    opacity: 0;
}

.second-section .social-media{
    grid-area: social-media;
    display: none;
}

.second-section.show{
    opacity: 1;
    transform: translateY(0vh);
}

.privacy{
    grid-area: privacy;
    width: 100%;
}

.rights{
    grid-area: rights;
}

.cookies{
    grid-area: cookies;
}

.privacy, .rights, .cookies{
    text-align: center;
}

.privacy a,
.rights a,
.cookies a{
    color: #fff;
    text-decoration: none;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.25);
}

.privacy.blue a,
.rights.blue a,
.cookies.blue a{
    color: #2C537F;
}

.certifications{
    grid-area: certifications;
    transform: translateY(-4vh);
    place-self: flex-start;
    gap: 20px;
    cursor: pointer;
}

.footer > .switch-language{
    display: none;
}

.first-section .switch-language{
    grid-area: switch-language;
    width: 100%;
}

.switch-container{
    position: relative;
    display: inline-block;
    width: 35px;
    height: 18px;
}

.switch-container input{
    opacity: 0;
    width: 35px;
    height: 18.77px;
}

.switch-container .slider{
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #FFF;
    transition: 0.2s;
    border-radius: 43px;
}

.first-section .switch-language p{
    margin-left: 5%;
}

.footer.blue .first-section .switch-language p,
.footer.blue > .switch-language p{
    color: #2C537F
}

.switch-container .slider::before{
    position: absolute;
    content: "";
    height: 15.72px;
    width: 15.72px;
    left: 1.8px;
    bottom: 5.7%;
    filter: drop-shadow(1px 1px 1.5px #0000007d);
    background-color: #00B5E5;
    transition: 0.2s;
    border-radius: 50%;
}

.switch-container input:checked + span::before{
    transform: translateX(16px);
}

.carousel-pagination-container,
.top-line,
.switch-language,
.social-media .icon-container,
.certifications,
.collapse-footer img,
.asteci-logo{
    filter: drop-shadow( 0 0 10px rgba(0, 0, 0, 0.25));
}

.carousel-pagination-container.blue{
    filter: drop-shadow( 0 0 2px rgba(0, 0, 0, 1));
    transition: 0.5s;
}

@media (max-width: 1024px) {

    .footer.show {
        height: 30vh;
    }

    .first-section.show {
        transform: translateY(-8vh);
    }

    .asteci-logo img{
        width: 130px;
        height: 39px;
    }

    .social-media .icon-container {
        width: 28px;
        height: 28px;
    }

    .social-media .icon-container img{
        width: 14px;
        height: 14px;
    }

    .certifications img{
        width: 74px;
        height: 74px;
    }

    .rights p, .privacy p, .cookies p{
        font-size: 12px;
    }
}

@media only screen and (max-width: 800px) {
    .first-section{
        grid-template-columns: 3% 27% auto 22% 12%;
    }

    .first-section .social-media{
        justify-content: center;
    }
}
@media only screen and (max-width: 700px) {
    .certifications {
        gap: 10px;
    }
}

@media only screen and (max-width: 480px) {
    .footer{
        transition: 0.4s ease;
    }

    .footer.show {
        height: 63vh;
    }

    .scroll-container{
        justify-content: end;
        right: 20px;
        margin-bottom: 140px;
        
        .scroll-text{
            font-size: 14px;
            font-weight: 500;
        }

        .scroll-icon{
            width: 16px;
            height: 16px;
        }
    }

    
    .first-section{
        grid-template-areas:
        "carousel-pagination-container carousel-pagination-container carousel-pagination-container carousel-pagination-container carousel-pagination-container"
        "top-line top-line top-line top-line top-line"
        ". switch-language asteci-logo collapse-footer .";
        grid-template-columns: 6% 15% auto 20% 1%; 
    }

    .first-section.show{
        transform: translateY(-37vh);
    }

    .second-section{
        height: 35vh;
        grid-template-areas:
        ". certifications  ."
        ". social-media ."
        ". privacy ."
        ". rights ."
        ". cookies .";
        grid-template-columns: 1fr auto 1fr;
        transform: translateY(40vh);
        transition: opacity 0.4s ease, transform 0.4s ease;
    }

    .second-section.show{
        transform: translateY(-3vh);
    }

    .second-section.show .switch-language, 
    .second-section.show .social-media, 
    .second-section.show .asteci-logo, 
    .second-section.show .collapse-footer {
        margin: 0 0;
    }

    .first-section .social-media{
        display: none;
    }

    .second-section .social-media{
        display: flex;
        justify-content: center;
    }

    .first-section.show > .switch-language{
        grid-area: switch-language;
        width: 20%;
        position: absolute;
        gap: 20%;
        /*top: 390%;*/
    }

    .footer > .switch-language p {
        margin-left: 5%;
    }

    .button-language-container{
        position: relative;
        height: 100%;
        background-color: red;
    }

    .collapse-footer img{
        width: 30px;
        height: 30px;
    }

    .certifications{
        transform: translateY(0vh);
        gap: 25px;
    }

    .social-media .icon-container {
        width: 40px;
        height: 40px;
    }

    .social-media .icon-container img{
        width: 20px;
        height: 20px;
    }

    .social-media,
    .asteci-logo,
    .privacy,
    .rights,
    .cookies,
    .certifications {
        justify-self: center; 
        align-self: normal;
        text-align: center;
    }
}
    
@media only screen and (max-width: 400px) and (max-height: 650px) {
    .first-section.show > .switch-language{
        top: 390%;
    }
}

@media only screen and (min-width: 1500px){
    .privacy a, .rights a, .cookies a{
        font-size: 1.14rem;
    }

    .certifications {
        transform: translateY(-4.5vh);
        place-self: auto;
        
        >img{
            width: 6.5vw;
        }
    }
}

@media only screen and (min-width: 1024px) and (max-width: 1500px){
    .certifications {
        >img{
            width: 8.5vw;
            height: auto;
        }
    }
}

@media (pointer: coarse) and (hover: none) and (min-width: 480px) and (max-width: 1200px) {
    .scroll-container{
        width: auto;
        height: auto;
        display: flex;
        align-items: start;
        justify-content: center;
        right: 50px;
        position: absolute;
        margin-bottom: 170px;
        gap: 5px;
        
        .scroll-text{
            font-size: 20px;
            font-weight: 500;
        }

        .scroll-icon{
            height: 26px;
            width: 26px;
        }
    }
}