@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;600&display=swap');

/* Variables */
:root {
    --color-primario: #FCB03B;
    --color-secundario: #E92F3D;
    --color-background: #EFF6F5;
    --color-background-sombra: #E92F3D30;
    --color-texto: #A1A5A6;
    --text-default: 'Open Sans';
}

/* Generales */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--text-default);
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--color-background);
}

.titulos {
    font-size: 40px;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.subtitulos {
    font-size: 25px;
    font-weight: 400;
    text-align: center;
    text-transform: uppercase;
    color: var(--color-primario);
}

.btn {
    text-decoration: none;
    text-transform: uppercase;
    font-size: 14px;
    color: white;
    background: var(--color-primario);
    font-weight: 700;
    padding: 15px 30px;
    outline: none;
    border: none;
    position: relative;
    top: 20px;
    transition: all .3s;
}

.btn span {
    padding-left: 10px;
}

.btn:hover {
    padding: 15px 45px;
}

/* Menu Principal */
.menu-principal {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 75px;
    padding: 0 30px;
    margin-top: 10px;
    background: var(--color-background);
    z-index: 1;
}

.logo img {
    width: 130px;
    cursor: pointer;
}

.menu-bar {
    display: flex;
    width: 100%;
    justify-content: space-between;
}

.menu-bar .enlaces ul li {
    display: inline-block;
    padding: 0 10px;
}

.menu-bar .enlaces ul li a {
    font-size: 14px;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--color-texto);
    font-weight: 600;
    background: linear-gradient(currentColor, currentColor);
    background-position: 100% 100%;
    background-repeat: no-repeat;
    background-size: 0% 2px;
    transition: all .5s;
}

.menu-bar .enlaces ul li a:hover {
    color: var(--color-secundario);
    background-size: 50% 2px;
}

.menu-bar .sociales a {
    font-size: 16px;
    text-transform: uppercase;
    padding: 0 10px;
    font-weight: 700;
    text-decoration: none;
    color: var(--color-texto);
    transition: all .3s;
}

.menu-bar .sociales a:hover {
    color: var(--color-secundario);
}

.menu-principal i {
    cursor: pointer;
    color: var(--color-texto);
    font-size: 30px;
    /* siempre aparezca a la derecha */
    float: right;
    transition: all .3s;
    display: none;
}

.menu-principal i:hover {
    color: var(--color-secundario);
}

/* Slider de productos */
#menu-productos .contenedor-principal {
    display: flex;
    align-items: center;
    position: relative;
    z-index: 0;
}

.contenedor-principal #btn-izquierda,
.contenedor-principal #btn-derecha {
    position: absolute;
    height: 10%;
    width: 50px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 40px;
    margin: 0 15px;
    color: var(--color-secundario);
    z-index: 500;
    outline: none;
    transition: all .3s;
}

.contenedor-principal #btn-izquierda:hover,
.contenedor-principal #btn-derecha:hover {
    background: var(--color-background-sombra);
    transform: translateY(5px);
}

.contenedor-principal #btn-izquierda {
    left: 0;
}

.contenedor-principal #btn-derecha {
    right: 0;
}

.slider {
    display: flex;
        /* Al estar todos los productos uno tras otro aparecen barras para mover tanto horizontal como vertical
        asi que al ocultar el overflow desaparecemos esas barras para despues hacer el traslado con los botones */
    overflow: hidden;
    height: calc(100vh - 85px);
    scroll-behavior: smooth;
}   

.contenedor-productos {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-basis: 100%;
    flex-shrink: 0;
}

.descripcion-productos {
    width: 30%;
}

.descripcion-productos h1 {
    font-size: 5vw;
    font-weight: 600;
    text-transform: uppercase;
}

.descripcion-productos h2 {
    font-size: 2.2vw;
    font-weight: 100;
    text-transform: lowercase;
}

.descripcion-productos p {
    color: var(--color-texto);
    font-style: italic;
    text-align: justify;
}

.imagen-productos {
    width: 50%;
    display: flex;
    justify-content: center;
}

.imagen-productos img {
    width: 100%;
    transform: scale(1.1);
    transition: all .3s;
}

.imagen-productos img:hover {
    transform: scale(1.15);
}

/* Seccion servicios */

#servicios {
    height: 100vh;
    background: white;
    padding: 40px;
}

.servicios-titulos {
    display: flex;
    flex-direction: column;
    justify-items: center;
    align-items: center;
}

.contenedor-servicios {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, auto);
    margin-top: 30px;
    grid-gap: 30px;

    grid-template-areas:    "ingredientes  imagen  rapidez"
                            "calidad    imagen  delivery";
}

.calidad {
    grid-row: calidad;
    grid-column: calidad;
}

.ingredientes {
    grid-row: ingredientes;
    grid-column: ingredientes;
}

.rapidez {
    grid-row: rapidez;
    grid-column: rapidez;
}

.delivery {
    grid-row: delivery;
    grid-column: delivery;
}

