@import url('https://fonts.googleapis.com/css2?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');

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

body{
    font-family: Arial, sans-serif;
    background-color: #dbd7d3;
    padding: 20px;
}

header{
    width: 100%;
    height: 4rem;
    background-color: #5e6472;
    margin-bottom: 1.4rem;
    border-radius: 1rem;
    border: 1px solid black;
    display: flex;
    justify-content: center;
    
}

h1{
    margin: auto;
}

.categoria{
    margin-bottom: 40px;
}

.categoria h2{
    margin-bottom: 15px;
    text-align: center;
    margin: auto;
}

h2{
    padding-bottom: 0.5rem;
    color: rgb(23, 23, 23);
    font-weight: 700;
    font-size: 2rem;
    font-family: 'Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif;
}

.platos{
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 15px;
}

.plato {
    position: relative;
    background-color: white;
    width: 100%;
    height: 100%;
    border-radius: 0.6rem;
    overflow: hidden;
}

.plato::before {
    content: "🔍";
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 18px;
    opacity: 0.8;
}

.plato::after {
    content: "HOW TO COOK?";
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.6);
    color: white;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
    cursor: pointer;
}

.plato:hover::after {
    opacity: 1;
}

.plato:hover{
    transform: scale(1.05);
}

.plato img {
    width: 100%;
    border-radius: 6px;
}

.plato h4{
    margin: auto;
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 15px;
    text-align: center;
}

/* Modal */

.modal{
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    overflow: hidden;
}

.modal-content {
    background: white;
    max-width: 600px;
    max-height: 80vh;
    margin: 40px auto;
    padding: 20px;
    border-radius: 10px;
    position: relative;
    overflow: auto;
}

.modal-content img {
    width: 100%;
    border-radius: 6px;
    margin: 15px 0;
}

#cerrar {
    position: absolute;
    top: 10px;
    right: 10px;
    border: none;
    background: none;
    font-size: 18px;
    cursor: pointer;
}