@import url("https://fonts.googleapis.com/css2?family=Patrick+Hand&display=swap");

:root {
    --primary-color: #1b98e0;
    --secondary-color: #59c3c3;
    --text-dark: #333;
    --text-light: #ebebeb;
    --primary-font: Arial, Helvetica, sans-serif;
    --secondary-font: "Patrick Hand", cursive;
}

body {
    font-family: var(--primary-font);
    color: var(--text-dark);
    background-color: white;
    margin: 0;
    padding: 0;
    align-items: stretch;
}

main {
    width: 100%;
    margin: 0 auto;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

footer .social img {
    width: 30px;
    height: 30px;
}

.logo {
    display: flex;
    font-family: var(--secondary-font);               
    align-items: center;         
    justify-content: center;                     
}

.logo h1 {
    font-size: 3.5em;
    font-weight: 100;
}

.logo img {
    width: 80px;                 
    height: auto;
    margin-bottom: 37px;
}

.search {
    border-bottom: 2px solid #c3c2c2;
    padding-bottom: 1.2rem;
    margin-bottom: 1.3rem;
    width: 100%;
    display: flex;
    justify-content: center;
}

.search form {
    display: flex;
    align-items: stretch;  
    border: 1.5px solid var(--text-dark);
    border-radius: 6px;
    overflow: hidden;
    margin-left: 1.5rem;
    margin-right: 1.5rem;
    width: 100%;
}

.search input {
    flex: 1;
    padding-left: 5px;
    padding-top: 7px;
    padding-bottom: 7px;
    border: none;
    font-size: 1rem;
    outline: none;
    font-size: 20px;
}

.search button {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: white;
    border: none;
    border-left: 3px solid var(--text-dark);
}

.search button img {
    width: 2.2em;
    height: auto;
}

.recipe {
    display: flex;
    flex-direction: column;
    padding: 1.1rem;
    border-radius: 5px;
    border: 1.5px solid var(--text-dark);
    background-color: #fff;
    margin: 0rem auto;
    margin-left: 1.5rem;
    margin-right: 1.5rem;
    align-items: flex-start;
}

.recipe-info {
    margin-top: 0.6rem;
}

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

.recipe__tags {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    padding: 0;
    margin: 0;
    font-weight: bold;
    width: fit-content;
}

.recipe__tags li {
    display: inline-flex;      
    align-items: center;
    border: 1.5px solid var(--text-dark);
    padding: 0.3rem 0.7rem;    
    white-space: nowrap;       
}

.recipe h2 {
    font-family: var(--secondary-font);
    color: var(--primary-color);
    font-size: 35px;
    margin-top: 0.6rem;
    margin-bottom: 0rem;
}

.recipe__ratings {
    margin-top: 0rem;
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    letter-spacing: 0;
}

.recipe__description {
    margin-top: 0.25rem;
    margin-bottom: 0.25rem;
    color: #000;
}

footer {
    width: 100%;         
    padding: 1rem 0;         
    text-align: center;     
}

footer .social {
    display: flex;             
    justify-content: center;   
    gap: 0.3rem;
    margin-bottom: 0.3rem;  
    margin-top: 1.5rem;             
}

footer .social img {
    width: 3em;
    height: 3em;
}

footer a {
    color: var(--primary-color);
    text-decoration: none;
}

footer .attribution-link {
    font-size: 0.6em;
}

@media (max-width: 600px) {
    .recipe__description {
        display: none;
    }
}

@media (min-width: 600px) {
    .recipe{
        display: flex;
        flex-direction: row;    
        overflow: hidden;
    }

    .recipe__tags {
        margin-top: 0;
    }

    .recipe-info {
        display: flex;
        width: 100%;
        flex-direction: column;
        justify-content: flex-start;
        padding-left: 1.2rem;
        margin-top: 0;
    }

    .recipe-info h2 {
        margin-top: 1rem;
        font-size: 30px;
    }

    .recipe-info p {
        font-size: 20px;
    }

    footer {
        display: flex;
        justify-content: space-between;
        align-items: center;
        flex-direction: row-reverse;
        margin: 0 auto;
        width: 100%;
        padding-left: 1.5rem;  
        padding-right: 1.5rem;  
        box-sizing: border-box;
    }

    footer .social {
        justify-content: flex-end;
    }

    .recipe img {
        width: 60%;     
        height: auto;
        flex-shrink: 0;    
        border-radius: 5px;
    }
}

@media (min-width: 960px) {
    main, footer {
        max-width: 960px;       
    }
}