@import url('https://fonts.googleapis.com/css2?family=Pacifico&family=Poppins:wght@400;600&display=swap');

/* Ingredient Menu Styles */
body {
  background-color: #7ffffff;
  font-family: 'Segoe UI', sans-serif;
  margin: 0;
  padding: 0;
}


h1 {
  padding: 20px;
  background-color: transparent;
  color: #7b3f61;
  text-align: center;
  font-family: 'Pacifico', cursive;
  font-size: 3.5rem;
}


/* Top nav bar for categories */
nav.ingredient-nav {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: visible;         /* ✅ was auto — allow dropdowns to escape */
  background-color: #f2f2f2;
  padding: 10px;
  gap: 15px;
  border-bottom: 1px solid #ddd;
  position: relative;
  z-index: 10;
  margin-bottom: 40px;
}


/* Dropdown wrapper */
.dropdown {
  position: relative;
  z-index: 20;
}

/* Dropdown button style */
.dropbtn {
  background-color: #800000;
  color: white;
  padding: 10px 16px;
  font-size: 16px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  white-space: nowrap;
}
@media (max-width: 768px) {
  .ingredient-nav {
    flex-wrap: wrap;
    justify-content: center;
  }

  .dropdown-content {
    min-width: 90vw;
    max-height: 300px;
  }

  .selected-box, 
  #selectedIngredients {
    padding: 20px 10px;
    margin: 20px auto;
    width: 90%;
  }

  .cta-button,
  .search-btn,
  #uploadBtn {
    font-size: 14px;
    padding: 10px 16px;
    width: 90%;
  }

  #recipes {
    grid-template-columns: 1fr !important;
  }

  h1 {
    font-size: 2rem;
  }
}
@media (max-width: 768px) {
  nav.ingredient-nav {
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 10px;
    padding: 10px;
    justify-content: flex-start;
    scrollbar-width: none; /* hide scrollbar on Firefox */
  }

  nav.ingredient-nav::-webkit-scrollbar {
    display: none; /* hide scrollbar on Chrome/Safari */
  }

  .dropbtn {
    font-size: 14px;
    padding: 8px 12px;
  }

  .dropdown-content {
    min-width: 250px;
    max-height: 300px;
    font-size: 13px;
    padding: 10px;
  }

  .sub-category summary {
    font-size: 11px;
  }

  .sub-category li {
    font-size: 11px;
    margin-bottom: 3px;
  }
}


/* Dropdown content panel */
.dropdown-content {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background-color: #ffffff;
  min-width: 300px;
  max-height: 500px;
  overflow-y: auto;
  border: 1px solid #ccc;
  padding: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  z-index: 9999;
}

/* Show dropdown on hover */
.dropdown:hover .dropdown-content {
  display: block;
}

/* Sub-category behavior */
details.sub-category {
  padding: 4px 0;
}

/* Sub-category summary text */
.sub-category summary {
  font-weight: bold;
  cursor: pointer;
  padding: 6px 0;
}

/* Subcategory list structure */
.sub-category ul {
  list-style: none;
  padding-left: 18px;
  margin: 5px 0;
}

/* Checkbox items */
.sub-category li {
  margin-bottom: 4px;
}

input[type="checkbox"] {
  margin-right: 8px;
}

/* Selected ingredients styling */
#selectedIngredients ul {
  padding-left: 20px;
  margin-top: 8px;
}

#selectedIngredients li {
  margin-bottom: 6px;
}

.hero {
  background-image: url('images/hero-placeholder.jpeg');
  background-size: cover;
  background-position: center;
  height: 100vh;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-overlay {
  background-color: rgba(0, 0, 0, 0.4); /* semi-transparent black overlay */
  text-align: center;
  padding: 40px;
  border-radius: 12px;
  color: #fff;
}



.hero-logo img {
  height: 30 /* smaller size */
  display: block;
  margin: 0 auto; /* centers the image */
}
.hero-logo {
  height: 30 !important;
  display: block !important;
  margin: 0 auto !important;
}
img.hero-logo {
  height: 30 !important;
  max-width: 50% !important;
  display: block !important;
  margin: 0 auto !important;
  padding: 0 !important;
}




.hero-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 10px;
}

