/* ==========================================================================
   GLOBAL VARIABLES & RESET
   ========================================================================== */
:root {
  --bg-main: #F9F8F6;          /* Warm Off-White */
  --surface-white: #FFFFFF;     /* Card & Nav Backgrounds */
  --text-main: #2B2D42;         /* Deep Charcoal */
  --text-muted: #6C757D;        /* Secondary Text */
  
  --brand-sage: #3A5A40;        /* Primary Accent (Sage Green) */
  --brand-terracotta: #D96B43;  /* Secondary Accent (Warm Terracotta) */
  --brand-terracotta-hover: #C45A33;
  
  --border-light: #E2E8F0;      /* Subtle Divider Lines */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
}

/* ==========================================================================
   HEADER & NAVIGATION
   ========================================================================== */
header {
  position: sticky;       /* Pins the header when scrolling */
  top: 0;                 /* Keeps it at the very top of the window */
  z-index: 1000;          /* Keeps it layered above other page content */
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 25px;
  background-color: var(--brand-sage); /* Solid Sage Green Header */
  box-shadow: var(--shadow-sm);
}

/* --- BRAND LOGO & TEXT --- */
.logo-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #FFFFFF; /* High contrast white text against green */
  font-weight: bold;
  font-size: 20px;
  font-family: Georgia, serif;
}

.header-logo-img {
  height: 36px;
  width: auto;
  object-fit: contain;
}

/* --- PARENT DROPDOWN ANCHOR (FIX ADDED HERE) --- */
.dropdown,
.nav-menu ul.menu > li {
  position: relative; /* Acts as the anchor point for child dropdowns */
}

