/* Reset default browser styling */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    color: #333;
    background-color: #f0f0f0;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background-color: #333;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

.logo {
    font-size: 24px;
    color: #ffa500;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 20px;
}

nav ul li a {
    text-decoration: none;
    color: #fff;
    transition: color 0.3s;
}
/* Basic styling for the logout link */
#logoutLink {
    background-color: #00f;; /* Red background color */
    color: white;              /* White text color */
    text-decoration: none;     /* Remove underline */
    border-radius: 4px;        /* Rounded corners */
    padding: 10px 20px;        /* Add some padding */
    font-size: 16px;           /* Increase font size */
    cursor: pointer;           /* Pointer cursor on hover */
    transition: background-color 0.3s ease, color 0.3s ease; /* Smooth transition effect */
}

/* Hover effect */
#logoutLink:hover {
    background-color: #c82333; /* Darker red background on hover */
    color: #fff;               /* Ensure text color stays white */
}

/* Focus effect */
#logoutLink:focus {
    outline: none;             /* Remove default outline */
    box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.5); /* Add a subtle shadow for focus */
}


.landing-page {
    height: 100vh;
    background: url('images/recipeimge.jpg') no-repeat center center/cover;
    display: flex;
    justify-content: center;
    align-items: center;
    padding-top: 60px; 
    position: relative;
    background-size: cover;
}

.landing-page::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5); 
    z-index: 1;
}

.welcome-container {
    position: relative;
    z-index: 2;
    background-color: rgba(0, 0, 0, 0.5); 
    padding: 40px;
    text-align: center;
    border-radius: 10px;
}

.welcome-container h1 {
    font-size: 36px;
    color: #ffa500;
    margin-bottom: 20px;
}

.welcome-container p {
    color: white;
    font-size: 16px;
    margin-bottom: 30px;
}

.enjoy-button {
    display: inline-block;
    padding: 10px 20px;
    font-size: 16px;
    color: #fff;
    background-color: #00f;
    border-radius: 5px;
    text-decoration: none;
    transition: background-color 0.3s, transform 0.3s;
}

.enjoy-button:hover {
    background-color: #ffa500;
    transform: scale(1.1);
}



.recipes-section {
    padding: 80px 20px; /* Adjust padding as needed */
    background-color: #fff;
}

.recipes-header {
    text-align: center;
    margin-bottom: 40px;
}

.recipes-header h2 {
    font-size: 28px;
    color: #333;
    margin-bottom: 20px;
}

.search-bar {
    margin-bottom: 20px;
    text-align: center;
}

#searchInput {
    width: 300px;
    padding: 10px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 4px;
    margin-right: 10px;
}

#searchButton {
    padding: 10px 20px;
    font-size: 16px;
    background-color: #00f;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.3s;
}

#searchButton:hover {
    background-color: #ffa500;
    transform: scale(1.1);
}

.hidden {
    /*display: none;*/
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease-out;
}
.add-recipe-section {
    max-height: 0;
    transition: max-height 0.5s ease-in;
}

.add-recipe-section.open {
    max-height: 1000px; /* Adjust this value to the maximum expected height of the section */
}
/*#addRecipeSection {
    transition: max-height 0.5s ease-in;
}*/

#addRecipeLink {
    padding: 8px 16px;
    font-size: 14px;
    color: #fff;
    background-color: #00f;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-align: center;
    display: inline-block;
    transition: background-color 0.3s, transform 0.3s;
    text-decoration: none; /* Remove underline */
}

#addRecipeLink:hover {
    background-color: #ffa500;
    transform: scale(1.1);
}


.recipe-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.recipe-link {
    padding: 10px 20px;
    font-size: 16px;
    color: #333;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s, color 0.3s;
}

.recipe-link.active {
    background-color: #00f;
    color: #fff;
}

.recipe-link:hover {
    background-color: #ffa500;
    color: #fff;
}

.recipe-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.recipe {
    background-color: #fff;
    padding: 20px;
    border: 1px solid #ccc;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
}