.hero-subtitle {
  font-family: 'Lato', sans-serif;
  font-size: 18px;
  color: #ffffff;
  margin-top: 10px;
  text-align: center;
}

.cta-button {
    font-family: 'Poppins', sans-serif;
  font-size: 24px;
  letter-spacing: 1px;
  text-transform: uppercase;
  background-color: #7b3f61;
  color: white;
  padding: 12px 28px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(123, 63, 97, 0.3);
  transition: all 0.3s ease;
  position: relative;
  z-index: 1;
}
.cta-button::before {
  content: '';
  position: absolute;
  top: -5px;
  left: -5px;
  right: -5px;
  bottom: -5px;
  background: rgba(123, 63, 97, 0.2);
  filter: blur(10px);
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: 12px;
  z-index: -1;
}
.cta-button:hover {
  transform: scale(1.07);
  background-color: #6a3454;
}
.cta-button:hover::before {
  opacity: 1;
}
/* Subtitle text (like: "We’ll help you find something delicious...") */
.subtitle {
  font-family: 'Lato', sans-serif;
  font-size: 18px;
  color: #333;
}

/* Call-to-action button */
.cta-button {
   font-family: 'Poppins', sans-serif;
  font-size: 20px;
  background-color: #7b3f61;
  color: white;
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.cta-button:hover {
  transform: scale(1.05);
  background-color: #6a3454;
}
.ingredient-nav {
  display: flex;
  justify-content: center;
  gap: 20px;
  padding: 20px;
  background-color: rgb(247, 247, 247);
  flex-wrap: wrap;
}

.dropdown {
  position: relative;
}

.dropbtn {
   font-family: 'Poppins', sans-serif;
  font-size: 16px; /* Increased size */
  background-color: #fff;
  border: 1.5px solid #d7b158;
  padding: 10px 18px;
  color: #000;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: none; /* Makes only first letter capital */
}
.dropbtn::first-letter {
  text-transform: uppercase;
}


.dropbtn:hover {
  background-color: #f9f3e9;
  transform: scale(1.05);
}

.dropdown-content {
  display: none;
  position: absolute;
  top: 45px;
  left: 0;
  background-color: #fff;
  border: 1.5px solid #d7b158;
  border-radius: 10px;
  padding: 13px;
  min-width: 300px;
  max-height: 400px;
  overflow-y: auto;
  box-shadow: 0 8px 16px rgba(0,0,0,0.1);
  z-index: 9999;
}

.dropdown:hover .dropdown-content {
  display: block;
}

.sub-category summary {
  font-family: 'Lato', sans-serif;
  font-weight: bold;
  font-size: 12px; /* Smaller subtitle */
  padding: 5px 0;
  cursor: pointer;
  color: #333;
}

.sub-category ul {
  list-style: none;
  padding-left: 20px;
  margin: 4px 0;
}

.sub-category li {
  font-family: 'Lato', sans-serif;
  font-weight: normal;
  font-size: 12px;
  margin-bottom: 6px;
  color: #444;
}



/* Drop all triangles */
details.sub-category > summary {
  list-style: none;
}
details.sub-category > summary::-webkit-details-marker {
  display: none;
}
details.sub-category > summary::marker {
  display: none;
}

/* Dropdown menu tweaks */
.dropdown-content {
  background: white;
  border: 1.5px solid #d7b158;
  margin-top: 10px; /* Add spacing under button */
  padding: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Summary inside dropdown (sub-category) */
.sub-category > summary {
  font-family: 'Lato', sans-serif;
  font-weight: bold;
  font-size: 12px;
  margin: 4px 0;

  background: none;
  cursor: pointer;
}

/* Sub-sub items (ul > li) */
.sub-category ul {
  padding-left: 14px;
  margin-top: 4px;
}
.sub-category li {
  font-family: 'Lato', sans-serif;
  font-weight: normal;
  font-size: 13px;
  margin-bottom: 4px;
}
.sub-category summary {
  font-size: 12px;
  margin-bottom: 4px;
    padding: 4px 6px;  /* Less padding */
  margin: 2px 0;     /* Reduce vertical spacing */
}

.sub-category ul {
  padding-left: 12px;
  margin-top: 2px;
}

details > summary::before {
  content: '' !important;
  display: none !important;
}
details.sub-category > summary::before {
  content: '' !important;
  display: none !important;
}




.selected-box {
  border: 1.5px solid #d7b158;
  border-radius: 12px;
  background-color: #ffffff;
  max-width: 600px;
  margin: 40px auto;
  padding: 30px 20px 20px;
  text-align: center;
  position: relative;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.selected-icon {
  position: absolute;
  top: -25px;
  left: 50%;
  transform: translateX(-50%);
  background: white;
  padding: 5px 10px;
  border-radius: 50%;
}

.selected-icon img {
  height: 32px;
  width: 32px;
}

.selected-title {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 20px;
  color: #7b3f61;
  margin-bottom: 10px;
  border-bottom: 2px solid #d7b158;
  display: inline-block;
  padding-bottom: 4px;
}

#selectedIngredientsList {
  list-style: none;
  padding: 0;
  margin-top: 16px;
  font-family: 'Lato', sans-serif;
  color: #444;
  text-align: left;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

#selectedIngredientsList li {
  margin-bottom: 6px;
  font-size: 15px;
}
#selectedIngredients {
  border: 1.5px solid #d7b158;
  border-radius: 10px;
  background-color: #fff;
  padding: 30px 20px;
  max-width: 600px;
  margin: 40px auto;
  position: relative;
  text-align: center;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
}

/* Title */
h2 {
  font-family: 'Pacifico', cursive;
  color: #333;
  font-size: 28px;
  margin-bottom: 20px;
  position: relative;
}

/* Upload Button */
#uploadBtn {
  background-color: #7b3f61;
  color: white;
  font-family: 'Poppins', sans-serif;
  font-size: 16px;
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  box-shadow: 0 4px 10px rgba(123, 63, 97, 0.3);
  cursor: pointer;
  transition: all 0.3s ease;
  margin: 20px auto;
  display: inline-block;
}