/* --- FIRST-LEVEL DROPDOWN --- */
.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0; /* Perfectly aligns with the left edge of the parent nav item */
  background: var(--surface-white, #ffffff);
  border: 1px solid var(--border-light, #e2e8f0);
  border-top: 3px solid var(--brand-terracotta, #e07a5f); /* Accent line for pop */
  border-radius: 0 0 6px 6px;
  padding: 8px 0;
  list-style: none;
  min-width: 170px;
  box-shadow: var(--shadow-sm, 0 4px 6px rgba(0, 0, 0, 0.05));
  z-index: 1000;
}

/* Force dark text for links inside white dropdown containers */
.dropdown-menu li a,
.nav-menu .dropdown-menu li a,
.dropdown-submenu li a,
.nav-menu .dropdown-submenu li a {
  color: #2d3748 !important; /* Dark readable text */
  font-weight: 500;
  display: block;
  padding: 8px 16px;
  text-decoration: none;
}

.dropdown-menu li a:hover,
.nav-menu .dropdown-menu li a:hover,
.dropdown-submenu li a:hover,
.nav-menu .dropdown-submenu li a:hover {
  background-color: #f4f7f4;
  color: var(--brand-terracotta-hover, #c85a3f) !important;
}

.dropdown:hover > .dropdown-menu {
  display: block;
}

/* --- SECOND-LEVEL DROPDOWN SUPPORT --- */
.dropdown-sub {
  position: relative;
}

.dropdown-sub > a {
  padding: 8px 16px;
  display: block;
}

.dropdown-submenu {
  display: none;
  position: absolute;
  top: 0;
  left: 100%;
  background: var(--surface-white, #ffffff);
  border: 1px solid var(--border-light, #e2e8f0);
  border-radius: 6px;
  list-style: none;
  min-width: 170px;
  padding: 8px 0;
  box-shadow: var(--shadow-sm, 0 4px 6px rgba(0, 0, 0, 0.05));
  z-index: 1001;
}

.dropdown-sub:hover > .dropdown-submenu {
  display: block;
}

/* ==========================================================================
   SEARCH CONTROLS
   ========================================================================== */
.search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.search-container {
  position: relative;
  display: inline-block;
  margin-left: auto;
}

#search-input,
.search input {
  padding: 8px 12px;
  font-size: 14px;
  width: 200px;
  background-color: #FFFFFF;
  color: var(--text-main);
  border: 1px solid transparent;
  border-radius: 6px;
  outline: none;
  transition: border-color 0.2s ease;
}

#search-input::placeholder,
.search input::placeholder {
  color: var(--text-muted);
}

#search-input:focus,
.search input:focus {
  border-color: var(--brand-terracotta);
}

.search button {
  background: var(--brand-terracotta);
  color: var(--surface-white);
  border: none;
  padding: 8px 12px;
  border-radius: 50%;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.search button:hover {
  background: var(--brand-terracotta-hover);
}

.search-results {
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--surface-white);
  border: 1px solid var(--border-light);
  border-radius: 0 0 6px 6px;
  list-style: none;
  padding: 0;
  margin: 4px 0 0 0;
  width: 100%;
  display: none;
  z-index: 1000;
  box-shadow: var(--shadow-sm);
}

.search-results li a {
  display: block;
  padding: 10px 14px;
  color: var(--text-main);
  text-decoration: none;
}

.search-results li a:hover {
  background: var(--bg-main);
  color: var(--brand-terracotta);
}

/* ==========================================================================
   HERO / LOGO SECTION
   ========================================================================== */
.big-logo {
  text-align: center;
  padding: 40px 0;
  background-color: var(--bg-main);
}

.big-logo img {
  width: 450px;
  height: auto;
}

/* ==========================================================================
   CUPBOARD SEARCH TOOL STYLING
   ========================================================================== */
.cupboard-container {
  max-width: 1100px;
  margin: 30px auto;
  padding: 0 20px;
}

.tool-header h1 {
  font-family: Georgia, serif;
  color: var(--brand-sage);
  font-size: 32px;
  margin-bottom: 8px;
}

.tool-header p {
  color: var(--text-muted);
  font-size: 16px;
  margin-top: 0;
}

/* Category Checkbox Grid */
.ingredient-selector-box {
  background: var(--surface-white);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 24px;
  margin-top: 25px;
  box-shadow: var(--shadow-sm);
}

.selector-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  border-bottom: 2px solid var(--bg-main);
  padding-bottom: 12px;
}

.selector-title h2 {
  font-size: 20px;
  color: var(--brand-sage);
  margin: 0;
  border: none;
  padding: 0;
}

.btn-clear {
  background: transparent;
  border: 1px solid var(--border-light);
  color: var(--text-muted);
  padding: 6px 14px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 13px;
  transition: all 0.2s ease;
}

.btn-clear:hover {
  background: var(--brand-terracotta);
  color: white;
  border-color: var(--brand-terracotta);
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}

.ingredient-cat-card {
  background: var(--bg-main);
  border-radius: 8px;
  padding: 16px;
  border: 1px solid var(--border-light);
}

.ingredient-cat-card h3 {
  font-size: 15px;
  color: var(--brand-sage);
  margin: 0 0 12px 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.checkbox-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  cursor: pointer;
  user-select: none;
}

.checkbox-label input[type="checkbox"] {
  accent-color: var(--brand-terracotta);
  width: 16px;
  height: 16px;
  cursor: pointer;
}

/* Results Grid */
.results-box {
  margin-top: 40px;
}

.results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.results-header h2 {
  font-size: 22px;
  color: var(--brand-sage);
  margin: 0;
  border: none;
}

.status-badge {
  background: #E2E8F0;
  color: var(--text-main);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
}

.status-badge.active {
  background: var(--brand-sage);
  color: white;
}

.recipe-grid,
#cuisine-results,
#category-results,
#meal-results,
#ingredient-results {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
  padding: 20px 0;
}

.recipe-description {
  font-style: italic;
  font-size: 1.1rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 10px 0 15px 0;
}

.recipe-result-card {
  background: var(--surface-white);
  border: 1px solid var(--border-light);
  border-radius: 10px;
  padding: 20px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.card-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.rank-tag {
  background: rgba(217, 107, 67, 0.12);
  color: var(--brand-terracotta);
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: bold;
}

.cuisine-tag {
  background: rgba(58, 90, 64, 0.1);
  color: var(--brand-sage);
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}

.recipe-result-card h3 {
  font-family: Georgia, serif;
  color: var(--text-main);
  margin: 0 0 8px 0;
  font-size: 20px;
}

.recipe-desc {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 18px;
}

.btn-view-recipe {
  display: inline-block;
  text-align: center;
  background: var(--brand-sage);
  color: white;
  text-decoration: none;
  padding: 10px 16px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 14px;
  transition: background 0.2s ease;
}

.btn-view-recipe:hover {
  background: #2D4632;
}

.no-results {
  grid-column: 1 / -1;
  text-align: center;
  padding: 40px;
  background: var(--surface-white);
  border-radius: 10px;
  border: 1px dashed var(--border-light);
  color: var(--text-muted);
}

/* ==========================================================================
   RESPONSIVE MOBILE HEADER & HAMBURGER MENU
   ========================================================================== */

/* Hide hamburger button on desktop screens by default */
.menu-toggle {
  display: none;
  background: transparent;
  border: none;
  font-size: 26px;
  color: #FFFFFF; /* White so it shows against sage background */
  cursor: pointer;
  padding: 4px 8px;
}

@media (max-width: 768px) {
  header {
    flex-wrap: wrap; /* Allows mobile menu to drop to a second row */
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
  }

  .logo {
    order: 1;
  }

  .header-logo-img {
    height: 30px;
  }

  /* Reveal Hamburger Button */
  .menu-toggle {
    display: block !important;
    order: 2;
  }

  /* Keep Search Bar compact on mobile so it stays on top row */
  .search-container {
    order: 3;
    width: 100%;
    margin: 10px 0 0 0;
    max-width: calc(100% - 60px);
  }

  #search-input {
    width: 100%;
    box-sizing: border-box;
  }

  /* Navigation drawer styling on mobile */
  #nav-menu {
    order: 4;
    display: none;
    width: 100%;
    margin-top: 10px;
    background: var(--brand-sage); /* Keep mobile menu background sage */
    border-top: 1px solid rgba(255, 255, 255, 0.2);
  }

  /* Show nav when JavaScript toggles the '.active' class */
  #nav-menu.active {
    display: block !important;
  }

  /* Stack main menu items vertically on mobile */
  nav .menu {
    flex-direction: column;
    gap: 0;
  }

  nav .menu li a {
    display: block;
    padding: 12px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  /* Mobile Dropdown styling */
  .dropdown-menu {
    position: static; /* Stack dropdown inline instead of floating */
    box-shadow: none;
    border: none;
    padding-left: 15px;
    background: rgba(0, 0, 0, 0.1); /* Subtle dark tint for expanded dropdown */
  }

  .dropdown-menu li a {
    color: #FFFFFF; /* White links in mobile sub-menus */
  }

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

  /* Scale down the big hero logo image on phones */
  .big-logo img {
    width: 90%;
    max-width: 450px;
  }
}

/* ==========================================================================
   HOMEPAGE HERO / BANNER STYLING (index.html)
   ========================================================================== */
.cupboard-hero {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px 20px;
  background-color: #f4f6f0; /* Soft tint matching your sage brand palette */
  border-radius: 12px;
  text-align: center;
  margin: 30px auto;
  max-width: 1000px;
  border: 1px solid #e0e5d8;
}

.cupboard-hero-content {
  max-width: 650px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-block;
  background-color: var(--brand-sage, #3a5a40);
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 5px 12px;
  border-radius: 16px;
  margin-bottom: 12px;
}

.cupboard-hero-content h1 {
  font-family: Georgia, serif;
  font-size: 32px;
  color: var(--brand-sage, #3a5a40);
  margin: 8px 0 12px 0;
}

.cupboard-hero-content p {
  color: var(--text-muted, #555555);
  font-size: 16px;
  line-height: 1.5;
  margin-bottom: 24px;
}

/* CTA Button */
.btn-hero-cta {
  display: inline-block;
  background-color: #d97706; /* Warm orange accent button */
  color: #ffffff;
  font-size: 16px;
  font-weight: 600;
  padding: 12px 28px;
  border-radius: 25px;
  text-decoration: none;
  transition: all 0.2s ease-in-out;
  box-shadow: 0 4px 10px rgba(217, 119, 6, 0.25);
}

.btn-hero-cta:hover {
  background-color: #b45309;
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(217, 119, 6, 0.35);
  color: #ffffff;
}

/* ==========================================================================
   ABOUT PAGE STYLING (about.html)
   ========================================================================== */
.about-container {
  max-width: 900px;
  margin: 40px auto;
  padding: 0 20px;
}

.about-hero {
  text-align: center;
  margin-bottom: 30px;
}

.about-hero h1 {
  font-family: Georgia, serif;
  color: var(--brand-sage, #3a5a40);
  font-size: 36px;
  margin-bottom: 10px;
}

.about-hero .subtitle {
  color: var(--text-muted, #555555);
  font-size: 18px;
}

.about-card {
  background-color: #ffffff;
  border: 1px solid #e0e5d8;
  border-radius: 12px;
  padding: 35px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
  line-height: 1.7;
  color: #333333;
}

.about-card h2, 
.about-card h3 {
  font-family: Georgia, serif;
  color: var(--brand-sage, #3a5a40);
  margin-top: 25px;
}

.about-card h2:first-of-type {
  margin-top: 0;
}

.about-card a {
  color: #d97706;
  text-decoration: none;
  font-weight: 600;
}

.about-card a:hover {
  text-decoration: underline;
}

/* Card Grid Layout */
.recipe-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

/* Individual Card Styling */
.recipe-card {
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border: 1px solid #e0e5d8;
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.recipe-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

/* THUMBNAIL IMAGE CONSTRAINTS */
.recipe-card-image {
  width: 100%;
  height: 160px; /* Constrains card thumbnail height */
  overflow: hidden;
  background-color: #f4f6f0;
}

.recipe-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Forces large image to scale and crop cleanly into card frame */
  transition: transform 0.3s ease;
}

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

/* Card Text Body */
.recipe-card-content {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.recipe-card-content h3 {
  font-family: Georgia, serif;
  font-size: 18px;
  color: var(--brand-sage, #3a5a40);
  margin: 0 0 8px 0;
}

/* ==========================================================================
   FEATURED RECIPE SECTION (index.html)
   ========================================================================== */
.featured-section {
  max-width: 1000px;
  margin: 40px auto;
  padding: 0 20px;
}

.featured-badge {
  display: inline-block;
  background-color: #d97706;
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 6px 14px;
  border-radius: 20px;
  margin-bottom: 16px;
}

/* Card Container */
.featured-card {
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border: 1px solid #e0e5d8;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.05);
}

/* Side-by-side on desktop / tablet screens */
@media (min-width: 768px) {
  .featured-card {
    flex-direction: row;
    align-items: center;
  }
}

.featured-image-wrapper {
  width: 100%;
  height: 280px;
  overflow: hidden;
}

@media (min-width: 768px) {
  .featured-image-wrapper {
    width: 50%;
    height: 340px;
  }
}

.featured-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.featured-details {
  padding: 30px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.featured-details h2 {
  font-family: Georgia, serif;
  font-size: 28px;
  color: var(--brand-sage, #3a5a40);
  margin: 0 0 12px 0;
}

.featured-description {
  color: #555555;
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 20px;
}

.featured-meta {
  display: flex;
  gap: 15px;
  font-size: 14px;
  color: #666666;
  margin-bottom: 24px;
}

.featured-tag {
  background-color: #f4f6f0;
  color: var(--brand-sage, #3a5a40);
  font-size: 12px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 6px;
}

.btn-featured-cta {
  display: inline-block;
  align-self: flex-start;
  background-color: var(--brand-sage, #3a5a40);
  color: #ffffff;
  font-weight: 600;
  padding: 10px 22px;
  border-radius: 25px;
  text-decoration: none;
  transition: background-color 0.2s ease;
}

.btn-featured-cta:hover {
  background-color: #2b4330;
}

/* Quick Category Grid */
.home-categories-section {
  max-width: 1000px;
  margin: 40px auto 60px auto;
  padding: 0 20px;
}

.home-categories-section h2 {
  font-family: Georgia, serif;
  color: var(--brand-sage, #3a5a40);
  font-size: 24px;
  margin-bottom: 20px;
}

.category-quick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
}

.cat-quick-card {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background-color: #ffffff;
  border: 1px solid #e0e5d8;
  border-radius: 12px;
  text-decoration: none;
  color: #333333;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.cat-quick-card:hover {
  transform: translateY(-3px);
  border-color: var(--brand-sage, #3a5a40);
}

/* Container Spacing */
.home-categories-section {
  max-width: 1000px;
  margin: 40px auto 60px auto;
  padding: 0 20px;
}

.home-categories-section h2 {
  font-family: Georgia, serif;
  color: var(--brand-sage, #3a5a40);
  font-size: 24px;
  margin-bottom: 20px;
}

/* Remove default link styling from cards */
.recipe-card {
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border: 1px solid #e0e5d8;
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none; /* Removes purple/blue underline */
  color: inherit;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.recipe-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

/* ==========================================================================
   HEADER FLEXBOX & RESPONSIVE LAYOUT
   ========================================================================== */
header.site-header {
  background-color: var(--brand-sage, #3a5a40);
  padding: 12px 20px;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

/* Logo Alignment */
.logo-link {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: #ffffff;
  font-family: Georgia, serif;
  font-size: 20px;
  font-weight: bold;
  white-space: nowrap;
}

.header-logo-img {
  height: 40px;
  width: auto;
  object-fit: contain;
  background: transparent;
}

/* Navigation Spacing */
.nav-menu ul.menu {
  display: flex;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 18px; /* Adds healthy breathing room between nav items */
}

.nav-menu a {
  color: #ffffff;
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  white-space: nowrap;
}

.nav-highlight {
  color: #f2cc8f !important;
  font-weight: 600;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: #ffffff;
  font-size: 24px;
  cursor: pointer;
}

/* Mobile & Tablet Dropdown */
@media (max-width: 992px) {
  .menu-toggle {
    display: block;
  }

  .logo-text {
    font-size: 16px;
  }

  .nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--brand-sage, #3a5a40);
    padding: 20px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.15);
  }

  .nav-menu.active {
    display: block;
  }

  .nav-menu ul.menu {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
}

/* ==========================================================================
   STACKED HEADER & TOP BRANDING BANNER
   ========================================================================== */
/* Core Header Container */
.site-header {
  background-color: var(--brand-sage, #3a5a40); /* Ensures consistent green background across all pages */
  position: relative;
  width: 100%;
  z-index: 1000;
}

/* Big Top Branding Area */
.header-top-banner {
  padding: 16px 20px 12px 20px;
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.brand-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  text-decoration: none;
  color: #ffffff !important;
}

.brand-logo-img {
  height: 52px; /* Prominent top logo */
  width: 52px;  /* Explicit width prevents collapse if image is loading */
  object-fit: contain;
  background: transparent;
  flex-shrink: 0;
}

.brand-title {
  font-family: Georgia, serif;
  font-size: 32px; /* Prominent title text */
  font-weight: 700;
  letter-spacing: 0.5px;
  margin: 0;
  color: #ffffff !important;
  line-height: 1.2;
  display: inline-block;
}

/* Navigation Row Below Banner */
.header-nav-row {
  padding: 10px 20px;
}

.nav-container {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

/* Nav Menu Items */
.nav-menu ul.menu {
  display: flex;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 24px; /* Generous spacing across laptop screens */
}

.nav-menu a {
  color: #ffffff !important;
  text-decoration: none;
  font-size: 16px; /* Explicit font size prevents shrinking on secondary pages */
  font-weight: 500;
  white-space: nowrap;
}

.nav-highlight {
  color: #f2cc8f !important;
  font-weight: 600;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: #ffffff;
  font-size: 24px;
  cursor: pointer;
}

/* Mobile & Tablet Responsiveness */
@media (max-width: 992px) {
  .brand-title {
    font-size: 22px;
  }

  .brand-logo-img {
    height: 38px;
    width: 38px;
  }

  .menu-toggle {
    display: block;
  }

  .nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--brand-sage, #3a5a40);
    padding: 20px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.15);
  }

  .nav-menu.active {
    display: block;
  }

  .nav-menu ul.menu {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }
}

/* Style the Swaps Accordion like a interactive card/button */
#pantry-swaps-accordion {
  background-color: #f4f6f0;
  border: 1px solid var(--border-light, #e2e8f0);
  border-radius: 8px;
  margin: 20px 0;
  padding: 12px 16px;
}

#pantry-swaps-accordion summary {
  cursor: pointer;
  font-size: 15px;
  color: var(--brand-sage, #3a5a40);
  outline: none;
  user-select: none;
}

#pantry-swaps-accordion summary:hover {
  color: var(--brand-terracotta, #d96b43);
}

.swaps-content {
  margin-top: 15px;
  padding-top: 12px;
  border-top: 1px solid var(--border-light, #e2e8f0);
}

.swap-group h4 {
  margin: 10px 0 4px 0;
  color: var(--brand-sage, #3a5a40);
  font-size: 14px;
}

.swap-group p {
  margin: 0 0 10px 0;
  font-size: 14px;
  color: var(--text-main, #2b2d42);
}