.recipe .recipe-image {
    width: 100%;
    height: 200px;
    background-color: #ddd;
    margin-bottom: 10px;
    border-radius: 8px;
    overflow: hidden; /* Ensure image doesn't overflow its container */
}

.recipe .recipe-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Maintain aspect ratio and cover entire space */
}

.recipe .recipe-details {
    flex: 1; /* Expand to fill remaining space */
}

.recipe .recipe-category {
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 5px;
    color: #00f; /* Adjust category color as needed */
}

.recipe .recipe-name {
    font-size: 18px;
    margin-bottom: 10px;
}

.recipe .recipe-ingredients {
    width: 100%;
    height: 100px;
    margin-bottom: 10px;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    overflow-y: auto; /* Allow scrolling if content exceeds container */
}

.recipe .recipe-actions {
    margin-top: auto; /* Push actions to bottom */
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.recipe .recipe-actions button {
    padding: 8px 16px;
    font-size: 14px;
    color: #fff;
    background-color: #00f;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.3s;
}

.recipe .recipe-actions button:hover {
    background-color: #ffa500;
    transform: scale(1.1);
}


/* Base Styles */
.add-recipe-section {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease-in-out;
}

.add-recipe-section.hidden {
    display: none;
}

.add-recipe-section h2 {
    text-align: center;
    color: #333;
    margin-bottom: 20px;
}

.add-recipe-section .form-group {
    margin-bottom: 15px;
}

.add-recipe-section .form-group label {
    display: block;
    font-size: 16px;
    color: #555;
    margin-bottom: 5px;
}

.add-recipe-section .form-group input,
.add-recipe-section .form-group textarea,
.add-recipe-section .form-group select {
    width: 100%;
    padding: 10px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-sizing: border-box;
}

.add-recipe-section .form-group textarea {
    resize: vertical;
}

.add-recipe-section button {
    display: block;
    width: 100%;
    padding: 10px;
    font-size: 18px;
    color: #fff;
    background-color: #007bff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.add-recipe-section button:hover {
    background-color: #0056b3;
}



.contact-container {
    text-align: center;
    padding: 40px 20px;
    background-color: #333;
    color: #fff;
}

.contact-container h2 {
    font-size: 28px;
    margin-bottom: 20px;
}

.contact-container ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.contact-container ul li {
    font-size: 16px;
}

.social-icon {
    font-size: 24px;
    color: #fff;
    transition: color 0.3s;
}

.social-icon:hover {
    color: #00f;
}

#aboutButton {
    padding: 10px 20px;
    background-color: #4CAF50;
    color: white;
    border: none;
    cursor: pointer;
}

#aboutButton:hover {
    background-color: #45a049;
}

#mealContainer {
   /* display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 20px;*/
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* Default to 3 recipes per row */
    gap: 20px;
}

.meal {
    border: 1px solid #ccc;
    padding: 10px;
    width: 100%;
    box-sizing: border-box;
}

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


/* Header */
header:hover {
    background-color: #444; /* Slightly lighter shade on hover */
}

.logo:hover {
    transform: rotate(-10deg); /* Rotate logo on hover */
}

nav ul li a:hover {
    color: #00f; /* Blueish color */
    transform: scale(1.1); /* Scale up on hover */
}

/* Landing Page */
.landing-page {
    background: url('images/recipeimge.jpg') no-repeat center center/cover;
    animation: fadeIn 2s ease-in-out;
}

.welcome-container {
    background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent background */
    animation: bounceIn 1s ease-out;
}

.welcome-container h1 {
    animation: fadeInUp 1s ease-out;
}

.welcome-container p {
    animation: fadeInUp 1.5s ease-out;
}

/* Buttons */
.enjoy-button:hover,
#searchButton:hover,
#addRecipeLink:hover {
    background-color: #ffa500;
    transform: scale(1.1);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2); /* Add shadow on hover */
}

/* Add Recipe Section */
.add-recipe-section {
    transition: max-height 0.5s ease-in;
    background-color: #fff; /* White background for contrast */
    border: 1px solid #ddd;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.add-recipe-section.open {
    max-height: 1000px; /* Adjust this value to the maximum expected height of the section */
}