#uploadBtn:hover {
  background-color: #6a3454;
  transform: scale(1.05);
}

/* Center the image icon on top */
#selectedIngredients .icon {
  position: absolute;
  top: -25px;
  left: 50%;
  transform: translateX(-50%);
  background-color: #fff;
  padding: 0 8px;
}

#selectedIngredients .icon img {
  height: 30px;
}
.search-btn {
  background-color: #7b3f61; /* purple */
  color: white;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  padding: 12px 28px;
  font-size: 16px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(128, 0, 128, 0.4);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.search-btn:hover {
  background-color: #a64ca6;
  transform: scale(1.05);
  box-shadow: 0 6px 16px rgba(128, 0, 128, 0.5);
}
/* Container for the selected ingredients box */
.selected-box {
  max-width: 600px;
  width: 100%;
  margin: 30px auto;
  padding: 20px;
  border: 1px solid #dcb23f;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  text-align: center;
  background: #fff;
}

/* Icon styling */
.selected-icon img {
  width: 40px;
  margin-bottom: 10px;
}

/* Header style */
.selected-box h2 {
  color: #800000;
  font-family: cursive;
}

/* Upload button style */
#uploadBtn {
  margin-top: 20px;
  background: #7b3f61;
  color: white;
  padding: 10px 20px;
  font-weight: bold;
  border: none;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  cursor: pointer;
}