.imagen-central {
    grid-row: imagen;
    grid-column: imagen;
    transition: all .5s;
}

.imagen-central:hover {
    transform: scale(1.1);
}

.items {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.items span {
    width: 95px;
    font-size: 40px;
    color: var(--color-secundario);
    padding: 20px;
    border: 5px double #dedede;
    border-radius: 50%;
    transition: all .5s;
}

.items span:hover {
    background: var(--color-secundario);
    color: white;
}

.ingredientes span,
.calidad span {
    color: var(--color-primario);
}

.ingredientes span:hover,
.calidad span:hover {
    background: var(--color-primario);
    color: white;
}

.items .titulo-item {
    text-transform: uppercase;
    font-size: 15px;
    font-weight: 700;
    text-align: center;
}

.items .texto-item {
    font-size: 14px;
    color: var(--color-texto);
    text-align: center;
    font-style: italic;
    padding: 0, 20px;
}

/* Seccion de equipo */
#equipo {
    height: 100vh;
    display: flex;
}

.persona {
    flex-grow: 1;
    overflow: hidden;
    position: relative;
    transition: all .5s;
}

.persona:hover {
    flex-grow: 3;
}

.persona-imagen {
    height: 100%;
    position: absolute;
    left: 50%;
    transform: translate(-50%);
    filter: grayscale(80%);
    transition: all .3s;
}

.persona-imagen:hover {
    filter: none;
}

.persona-info {
    width: 100%;
    position: absolute;
    bottom: 10px;
    text-align: center;
    opacity: 0;
    transition: all .1s;
}

.persona:hover .persona-info {
    opacity: 1;
    bottom: 60px;
    transition-delay: 0.3s;
}

.persona-info h2 {
    font-size: 30px;
    color: black;
    font-weight: 600;
    text-shadow: 1px 2px 2px rgba(0, 0, 0, 0.5);
}

.persona-info p {
    color: var(--color-secundario);
    font-size: 20px;
    font-weight: 700;
    font-style: italic;
    margin-top: 8px;
    margin-bottom: 20px;
    text-shadow: 1px 2px 2px rgba(255, 0, 0, 0.5);
}

.social-media a {
    display: inline-block;
    width: 40px;
    height: 40px;
    color: white;
    background: var(--color-secundario);
    line-height: 40px;
    border-radius: 50%;
    margin: 0 5px;
    font-size: 18px;
    cursor: pointer;
    transition: all .5s;
}

.social-media a:hover {
    color: var(--color-secundario);
    background: transparent;
    transform: scale(2);
}

/* Seccion ingredientes */
#ingredientes {
    display: flex;
    justify-content: center;
    align-items: center;
}

.ingre {
    flex-grow: 1;
    overflow: hidden;
    position: relative;
    height: 250px;
}

.img-ingre {
    position: absolute;
    height: 100%;
    left: 50%;
    transform: translateX(-50%);
}

.info-ingre {
    width: 100%;
    height: 100%;
    position: absolute;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.5);
    transition: all .3s;
}

.info-ingre:hover {
    background: rgba(0, 0, 0, 0.25);
}

.info-ingre p {
    font-size: 28px;
    color: white;
    font-weight: 600;
    transition: all .3s;
}

.info-ingre:hover p {
    transform: translateY(10px);
}

/* Seccion contacto */
#contacto {
    position: relative;
    height: 100vh;
    padding: 60px;
}

#formulario {
    width: 70%;
    margin: 50px auto;
}

.two-fiels {
    display: flex;
    justify-content: space-between;
}

.input-text, .input-email, .textarea {
    border: 1px solid #B4B4B4;
    color: #888;
    outline: none;
    padding: 15px 60px;
    height: 45px;
    font-size: 16px;
    margin-bottom: 20px;
    transition: all .3s;
}

.textarea {
    width: 100%;
    height: 150px;
    resize: none;
}

.input-text, .input-email {
    width: 100%;
}

.inputConIcon {
    position: relative;
    width: 48%;
}

.inputConIcon i {
    position: absolute;
    left: 0;
    padding: 14px 15px;
    background: #888;
    color: white;
    transition: all .3s;
}

.textareaIcon {
    width: 100%;
}

.textareaIcon i {
    position: absolute;
    background: transparent;
    color: #888;
    padding: 0;
    font-size: 25px;
    left: 14px;
    top: 14px;
    transition: all .3s;
}

.inputConIcon input:focus,
.inputConIcon textarea:focus{
    border: 1px solid var(--color-primario);
}

.inputConIcon input:focus + i {
    background: var(--color-primario);
}

.inputConIcon textarea:focus + i {
    color: var(--color-primario);
}

.fiels-btn {
    width: 100%;
    display: flex;
    justify-content: flex-end;
}

.btn-input {
    padding: 15px 50px;
    cursor: pointer;
}

.btn-input:hover {
    padding: 15px 65px;
}

/* Alertas */

.alertas {
    display: flex;
    justify-content: center;
    align-items: center;
}

