/* Base styles */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
    color: #333;
}

header {
    background-color: #355E3B; /* Forest Green */
    color: white;
    padding: 10px 20px;
    text-align: center;
}

main {
    padding: 20px;
}

img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

/* Recipe Details Page */
#recipe-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Image and details alignment for larger screens */
@media (min-width: 768px) {
    #recipe-container {
        flex-direction: row;
        align-items: flex-start;
    }

    #recipe-details img {
        max-width: 300px;
        max-height: 300px;
        object-fit: cover;
    }

    #recipe-details {
        flex: 1;
        margin-left: 20px;
    }
}

/* Center the "Zum Rezept" link */
#recipe-details a {
    text-decoration: none;
    color: #355E3B;
    display: block;
    text-align: center;
    margin-top: 10px;
    font-weight: bold;
}

#recipe-details a:hover {
    text-decoration: underline;
}

/* Responsive Form */
form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 400px;
    margin: 0 auto;
}

input, select, button {
    width: 100%;
    padding: 10px;
    margin: 0;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 16px;
}

button {
    background-color: #355E3B;
    color: white;
    border: none;
    cursor: pointer;
}

button:hover {
    background-color: #2A4A30;
}

/* Search Results */
.results {
    margin-top: 20px;
}

.recipe {
    display: flex;
    flex-direction: column;
    background: white;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 15px;
}

.recipe img {
    max-width: 100%;
    border-radius: 4px;
}

.recipe-details {
    margin-top: 10px;
}

.recipe-details h3 {
    margin: 0 0 10px;
    color: #355E3B;
}

.recipe-details a {
    text-decoration: none;
    color: #355E3B;
}

.recipe-details a:hover {
    text-decoration: underline;
}

/* Adjustments for small screens */
@media (max-width: 768px) {
    #recipe-details {
        text-align: center;
    }

    #recipe-details h2 {
        font-size: 1.5rem;
    }

    form {
        padding: 10px;
    }

    .recipe {
        flex-direction: column;
        text-align: center;
    }

    .recipe img {
        margin: 0 auto 10px;
    }

    .recipe-details {
        text-align: center;
    }
}
