/*----------FONT-----------*/

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300..700;1,300..700&family=Lato:ital,wght@0,100;0,300;0,400;0,700;0,900;1,100;1,300;1,400;1,700;1,900&display=swap');


/*------COLORES------*/

:root{
    --primary-color: #fcfae3; /*Color de fondo*/
    --card-bg: #e7d9c6; /*Color fondo tarjetas*/
    --bg-quote: #faf2ec;
    --text-color-primary: #2b2b2b; /*Color texto primario*/
    --text-color-secondary: #ffe8d3; /*Color texto secundario*/
    --color-header: #9A3F3F; /*Color del header*/
    --color-footer: #5f2828; /*Color footer*/
    --color-button: #C1856D; /*Color button*/
    --color-hover: #a06e5a; /*Hover*/
    --color-accent: #E6CFA9; /*Color destacar lo importante*/
    --font-title: 'Cormorant Garamond', serif; /*Font títulos*/
    --font-secondary: 'Lato', sans-serif; /*Fon textos*/
    --box-shadow: rgba(149, 157, 165, 0.2) 0px 8px 24px; /*Sombra*/
}

/*-------RESET BÁSICO-------*/

*{
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

/*-----ESTILOS GLOBALES-----*/

html{
    scroll-behavior: smooth;
}

body{
    min-height: 100vh;
    font-family: var(--font-secondary);
    background-color: var(--primary-color);
}

img{
    max-width: 100%;
}

h1, h2, h3{
    font-family: var(--font-title);
}

section{
    scroll-margin-top: 80px;
    margin-bottom: 4rem;
}

.section-container h2{
    text-align: center;
    font-size: 2rem;
    color: var(--text-color-primary);
    margin-bottom: 2rem;
}

/*Cambiar colo de la selección al los textos*/
::selection{
    background-color: var(--color-accent);
    color: var(--text-color-secondary);
}

/*Cambiar color barra scroll*/

::-webkit-scrollbar{
    width: 8px; /*Ancho de la barra scroll*/
}

::-webkit-scrollbar-track{
    background-color: var(--card-bg);
}

::-webkit-scrollbar-thumb{
    background-color: var(--color-hover);
    border-radius: 10px;
}


/*----HEADER LANDING----*/

header{
    position: sticky;
    top: 0;
    background-color: var(--color-header);
}

.header-container{
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-container{
    display: flex;
    align-items: center;
}

.logo-container svg{
    width: 50px;
    height: 50px;
}

.bakery-name{
    font-size: 2rem;
    font-weight: bold;
    padding: 1rem;
    color: var(--text-color-secondary);
}

nav ul{
    display: flex;
    gap: 1.5rem;
    list-style: none;
}

nav a{
    color: var(--text-color-secondary);
    text-decoration: none;
    font-weight: bold;
    position: relative;
    transition: color 0.3s ease;
}

nav a:hover{
    color: var(--color-hover);
}


/*--ANIMACION RAYITA ABAJO DEL NAV--*/

nav a::after{
    content: "";
    width: 0px;
    height: 2px;
    position: absolute;
    bottom: -4px;
    left: 0;
    background-color: var(--color-accent);
    transition: width 0.3s ease;
}

nav a:hover::after{
    width: 100%;
}


/*---MENU HAMBURGUESA---*/

.hamburguer{
    all: unset; /*Borrar todos los estilos por defecto*/
    display: none;
    flex-direction: column;
    gap: 5px;
}

.hamburguer span{
    display: block;
    width: 25px;
    height: 2px;
    background-color: var(--color-accent);
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.hamburguer.active span:nth-child(1){
    transform: translateY(7px) rotate(45deg);
}

.hamburguer.active span:nth-child(2){
    opacity: 0;
}

.hamburguer.active span:nth-child(3){
    transform: translateY(-7px) rotate(-45deg);
}

/*----RESPONSIVE HAMBURGUER---*/

@media (max-width: 768px){
    .hamburguer{
        display: flex;
    }

    nav{
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        position: absolute;
        transition: max-height 0.3s ease;
    }

    nav.active{
        max-height: 300px;
        opacity: 1;
        background-color: var(--color-header);
        width: 100%;
        left: 0;
        top: 100%;
    }

    .menu-nav ul{
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 0.85rem;
    }

    .menu-nav a{
        padding: 0.5rem 1rem;
        display: block;
    }
}


/*---HERO SECTION---*/

.section-container{
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

#hero .section-container{
    min-height: 80vh;
    display: flex;
    align-items: center;
    gap: 2rem;
}

.hero-container{
    flex: 1;
}

.image-hero{
    flex: 1;
}

.hero-container h1{
    font-size: 4rem;
    font-weight: bold;
    line-height: 1.3;
    color: var(--color-header);
}

.hero-container p{
    margin-top: 1rem;
    font-size: 1.1rem;
    color: var(--text-color-primary);
}

button{
    border: none;
    padding: 1rem 2rem;
    margin-top: 1rem;
    background-color: var(--color-button);
    border-radius: 15px;
    color: var(--text-color-secondary);
    font-family: var(--font-secondary);
    font-weight: bold;
    font-size: 1rem;
    transition: background-color 0.3s ease;
    cursor: pointer;
}

button:hover{
    background-color: var(--color-hover);
}

/*---RESPONSIVE HERO---*/

@media (max-width: 768px){
    #hero .section-container{
        flex-direction: column;
    }

    .image-hero{
        max-width: 100%;
        width: 60%;
        order: -1;
    }

    .hero-container,
    .hero-container p{
        text-align: center;
    }
}

@media (max-width: 480px){
    .hero-container h1{
        font-size: 2.5rem;
    }

    .hero-container p{
        font-size: 1rem;

    }
}


/*----SECTION PRODUCTS---*/

#products .section-container{
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

#products .section-container h2{
    grid-column: 1/ -1;
}

article{
    background-color: var(--card-bg);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--box-shadow);
}

