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

body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    background: linear-gradient(135deg, #f9f9f9, #e3e3e3);
    color: #333;
    padding: 20px 20px;
}

 Header Section 
header {
    background-color: #4CAF50;
    color: white;
    text-align: center;
    padding: 40px 20px;
    border-radius: 8px;
    margin-bottom: 40px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.banner h1 {
    font-size: 2.0em;
    font-weight: 700;
    letter-spacing: -1px;
    margin-bottom: 10px;

}

header p {
    font-size: 1.2em;
}

/* Recipe Finder Section */
#recipe-finder {
    padding: 40px;
    margin-bottom: 40px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
    text-align: center;
    
}
#recipe-filter {
    border-radius: 100px; /* Adjust the value as needed */
    padding: 15px;        /* Optional: Adds some space inside */
    border: 1px solid #ccc; /* Optional: Custom border style */
  }

#ingredient-form {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
}

#ingredient-form input {
    padding: 15px;
    font-size: 1em;
    border-radius: 100px;
    border: 2px solid #ddd;
    width: 60%;
    transition: border-color 0.3s ease;
}

#ingredient-form input:focus {
    border-color: #4CAF50;
}

#ingredient-form button {
    background-color: #4CAF50;
    color: white;
    padding: 15px 25px;
    font-size: 1.2em;
    border-radius: 100px;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#ingredient-form button:hover {
    background-color: #45a049;
}

/* Recipe Results */
#recipe-results {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
    justify-items: center;
    padding-top: 20px;
}

.recipe-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
    
}

.recipe-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

.recipe-card img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.recipe-card:hover img {
    transform: scale(1.1);
}

.recipe-card h3 {
    font-size: 1.5em;
    color: #333;
    margin: 15px 0;
}

.recipe-card p {
    font-size: 1em;
    color: #777;
    margin-bottom: 15px;
}

.recipe-card .nutrition {
    background: #e1e1e1;
    padding: 10px;
    border-radius: 6px;
    font-size: 0.9em;
    color: #333;
}

/* Meal Planner Section */
#meal-planner {
    padding: 40px;
    margin-bottom: 40px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}


#calendar {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 20px;
}

/* Calendar Grid for Large Screens */
#calendar {
    display: grid;
    grid-template-columns: repeat(7, 1fr); /* 7 columns for larger screens */
    gap: 20px;
}

/* Media Query for Small Screens */
@media screen and (max-width: 768px) {
    #calendar {
        grid-template-columns: 1fr; /* Switch to a single column */
    }
}



.day {
    background-color: #f1f1f1;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    position: relative;
    text-align: center;
    transition: background-color 0.3s ease;
}

.day:hover {
    background-color: #e1e1e1;
}

.day div {
    padding: 8px;
    background-color: #4CAF50;
    color: white;
    border-radius: 6px;
    margin-top: 10px;
    font-weight: 500;
}

.day p {
    margin-top: 20px;
    font-size: 0.9em;
    color: #777;
}

/* Recipe Modal (Pop-up) */
.modal {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.4);
    padding-top: 60px;
}
.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 30px;
    border: 1px solid #888;
    width: 70%;
    max-width: 700px;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.close-btn {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    position: absolute;
    top: 10px;
    right: 20px;
    cursor: pointer;
}

.close-btn:hover {
    color: rgb(195, 36, 36);
}

#recipe-name {
    font-size: 2em;
    color: #333;
    margin-bottom: 10px;
}

#recipe-description {
    font-size: 1.1em;
    color: #777;
    margin-bottom: 20px;
}

#recipe-ingredients,
#recipe-instructions {
    list-style: none;
    padding: 0;
  
}

#recipe-ingredients li,
#recipe-instructions li {
    font-size: 1.1em;
    color: #333;
    margin-bottom: 8px;
   
}

#recipe-nutrition {
    font-size: 1.2em;
    color: #4CAF50;
    font-weight: 600;
}

/* Footer */
footer {
    text-align: center;
    padding: 20px;
    background-color: #333;
    color: white;
    margin-top: 50px;
    border-radius: 10px;
}

