/* Reset and body */
* {
    box-sizing: border-box; /* Ensure padding/margin doesn't break layout */
}

body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f7f7f7;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-x: hidden; /* Prevent horizontal scroll */
}

/* Header */
header {
    background-color: #ff6f61;
    color: white;
    padding: 15px 20px;
    text-align: center;
    width: 100%;
}

nav a {
    color: white;
    margin: 0 10px;
    text-decoration: none;
    font-weight: bold;
}

nav a:hover {
    text-decoration: underline;
}

/* Main container */
main {
    width: 100%;
    max-width: 1200px;
    padding: 20px;
    box-sizing: border-box;
}

/* Footer */
footer {
    background-color: #333;
    color: white;
    text-align: center;
    padding: 10px;
    width: 100%;
}

/* Cards container */
#recipeContainer {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

/* Recipe Card */
.recipeCard {
    width: 300px;
    background-color: #fff;
    border: 3px solid #ff6f61;
    border-radius: 12px;
    box-shadow: 6px 6px 20px rgba(0,0,0,0.3);
    padding: 20px;
    box-sizing: border-box;
    margin-bottom: 20px;
    transition: transform 0.3s, box-shadow 0.3s;
    text-align: center;
}

.recipeCard:hover {
    transform: translateY(-5px);
    box-shadow: 10px 10px 25px rgba(0,0,0,0.4);
}

/* Image */
.recipeCard img.recipeImage {
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 10px;
}

/* Title & text */
.recipeCard h3 {
    margin-top: 0;
}

.recipeCard p {
    margin: 5px 0;
}

/* Buttons */
.recipeCard button {
    margin-top: 5px;
    margin-right: 5px;
    background-color: #ff6f61;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 5px;
    cursor: pointer;
}

.recipeCard button:hover {
    background-color: #e65b50;
}

/* Ingredient & instruction lists */
.ingredientsList, .instructionsList {
    margin-top: 10px;
    padding: 10px;
    background-color: #f1f1f1;
    border-radius: 5px;
    width: 100%;
}

.ingredientsList ul, .instructionsList ol {
    margin: 0;
    padding-left: 20px;
}

.ingredientsList button, .instructionsList button {
    margin-top: 5px;
}

/* Responsive cards */
@media (max-width: 768px) {
    #recipeContainer {
        flex-direction: column;
        align-items: center;
    }

    .recipeCard {
        width: 90%;
    }
}