#uploadBtn:hover {
  background-color: #a000a0;
}

/* Search button style */
.search-btn {
  background: #7b3f61;
  color: white;
  padding: 12px 24px;
  font-weight: bold;
  border: none;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  cursor: pointer;
}

.search-btn:hover {
  background-color: #a000a0;
}

/* Recipes grid layout */
#recipes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  padding: 20px;
  max-width: 1200px;
  margin: auto;
}

/* Pagination buttons */
#pagination {
  display: none;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
}

#pagination button {
  padding: 8px 16px;
  font-weight: bold;
  border-radius: 6px;
  border: 1px solid #ccc;
  background: #f4f4f4;
  cursor: pointer;
}

#pagination button:disabled {
  background: #ddd;
  cursor: not-allowed;
}
#uploadSection {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 30px;
}

#uploadBtn {
  background-color: #7b3f61;
  color: white;
  font-weight: bold;
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  cursor: pointer;
  transition: background-color 0.3s ease;
}

#uploadBtn:hover {
  background-color: #800080d9;
}

#spinner {
  margin-top: 10px;
  font-size: 14px;
  color: #555;
}

#uploadSection p {
  margin-top: 25px;
  text-align: center;
}
#detectedIngredientsSection h2 {
  text-align: center;
  color: black;
  font-weight: bold;
  margin-top: 10px;
  margin-bottom: 20px;
}
#parsedFatsecretResults {
  text-align: center;
  font-family: 'Lato', sans-serif;
  margin-top: 30px;
}

#parsedFatsecretResults h3 {
  color: #800080; /* Purple */
  font-size: 24px;
  font-weight: bold;
  text-shadow: 1px 1px 2px #ccc;
  margin-bottom: 20px;
}

#parsedFatsecretResults ul {
  list-style: none;
  padding: 0;
  display: inline-block;
  text-align: left;
}

#parsedFatsecretResults li {
  font-family: 'Lato', sans-serif;
  font-size: 16px;
  margin-bottom: 8px;
}
/* Target the Search Recipes button without changing HTML */
section > button[onclick="searchRecipes()"] {
  background-color: #7b3f61;
  color: white;
  font-family: 'Poppins', sans-serif;
  font-size: 18px;
  font-weight: 600;
  padding: 12px 24px;
  border: none;
  border-radius: 10px;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  transition: transform 0.2s ease, background-color 0.3s ease;
  display: block;
  margin: 30px auto 20px;
}

section > button[onclick="searchRecipes()"]:hover {
  background-color: #5e0b5b;
  transform: scale(1.05);
}
/* ====================
   MOBILE RESPONSIVE FIXES
   ==================== */
@media (max-width: 768px) {


  /* Ensure dropdown appears above everything */
  body, html, main, section, nav, .ingredient-nav {
	overflow: visible !important;
	/* [disabled]z-index: auto; */
  }

  /* Optional: reduce spacing in ingredients list */
  .sub-category li {
    font-size: 13px;
    margin-bottom: 4px;
  }

  .sub-category summary {
    font-size: 13px;
    padding: 4px 0;
  }

  /* Fix dropdown cutoff issues */
  .dropdown-content ul {
    padding: 0 10px;
  }
}
@media (max-width: 768px) {
  nav.ingredient-nav {
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 20px;
    overflow-x: hidden;
  }

  .dropdown {
    width: 100%;
    max-width: 300px;
  }

  .dropbtn {
    width: 100%;
    font-size: 16px;
    padding: 12px 20px;
    text-align: center;
  }

  .dropdown-content {
    position: static;
    width: 100%;
    border: 1px solid #d7b158;
    box-shadow: none;
    margin-top: 6px;
    padding: 10px;
    border-radius: 8px;
  }

  .dropdown:hover .dropdown-content {
    display: block;
  }
}
@media (max-width: 768px) {
  .hero {
    height: 100vh; /* Full viewport height to cover entire screen */
    padding: 0;
    flex-direction: column;
    text-align: center;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
  }

  .hero-overlay {
    padding: 20px;
    border-radius: 10px;
    background-color: rgba(0, 0, 0, 0.5); /* Keep contrast on text */
    max-width: 90%;
    margin: auto;
  }

  .hero-title {
    font-size: 1.8rem;
    line-height: 1.3;
    color: #d9b45e;
  }

  .hero-subtitle {
    font-size: 16px;
    margin-top: 12px;
    color: #fff;
  }

  .cta-button {
    font-size: 18px;
    padding: 10px 20px;
    margin-top: 20px;
  }

  .hero-logo {
    height: 60x;
    margin-bottom: 20px;
  }
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 30px;
  background-color: white;
  position: relative;
}

