:root {
    --bg-body: rgba(209, 192, 192, 0.863);
    --text-body: black;

    --bg-header: rgb(111, 111, 161);
    --text-header: black;

    --bg-main: black;
    --text-main: white;

    --section: rgb(111,111,161);
    --text-section: black;

    --bg-article: black;
    --article-text: white;

    --bg-footer: var(--bg-header);
    --text-footer:var(--text-header);

    --bg-aside: black;
    --text-aside: white;

}


main {
    background-color: white;
    color: var(--text-main);
    padding: 1rem;
}
body {
    font-family: Arial, sans-serif;
    background-color: var(--bg-body);
    color: var(--text-body);
    margin: 0;
    padding: 0;
    overflow-wrap: break-word;
    word-break: break-word;
}


header {
    display: flex;
    flex-direction: column;      
    justify-content: flex-end;  
    align-items: center;         
    height: 15rem auto;               
    background-image: url("./img/fondo.png");
    background-size: cover;
    background-repeat: no-repeat;
    background-position: top center;
    padding-bottom: 20px;        
}



nav {
    width: 80%;
    padding: 10px;
    display: flex;
    justify-content: space-around;
    gap: 25px;
    background-color: azure;
}

nav a {
    color: black;
    text-decoration: none;
    font-weight: bold;
}

#about-me {
    text-align: center;
    background-image: url("./img/beige.png");
    color: black;
}

#articles-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);   
    gap: 20px;         
    justify-content: center; 
    padding: 1rem;  
}



article {
    padding: 0.8rem;
    border: 2px solid black;  
    padding: 15px;              
    border-radius: 10px;
    background-color: rgb(243, 242, 231);
    color:rgb(5, 5, 5);
    align-items: center;
    
}

#articles-container article {
    transition: transform 0.5s, box-shadow 0.5s;
}

#articles-container article:hover {
    transform: translateY(-20px);
    box-shadow: 0px 20px 30px rgba(0, 0, 0, 0.473);
}



.photos {
    max-width: 100%;
    width: 50%;
    height: auto;
    object-fit: cover;   /* recorta sin deformar */
    border-radius: 10px; 
}

hr {
    border: none;
    border-top: 2px solid black;
    margin: 20px 0;
}

#proyects {
    padding: 10px;
    background-image: url(img/beige.png);   
    color: black;

}

#proyects article {
    margin-bottom: 20px;
    background-color: black;
    color: antiquewhite;

    
}

#proyects article a{
    text-decoration: none;
}

#proyects-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.2rem;

}

#proyects-container article{
    transition: 0.5s; box-shadow: 0.5s;
}

#proyects-container article:hover{
    transform: scale(1.1);
    box-shadow: 0 10px 10px #ffebcd;
    background-color: rgb(88, 88, 128);

}

#proyects {
    text-align: center;
    overflow-wrap: break-word;
    word-break: break-word;
}



#contact-me {
    background-color: black;
    color:antiquewhite;
    padding-left: 2rem;
    padding-right: 2rem;
    padding-bottom: 0.5rem;
    border-radius: 10px;

}

#contactme {
    text-align: center;
    
}

#subtitle{
    text-align: center;

}

.contact-container article{
    margin-bottom: 20px;
    background-image: url(./img/beige.png);
    color: black;
}



section {
    margin: 0.5rem;
}

/*PEEEETTTSSSS*/

#pets nav {
    width: 100%;
}


#pets-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100%, 1fr));
    gap: 1rem;
    background-color: white;
    max-width: 100%;

}

.card{
    transition: transform 0.5seg, box-shadow 0.5seg;
    background-color: brown;
    gap: 2rem;
    display: flex;
    text-align: center;
    max-width: 100%;
}


.card img{
    max-width: 100%;
    height: auto;
}

footer {
    text-align: center;
    border: 2px black solid;
    border-radius: 5px;
    padding: 25px;
    background-image: url("./img/fondo.png");

}




.card:hover{
    transform:scale(1.0);
    box-shadow: 0px 20px 30px rgba(0, 0, 0, 0.473);
}




/*Responsive*/

/*mobile first*/



@media (max-width: 479px) {
    nav {
        flex-direction: column;
        align-items: center;
    }


    #articles-container {
        grid-template-columns: 1fr 1fr;
    }

    .photos {
        max-width: 100%;
        height: auto;
    }

    #proyects-container {
    grid-template-columns: repeat(auto-fit, minmax(100%, 1fr));
    gap: 1.2rem;
        }

    .contact-list {
        padding-left: 0.2rem;
        

    }


    .card {
        display: flex;
        flex-direction: column;
        max-width: 100%;
        height: auto;

    } 

    .card img {
        max-width: 100%;
        height: auto;
    }


    .form {
        display: flex;
        flex-direction: column;
    }

    .form input, .form textarea {
        width: 100%;
        box-sizing: border-box;
    }
}

/*tablets*/
@media (min-width: 480px) and (max-width: 767px) {
    #articles-container {
        grid-template-columns: repeat(3, 1fr);
    }

    .photos {
        max-width: 100%;
        height: auto;
    }

    #pets-section {
        grid-template-columns: repeat(2, 1fr);  
    }



    .card {
    display: flex;
    flex-direction: column;
}
}

/*desktops*/
@media (min-width: 768px) {
    #articles-container {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }

    #pets-section {
        grid-template-columns: repeat(3, 1fr);  
    }

}