#recipe-results {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
    justify-items: center;
    padding-top: 20px;
    max-height: 500px; /* Set maximum height */
    overflow-y: auto; /* Enable vertical scroll for overflow content */
    border: 1px solid #ddd; /* Optional: Add a border for better visualization */
    padding: 10px; /* Optional: Adjust padding for better alignment */
    background: #fff; /* Background for better readability */
}
/* About Symbol (Absolute Position at Top-Right) */
#about-symbol {
    position: absolute; /* Stays in the flow of the document */
    top: 30px; /* Distance from the top of the page */
    left: 30px; /* Distance from the right of the page */
    font-size: 1.8em;
    color: #fff;
   /* background: #4CAF50; 
    border: 2px solid #4CAF50;
    border-radius: 50%; */
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    /* box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); */
    transition: background-color 0.3s ease, color 0.3s ease;
}
#download-pdf {
    background-color: #4CAF50; /* Green background */
    color: white;
    padding: 15px 30px; /* Padding to make the button more prominent */
    font-size: 1.2em; /* Larger text for better readability */
    border-radius: 10px; /* Rounded corners for a smooth look */
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    margin-top: 30px; /* Space from the meal planner */
    display: block;
    margin-left: auto;
    margin-right: auto;
    width: 200px; /* Fixed width for better alignment */
    text-align: center;
}

#download-pdf:hover {
    background-color: #45a049; /* Darker green on hover */
    transform: translateY(-3px); /* Slightly lift the button when hovered */
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2); /* Adding a shadow to indicate focus */
}

#download-pdf:focus {
    outline: none;
    box-shadow: 0 0 8px 3px rgba(76, 175, 80, 0.5); /* Glow effect when focused */
}

#download-pdf:active {
    background-color: #388e3c; /* Even darker green when clicked */
    transform: translateY(0); /* Remove the lifted effect on .modal {
    display: none; /* Hide by default */
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.4); /* Dark overlay */
    padding-top: 60px;
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 30px;
    border: 1px solid #888;
    width: 70%;
    max-width: 700px;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.close-btn {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    position: absolute;
    top: 10px;
    right: 20px;
    cursor: pointer;
}

.close-btn:hover {
    color: rgb(195, 36, 36); /* Highlight effect */
}
/* Styling the banner section */
.banner {
    width: 100%; /* Full width */
    height: 200px; /* Adjust height as needed */
    background: url('yasir4.jpg') no-repeat center center; /* Add your image */
    background-size: cover; /* Ensures the image covers the entire section */
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgb(9, 7, 7); /* Text color */
    font-size: 24px; /* Adjust font size */
    font-weight: bold; /* Bold text */
    border-radius: 10px;
    margin-bottom: 40px;
    border-radius: 12px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}



/* Recipe Details Layout */
.recipe-details {
    display: flex;
    align-items: flex-start;
    gap: 200px;
    flex-direction: row-reverse; /* Reverse the order */
}

#recipe-image {
    width: 250px;
    height: 150px;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    margin-right: 100px;
    margin-top: 40px;
    
}

.remove-btn{
    border-radius: 7px;
    background-color: yellow;
}


@media screen and (max-width: 768px) {
    .recipe-details {
        display: flex;
        flex-direction: column; /* Stack items vertically */
        align-items: flex-start; /* Align content to the left */
        gap: 0; /* Ensure no additional space between elements */
    }

    #recipe-ingredients {
        order: 1;
        width: 100%; /* Full width for the ingredients */
        margin-bottom: 0; /* Remove extra margin below ingredients */
        padding: 0; /* Remove padding */
    }

    #recipe-image {
        order: 2;
        width: 300px; /* Fixed width for the image */
        height: 200px; /* Fixed height for the image */
        object-fit: cover; /* Ensure the image does not stretch */
        margin: 0; /* Remove any margins around the image */
    }

    .modal-content {
        width: 90%; /* Adjust modal width for smaller screens */
        padding: 20px;
    }
}
@media (max-width: 768px) {
    /* Adjust styles for smaller screens */
    .calendar {
      grid-template-columns: 1fr;
    }
    .recipe-card {
      cursor: grab;
    }
  }


  @media  screen and (max-width:768px) {
    .banner h1 {
        font-size: 0.5em;
        font-weight: 700;
        letter-spacing: -1px;
        margin-bottom: 10px;
       
    }
    
  }

  @media (min-width: 1024px) {
    .recipe-details {
      display: grid;
      grid-template-columns: auto 1fr; /* Image first, ingredients second */
      gap: 20px; /* Space between image and ingredients */
      align-items: start; /* Align content to the top */
    }
  
    #recipe-ingredients {
      display: block; /* Stack ingredients vertically */
      margin: 0;
      padding: 0;
      list-style: none; /* Remove bullet points */
      line-height: 1.5; /* Improve readability */
      text-align: left; /* Align text to the left */
    }
  
    #recipe-image {
      order: 2; /* Place the image on the right */
      width: 200px; /* Set a fixed width */
      height: 150px; /* Maintain aspect ratio */
      object-fit: cover; /* Ensure the image covers its container */
      margin: 0 auto; /* Center the image if needed */
      margin-top: 35px;
    }
  
    #recipe-preparation {
      grid-column: span 2; /* Preparation section spans both columns */
      margin-top: 20px; /* Add spacing above the preparation section */
    }
  }