article img{
    width: 100%;
    height: 250px;
}

article h3,
article span{
    padding: 0.85rem;
}

article span{
    margin-top: 0.5rem;
    display: block;
}


/*-----SECTION ABOUT----*/

#about .section-container{
    padding: 2rem;
}

.about-container{
    display: flex;
    align-items: center;
    gap: 2rem;
}

.about-container img{
    height: 350px;
    border-radius: 15px;
    box-shadow: var(--box-shadow);
    flex: 1;
}

.about-container p{
    flex: 1;
}

/*---RESPONSIVE ABOUT---*/
@media (max-width: 768px){
    .about-container{
        flex-direction: column;
    }

    .about-container img{
        max-width: 100%;
        width: 60%;
    }

    .about-container p{
        text-align: center;
    }
}

@media (max-width: 480px){
    .about-container img{
        max-width: 100%;
        width: 80%;
    }
}


/*----TESTIMONIALS SECTION---*/

.testimonies-container{
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    margin: 0 auto;
    gap: 2rem;
}

#testimonies article{
    display: flex;
    flex-direction: column;
    padding: 1rem;
    background-color: var(--card-bg);
    border-radius: 20px;
    box-shadow: var(--box-shadow);
}

.testimonies-container img{
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin-bottom: 1rem;
}

.reviewer-name{
    font-weight: bold;
    color: var(--color-header);
}

.testimonies-container p,
.testimonies-container blockquote{
    margin-bottom: 1rem;
}

blockquote{
    background-color: var(--bg-quote);
    padding: 1rem;
    border-radius: 15px;
}

blockquote svg{
    color: var(--color-hover);
}

blockquote span{
    display: flex;
    justify-content: center;
}

/*---RESPONSIVE TESTIMONIES---*/