/* Recipe Links */
.recipe-link.active {
    background-color: #00f;
    color: #fff;
}

.recipe-link:hover {
    background-color: #ffa500;
    color: #fff;
    transform: scale(1.05); /* Slightly scale up on hover */
}

/* Recipe Grid */
.recipe-grid {
    animation: fadeIn 1s ease-out;
}

.recipe:hover {
    transform: scale(1.02); /* Slightly scale up on hover */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2); /* Enhance shadow on hover */
}

.recipe .recipe-image:hover {
    transform: scale(1.05); /* Slightly scale up image on hover */
}

.recipe .recipe-category:hover {
    color: #ffa500; /* Change color on hover */
}

.recipe .recipe-name:hover {
    color: #00f; /* Change color on hover */
}


@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounceIn {
    from {
        opacity: 0;
        transform: scale(0.5);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Modal styling */
.modal {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 1; /* Sit on top */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: auto; /* Enable scroll if needed */
    background-color: rgb(0,0,0); /* Fallback color */
    background-color: rgba(0,0,0,0.4); /* Black w/ opacity */
}

.modal-content {
    background-color: #fefefe;
    margin: 15% auto; /* 15% from the top and centered */
    padding: 20px;
    border: 1px solid #888;
    width: 80%; /* Could be more or less, depending on screen size */
}

.close-button {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.close-button:hover,
.close-button:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

.modal-recipe-image img {
    max-width: 100%;
}

.modal-recipe-details {
    margin-top: 20px;
}

.modal-recipe-details > div {
    margin-bottom: 10px;
}

.add-to-library-button {
    margin-top: 20px;
    padding: 10px 20px;
    background-color: #28a745;
    color: white;
    border: none;
    cursor: pointer;
}

.add-to-library-button:hover {
    background-color: #218838;
}

/* Recipe card styling */
.recipe {
    margin: 20px; /* Add margin to each recipe card */
    border: 1px solid #ddd;
    padding: 15px;
    background-color: #fff;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

.recipe-image img {
    max-width: 100%;
    border-radius: 5px;
}

.recipe-details {
    margin-top: 10px;
}

.recipe-category {
    font-weight: bold;
    color: #007bff;
}

.recipe-ingredients,
.recipe-description,
.recipe-cookingProcess {
    margin-top: 10px;
}

/* Sticky footer */
body, html {
    height: 100%;
    margin: 0;
    display: flex;
    flex-direction: column;
}

body {
    display: flex;
    flex-direction: column;
}

header, footer {
    flex-shrink: 0;
}

main {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Footer styling */
footer {
    background-color: #333;
    color: #fff;
    padding: 20px 0;
    text-align: center;
}

footer .contact-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

footer ul {
    list-style: none;
    padding: 0;
}

footer ul li {
    margin: 10px 0;
}

footer ul li a {
    color: #fff;
    text-decoration: none;
}

footer ul li a:hover {
    text-decoration: underline;
}

/* Existing CSS */

/* Recipe card styling */
.recipe {
    margin: 20px; /* Add margin to each recipe card */
    border: 1px solid #ddd;
    padding: 15px;
    background-color: #fff;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

.recipe-image img {
    max-width: 100%;
    border-radius: 5px;
}

.recipe-details {
    margin-top: 10px;
}

.recipe-category {
    font-weight: bold;
    color: #007bff;
}

.recipe-ingredients,
.recipe-description,
.recipe-cookingProcess {
    margin-top: 10px;
}

/* Sticky footer and grid adjustments */
body, html {
    height: 100%;
    margin: 0;
    display: flex;
    flex-direction: column;
}

body {
    display: flex;
    flex-direction: column;
}

header, footer {
    flex-shrink: 0;
}

main {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding-top: 60px; /* Adjust padding to ensure content doesn't overlap with navbar */
}

.recipe-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    padding: 20px; /* Add padding for better spacing */
    animation: fadeIn 1s ease-out;
}

/* Footer styling */
footer {
    background-color: #333;
    color: #fff;
    padding: 20px 0;
    text-align: center;
    margin-top: auto; /* Ensure footer stays at the bottom */
}

footer .contact-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

footer ul {
    list-style: none;
    padding: 0;
}

footer ul li {
    margin: 10px 0;
}

footer ul li a {
    color: #fff;
    text-decoration: none;
}

footer ul li a:hover {
    text-decoration: underline;
}

/* Modal styling */
.modal {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 1; /* Sit on top */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: auto; /* Enable scroll if needed */
    background-color: rgb(0,0,0); /* Fallback color */
    background-color: rgba(0,0,0,0.4); /* Black w/ opacity */
}

.modal-content {
    background-color: #fefefe;
    margin: 15% auto; /* 15% from the top and centered */
    padding: 20px;
    border: 1px solid #888;
    width: 80%; /* Could be more or less, depending on screen size */
}

.close-button {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.close-button:hover,
.close-button:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

.modal-recipe-image img {
    max-width: 100%;
}

.modal-recipe-details {
    margin-top: 20px;
}

.modal-recipe-details > div {
    margin-bottom: 10px;
}

.add-to-library-button {
    margin-top: 20px;
    padding: 10px 20px;
    background-color: #28a745;
    color: white;
    border: none;
    cursor: pointer;
}

.add-to-library-button:hover {
    background-color: #218838;
}

#about {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    margin: 0 auto;
    padding: 20px;
}

#aboutButton {
    background-color: #f0c040;
    color: #fff;
    border: none;
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;
    margin-bottom: 20px;
}

#aboutButton:hover {
    background-color: #d89a30;
}

#about h2 {
    font-size: 28px;
    color: #333;
    margin-bottom: 20px;
}
/* Responsive adjustments */
@media screen and (max-width: 768px) {
    header {
        flex-direction: column;
        align-items: flex-start;
    }

    nav ul {
        margin-top: 20px;
        flex-direction: column;
    }

    .welcome-container {
        padding: 20px;
    }

    .search-bar {
        display: block;
        margin: 20px auto;
    }

    .recipe-links {
        justify-content: center;
    }

    .recipe-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .add-recipe-section {
        padding: 15px;
    }

    .add-recipe-section h2 {
        font-size: 24px;
        margin-bottom: 15px;
    }

    .add-recipe-section .form-group label {
        font-size: 14px;
    }

    .add-recipe-section .form-group input,
    .add-recipe-section .form-group textarea,
    .add-recipe-section .form-group select {
        font-size: 14px;
        padding: 8px;
    }

    .add-recipe-section button {
        font-size: 16px;
        padding: 8px;
    }
    #mealContainer {
        grid-template-columns: repeat(2, 1fr); /* Two recipes per row on iPads */
        gap: 20px;
    }

    .meal {
        width: 100%; /* Full width on iPad, but adjusted to two per row */
        box-sizing: border-box;
    }

}
.form-group {
    margin-bottom: 1rem;
}

#dragDropArea {
    border: 2px dashed #aaa;
    padding: 1rem;
    text-align: center;
    cursor: pointer;
    background-color: #f9f9f9;
    border-radius: 4px;
}

#dragDropArea.drag-over {
    border-color: #00f;
    background-color: #e0f7ff;
}

#dragDropArea p {
    margin: 0;
    color: #555;
}


@media screen and (max-width: 480px) {
    .recipe-grid {
        grid-template-columns: 1fr;
    }
    .add-recipe-section {
        padding: 10px;
    }

    .add-recipe-section h2 {
        font-size: 20px;
        margin-bottom: 10px;
    }

    .add-recipe-section .form-group label {
        font-size: 12px;
    }

    .add-recipe-section .form-group input,
    .add-recipe-section .form-group textarea,
    .add-recipe-section .form-group select {
        font-size: 12px;
        padding: 6px;
    }

    .add-recipe-section button {
        font-size: 14px;
        padding: 6px;
    }
}