.menu-icon {
  display: none;
  font-size: 28px;
  cursor: pointer;
}

#menu-toggle {
  display: none;
}

.nav-links {
  display: flex;
  gap: 20px;
}

.nav-links a {
  text-decoration: none;
  font-family: 'Poppins', sans-serif;
  color: #7b3f61;
  font-weight: 600;
   padding: 8px 12px;
  transition: color 0.3s ease, transform 0.3s ease;
}


@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    flex-direction: column;
    background-color: white;
    padding: 20px;
    border-top: 1px solid #ddd;
    z-index: 999;
  }

  #menu-toggle:checked + .menu-icon + .nav-links {
    display: flex;
  }

  .menu-icon {
    display: block;
	color: #d9b45e;
  }
}
html {
  scroll-behavior: smooth;
}
.card-title {
  font-size: 16px;
  font-weight: bold;
  line-height: 1.3;
  height: 2.6em; /* 2 lines max */
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}


/* ========== Footer Styles ========== */
.site-footer {
  background-color: white;
  color: #7b3f61;
  font-family: 'Poppins', sans-serif;
  padding: 30px 20px;
  text-align: center;
  border-top: 1px solid #eee;
  margin-top: 40px;
}

.footer-container {
  max-width: 1000px;
  margin: 0 auto;
}

.footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 25px;
  margin-bottom: 15px;
}

.footer-links a {
  color: #7b3f61;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: #a64ca6;
}

.social-icons {
  margin: 20px 0;
}

.social-icons a {
  margin: 0 10px;
  display: inline-block;
}

.social-icons img {
  height: 28px;
  width: 28px;
  opacity: 0.85;
  transition: opacity 0.3s ease;
}



.footer-address {
  font-size: 14px;
  line-height: 1.6;
  color: #555;
}
/* ========== Footer Styles ========== */
.site-footer {
  background-color: white;
  color: #7b3f61;
  font-family: 'Poppins', sans-serif;
  padding: 30px 20px;
  text-align: center;
  border-top: 1px solid #eee;
  margin-top: 40px;
}

.footer-container {
  max-width: 1000px;
  margin: 0 auto;
}

.footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 25px;
  margin-bottom: 15px;
}

.footer-links a {
  color: #7b3f61;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: #a64ca6;
}

.social-icons {
  margin: 20px 0;
}

.social-icons a {
  margin: 0 10px;
  display: inline-block;
}

.social-icons img {
  height: 32px;
  width: 32px;
  fill: #80336b; 



.footer-address {
  font-size: 14px;
  line-height: 1.6;
  color: #555;
}
/* Dropdown */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-content {
  display: none;
  position: absolute;
  background-color: #fff;
  min-width: 180px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  z-index: 1000;
}

.dropdown-content a {
  color: #80336b;
  padding: 10px 14px;
  text-decoration: none;
  display: block;
}

.dropdown-content a:hover {
  background-color: #f7f7f7;
  color: #f7b948;
}

.dropdown:hover .dropdown-content {
  display: block;
}