.alert {
    width: 60%;
    padding: 20px 60px;
    position: fixed;
    top: 0;
    transition: all .3s;
}

.alert.show {
    transform: translateY(20%);
}

.alert.hide {
    transform: translateY(-100%);
}

.alert .icono-alert {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 30px;
}


.alert .msg {
    padding: 0 20px;
    font-size: 18px;
}

#alertError {
    background: #F8D7DA;
    border-right: 4px solid #DA3748;
}

#alertError .icono-alert {
    color: #DA3748;
}

#alertError .msg {
    color: #721c24;
}

#alertSuccess {
    background: #D4EDDA;
    border-right: 4px solid #279E43;
}

#alertSuccess .icono-alert {
    color: #279E43;
}

#alertSuccess .msg {
    color: #155724;
}

/* Footer */
footer {
    display: flex;
    margin-top: -60px;
}

.sociales-metodo {
    width: 25%;
    height: 100px;
    background: #333;
    color: white;
    position: relative;
    text-align: center;
    overflow: hidden;
}

.sociales-metodo i {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    font-size: 30px;
    line-height: 100px;
    transition: all .3s;
}

.sociales-metodo span {
    position: absolute;
    width: 100%;
    left: 0;
    bottom: 0;
    padding: 10px 0;
    font-size: 12px;
    background: var(--color-primario);
    color: white;
    letter-spacing: 1px;
    font-weight: 700;
    transform: translateY(60px);
    transition: all .5s;
}

.sociales-metodo i:hover {
    transform: translateY(-10px);
    transition: all .6s;
}

.sociales-metodo i:hover + span {
    transform: translateY(0px);
}

/* Boton ir arriba */
#btn-top {
    width: 50px;
    height: 50px;
    background: var(--color-primario);
    position: fixed;
    cursor: pointer;
    bottom: 20px;
    right: 20px;
    z-index: 1;
    transform: translateY(150%);
    transition: all .5s;
}

#btn-top:hover {
    background: #ffa51e;
}

#btn-top.show {
    transform: translateY(0);
}

#btn-top.scrollFinal {
    transform: translateY(250%);
}

#btn-top span {
    color: white;
    font-size: 25px;
    width: 100%;
    text-align: center;
    line-height: 50px;
    transition: all .5s;
}

#btn-top span:hover {
    line-height: 40px;
}

/* Media queries */

@media screen and (max-width: 850px) {
    /* slider productos */
    .contenedor-productos {
        flex-direction: column;
    }

    .descripcion-productos {
        width: 70%;
        /* Aplicamos order 1 porque al ponerle column el producto queda debajo del texto y boton
            asi que cambiamos el orden para el diseño requerido */
        order: 1; 
    }

    .descripcion-productos .btn {
        padding: 10px, 20px
    }

    .descripcion-productos .btn:hover {
        padding: 10px, 30px;
    }
}

/* Menu Responsive */

@media screen and (max-width: 650px) {
    .menu-principal {
        position: fixed;
        top: 0;
        margin-top: 0;
    }
    
    .menu-principal i {
        display: block;
    }

    .menu-bar {
        flex-direction: column;
        align-items: center;
        justify-content: space-around;
        width: 100%;
        height: 100vh;
        position: fixed;
        right: 0;
        top: 0;
        z-index: 10000;
        background: #333;
        transition: all .4s;
        transform: translate(100%);
    }

    .menu-bar.active {
        transform: translate(0%);
    }

    .menu-bar i {
        position: absolute;
        top: 50px;
        right: 50px;
    }

    .menu-bar .enlaces ul li {
        display: block;
        padding: 20px 10px;
        text-align: center;
    }

    .menu-bar .enlaces ul li a,
    .menu-bar .sociales a {
        font-size: 20px;
    }

    /* Slider productos */
    .slider {
        height: calc(100vh - 0px);
    }

    .imagen-productos {
        width: 70%;
    }

    .descripcion-productos h1 {
        font-size: 7vw;
    }

    .descripcion-productos h2 {
        font-size: 3vw;
    }

    /* Seccion servicios */
    .contenedor-servicios {
        margin-top: 50px;
        grid-template-columns: repeat(2, 1fr);
        grid-template-areas: 'ingredientes  rapidez'
                                'calidad    delivery';
    }

    .imagen-central {
        display: none;
    }

    /* Ingredientes */
    .info-ingre .txt-ingre {
        display: none;
    }

    /* Contacto */

    #formulario {
        width: 100%;
    }

    .two-fiels {
        flex-direction: column;
    }

    .inputConIcon {
        width: 100%;
    }

    /* Alerta */

    .alert {
        width: 90%;
    }
    .alert.show {
        transform: translateY(150%);
    }

    /* footer */
    footer {
        flex-wrap: wrap;
        margin-top: 0px;
    }

    .sociales-metodo {
        width: 50%;
    }

    /* eliminar btn "ir arriba" */
    #btn-top {
        display: none;
    }
}