@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600&family=Poppins:wght@400;500;600&display=swap');

:root {
  --bg: #C7C7C7;             /* Warmer cream background */
  --text: #463f3a;           /* Rich, soft brown for all text */
  --accent: #b08968;         /* Natural warm tan (logo/buttons) */
  --secondary: #7A3CC7;      /* Deep cocoa for headings */
  --highlight: #1CB0FF;      /* Pale yellow/peachy section bg */
  --muted: #a68a76;          /* Soft subtext/meta color */
  --card-bg: #ffffff;
  --transition: all 0.3s ease-in-out;
}

body {
    margin: 0;
    font-family: 'Poppins', Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
}

.fade-in {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeIn 0.8s forwards;
}
@keyframes fadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

header {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  width: calc(100%-20px);
  border-bottom: 1px dashed var(--text);
}

.main-nav {
  display: flex;
  gap: 20px;
}

.hamburger {
  display: none;
  font-size: 2.2rem;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text);
}

.hamburger img {
  width: 55px;
  height: 55px;
  object-fit: contain;
}

.mobile-menu {
  display: flex;
  flex-direction: column;
  position: absolute;
  top: 100%;
  right: 0;
  width: 100%;
  background: var(--bg);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  padding: 0;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transform: translateY(-10px);
  transition: max-height 0.3s ease, transform 0.3s ease;
  z-index: 100;
}

/* When menu is toggled on */
.mobile-menu.show {
  display: flex;
  max-height: 400px;
  opacity: 1;
  transform: translateY(0);
}

/* Mobile menu links */
.mobile-menu a {
  text-decoration: none;
  color: var(--text); /* match desktop */
  font-size: 2rem;
  font-weight: 500;
  padding: 20px;
  border-bottom: 1px solid #ccc;
  transition: color 0.2s ease;
}

.mobile-menu a:hover {
  color: var(--accent);
}

/* Hamburger button stays top right */
.hamburger {
  display: none;
  font-size: 2.4rem;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text);
}

.logo-text {
    font-size: 1.8rem;
    font-weight: 500;
    font-family: 'Poppins', sans-serif; color: var(--text);
}

.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.logo-icon {
  height: 40px;
  margin-right: 10px;
}

header nav a {
    color: var(--text);
    margin-left: 20px;
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}
header nav a:hover {
    color: var(--secondary);
}
header nav .active {
    color: var(--secondary);
}

.hero {
    padding: 0px 10px 0px 10px;
    max-width: 1400px;
    margin: auto;
}

.hero h2 {
    color: var(--text);
    font-size: 2rem;
}

.hero-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}
.featured-card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: var(--card-bg);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
}
.featured-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}
.featured-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}
.featured-card .overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.6));
    padding: 16px;
}
.featured-card .overlay h2 {
    color: #fff;
    margin: 0;
    font-size: 1.3rem;
    font-family: 'Poppins', sans-serif;
}

.featured-card .btn {
    display: inline-block;
    margin-top: 8px;
    background: var(--accent);
    color: #fff;
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.featured-card .btn:hover {
    background: #e29439;
}

.recipe-grid {
  margin: 0 auto;
  padding: 0px 20px 20px 20px;
  width: 100%;
  max-width: 1200px;
}

.recipe-grid h2 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    font-family: 'Poppins', sans-serif;
}

.recipe-list {
  display: grid;
  gap: 24px;
  padding: 0;
  grid-template-columns: 1fr; /* default: 1 per row */
}

@media (min-width: 429px) {
  .recipe-list {
    grid-template-columns: repeat(2, 1fr); /* small phones & up */
  }
}

@media (min-width: 1024px) {
  .recipe-list {
    grid-template-columns: repeat(4, 1fr); /* desktop */
  }
}

.recipe-card {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  background: var(--card-bg);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: var(--transition);
  aspect-ratio: 1 / 1;
}

.recipe-card > img:not(.video-icon) {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.recipe-card h3 {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  margin: 0;
  padding: 16px;
  color: white;
  font-size: 1.2rem;
  font-family: 'Poppins', sans-serif;
  z-index: 2;
}

.recipe-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.6), transparent 60%);
  z-index: 1;
}

.recipe-card:hover {
  transform: translateY(-4px);
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.recipe-detail {
    max-width: 800px;
    margin: 20px auto;
    padding: 0 20px;
}
.recipe-detail h1 {
    color: var(--secondary);
    font-family: 'Poppins', sans-serif;
}

.recipe-detail .main-img {
    width: 100%;
    max-height: 300px;
    border-radius: 12px;
    object-fit: cover;
    transition: var(--transition);
}
.recipe-detail .main-img:hover {
    transform: scale(1.02);
    max-height: 600px;
}
.meta-info {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    font-weight: 500;
    font-size: 1.2rem;
    font-family: 'Poppins', sans-serif;
}
.ingredients h2, .instructions h2 {
    color: var(--highlight);
    font-family: 'Poppins', sans-serif;
}

.ingredients ul, .instructions ol {
    padding-left: 20px;
    line-height: 1.6;
}

.instructions ol {
  counter-reset: step-counter;
  padding-left: 0;
  list-style: none;
  margin: 0;
}

.instructions li {
  counter-increment: step-counter;
  display: flex;
  align-items: center; /* ✅ vertical centering */
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.instructions li::before {
  content: counter(step-counter);
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--highlight);
  color: #fff;
  font-weight: bold;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

/* text box */
.instructions li > div {
  background-color: #ffffff44;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  line-height: 1.6;
  font-size: 1rem;
  flex-grow: 1;
}

@media (max-width: 1023px) {
  .instructions li > div {
    font-size: 1.6rem;
    line-height: 1.7;
    padding: 0.9rem 1.2rem;
  }

  .ingredients ul {
    font-size: 1.1rem;
    line-height: 1.7;
    padding-left: 1.5rem;
  }

  .instructions li::before {
    width: 2rem;
    height: 2rem;
    font-size: 1rem;
    margin-top: 0; /* ensure vertical alignment */
  }

  .instructions li {
    align-items: center;
  }
}



footer {
    padding: 40px;
    text-align: center;
    font-size: 0.9rem;
    background: var(--bg);
    border-top: 1px dashed var(--text);
}
footer a {
    color: var(--secondary);
    text-decoration: none;
    font-weight: 600;
}
footer a:hover {
    text-decoration: underline;
}
.yt-wrapper {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 */
  height: 0;
  overflow: hidden;
  border-radius: 12px;
}
.yt-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  border:none;
  border-radius: 12px;
  height: 100%;
}

.recipe-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 20px;
  margin-bottom: 30px;
}