@media (max-width: 768px){
    .testimonies-container article{
        max-width: 500px;
        display: flex;
        flex-direction: column;
        align-items: center;
        margin: 0 auto;
    }

    blockquote{
        text-align: center;
    }
}

/*----SECTION VALUES----*/

.values-container{
    max-width: 800px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    margin: 0 auto;
    gap: 2rem;
}

.values{
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: var(--color-accent);
    padding: 2rem;
    border-radius: 20px;
    font-size: 1.2rem;
    color: var(--color-header);
    box-shadow: var(--box-shadow);
}

.values svg{
    width: 60px;
    height: 70px;
}


/*----SECTION CONTACT---*/

.contact-form{
    max-width: 700px;
    background-color: var(--card-bg);
    border-radius: 15px;
    margin: 0 auto;
    padding: 1rem;
    box-shadow: var(--box-shadow);
}

form{
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
}

form input{
    width: 100%;
    padding: 0.5rem 1rem;
    outline: none;
    border-radius: 15px;
    border: 1px solid var(--color-accent);
}

form textarea{
    height: 200px;
    resize: none;
    outline: none;
    border: 1px solid var(--color-accent);
    border-radius: 15px;
    padding: 1rem;
}

form input:focus,
form textarea:focus{
    border-color: var(--color-hover);
}

form input::placeholder,
form textarea::placeholder{
    font-family: var(--font-secondary);
}

/*----FOOTER----*/

footer{
    padding: 3rem 1rem;
    background-color: var(--color-footer);
}

.container-footer{
    max-width: 1200px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    align-items: flex-start;
    margin: 0 auto;
    gap: 2rem;
    color: var(--text-color-secondary);
}

.footer-brand{
    display: flex;
    flex-direction: column;
}

.footer-logo{
    display: flex;
    align-items: center;
}

.footer-logo span{
    padding: 1rem;
}

.footer-brand svg{
    width: 50px;
    height: 60px;
}

.footer-brand p{
    margin-bottom: 1rem;
}

.social-links{
    display: flex;
    gap: 1rem;
}

.social-links a{
    text-decoration: none;
    color: var(--text-color-secondary);
    transition: color 0.3s ease;
}

.social-links a svg{
    width: 20px;
    height: 30px;
}

.social-links a:hover{
    color: var(--color-hover);
}

.footer-visit h2{
    margin-bottom: 1rem;
}

.footer-newsletter{
    display: flex;
    flex-direction: column;
}

.footer-form{
    display: flex;
    align-items: center;
    gap: 1rem;
}

.footer-form input{
    flex: 1;
    padding: 0.5rem 1rem;
    outline: none;
    border-radius: 15px;
    border: 1px solid var(--color-accent);
}

.btn-newsletter{
    margin-top: 0;
    padding: 0.75rem 0.85rem;
}

.footer-up{
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.footer-up a {
    color: var(--color-accent);
}

.footer-up.visible{
    display: block;
    opacity: 1;
    pointer-events: auto;
}

.up-container{
    background-color: var(--color-button);
    padding: 0.85rem;
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.up-container:hover{
    background-color: var(--color-hover);
}

.container-footer small{
    text-align: center;
}

.copyrigth{
    display: block;
    text-align: center;
    padding: 1rem;
    color: var(--color-button);
}

.copyrigth a{
    text-decoration: none;
    color: var(--color-button);
    transition: color 0.3s ease;
}

.copyrigth a:hover{
    color: var(--color-accent);
}


/*----RESPONSIVE FOOTER---*/

@media (max-width: 768px){
    .container-footer{
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-logo,
    .social-links,
    .footer-form{
        justify-content: center;
    }

    .footer-newsletter{
        max-width: 300px;
        margin: 0 auto;
    }

    .footer-newsletter h2{
        margin-bottom: 1rem;
    }
}

@media (max-width: 480px){
    .up-container{
        padding: 0.5rem;
    }
}