.recipe-header h2 {
  margin: 0;
  font-size: 2rem;
  font-family: 'Poppins', sans-serif;
}

#filterForm {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

#filterForm input[type="text"],
#filterForm select,
#filterForm button {
    padding: 10px 12px;
    font-size: 1rem;
    border-radius: 8px;
    border: 1px solid #ccc;
    background: #ddd;
    font-family: 'Poppins', sans-serif;
    transition: box-shadow 0.3s ease;
}

#filterForm input[type="text"]:focus,
#filterForm select:focus {
    outline: none;
    box-shadow: 0 0 0 2px var(--secondary);
}

#filterForm button {
    background-color: var(--secondary);
    color: white;
    font-weight: 500;
    cursor: pointer;
    border: none;
}

#filterForm button:hover {
    background-color: var(--secondary);
}

.video-icon {
  position: absolute;
  right: 5px;
  width: 33px;
  height: 33px;
  border-radius: 6px;
  padding: 4px;
  color: red;
  object-fit: contain;
  z-index: 2;
  cursor: default;
  transition: transform 0.2s ease;
}

.video-icon:hover {
  transform: scale(1.2);
}

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 18px;
  margin-top: 2rem;
  font-size: 1.6rem;
  font-weight: 500;
}

.pagination a {
  color: var(--secondary);
  text-decoration: none;
  cursor: pointer;
  transition: color 0.2s ease;
}

.pagination a:hover {
  text-decoration: underline;
  color: var(--accent);
}

.pagination .current-page {
  color: var(--text);
}

.recipe-tags {
  margin-top: 16px;
  margin-bottom: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag {
  display: inline-block;
  background-color: var(--secondary);
  color: #fff;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.9rem;
  text-decoration: none;
  transition: background 0.2s ease;
}

.tag:hover {
  background-color: var(--highlight);
}

#cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  width: calc(100% - 40px);
  background: rgba(0, 0, 0, 0.85);
  color: #fff;
  font-size: 1rem;
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 9999;
}

#cookie-banner p {
  margin: 0;
  flex: 1;
}

#cookie-banner a {
  color: var(--accent);
  text-decoration: underline;
}

#accept-cookies {
  background-color: var(--secondary);
  color: white;
  border: none;
  font-weight: bold;
  font-size: 1rem;
  padding: 0.5rem 1.5rem;
  border-radius: 6px;
  cursor: pointer;
}


@media (max-width: 1023px) {
  .recipe-header {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
  }

  .recipe-header h2 {
    font-size: 2rem;
  }

  #filterForm {
    flex-direction: column;
    gap: 16px;
  }

  #filterForm input,
  #filterForm select,
  #filterForm button {
    font-size: 1.8rem;
    height: 88px;
    padding: 24px 28px;
    border-radius: 12px;
    width: 100%;
    box-sizing: border-box;
  }

  #filterForm input {
    padding-left: 36px; /* align placeholder with select text */
  }

  #filterForm input::placeholder {
    font-size: 1.6rem;
  }

  #filterForm select {
    width: 100%; /* half width */
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url('/down-arrow.png');
    background-repeat: no-repeat;
    background-position: right 1.4rem center;
    background-size: 24px 24px;
    padding-right: 3.6rem;
  }

  .video-icon {
    width: 52px;
    height: 52px;
    padding: 6px;
  }

  .logo-text {
    font-size: 2.4rem;
  }

  .recipe-card h3 {
    font-size: 2rem; /* increase from ~0.85 or whatever default is */
    padding: 12px;
  }

  header nav a {
    font-size: 1.5rem;
  }

  .recipe-grid h2 {
    font-size: 2rem;
  }

  .logo-icon {
    height: 68px;
  }

  h2 {
    font-size: 2rem;
  }

  .main-nav {
    display: none;
  }

  .hamburger {
    display: block;
  }

  .mobile-menu.show {
    display: flex;
  }

  header {
    width: 100%;
  }

  .recipe-tags {
    gap: 12px;
    margin-top: 12px;
    flex-wrap: wrap;
  }

  .tag {
    font-size: 2rem;
    padding: 10px 16px;
    margin: 10px 0px;
    border-radius: 25px;
  }

  .meta-info {
    font-size: 2rem;
  }

  .hero {
    padding: 0px 10px 0px 20px;
    width: 100%;
  }

  .hero h2 {
    font-size: 2.4rem;
  }
}
