@font-face {
  font-family: "Noah";
  src: url("fonts/noah-regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: "Noah";
  src: url("fonts/noah-regular-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
}

@font-face {
  font-family: "Noah";
  src: url("fonts/noah-bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
}

@font-face {
  font-family: "Noah";
  src: url("fonts/noah-bold-italic.woff2") format("woff2");
  font-weight: 700;
  font-style: italic;
}

:root {
  --bg-color: #ffffff;
  --section-bg: #f8f5f0; /* Very Light Beige */
  --text-primary: #1b1b1b; /* Dark Grey / Black */
  --text-secondary: #777777; /* Gray */
  --heading-color: #5a0e11; /* Maroon */
  --accent-color: #bf8450; /* Gold / Bronze */
  --border-color: #e5e5e5;
  --nav-height: 140px; /* Increased to accommodate bigger logo */
  --footer-bg: #400d01; /* Updated Dark Maroon/Brown */
  --nav-bg: rgba(255, 255, 255, 0.98);
  --cat-nav-bg: #5a0e11; /* Maroon for Category Nav */
  --shadow-color: rgba(0, 0, 0, 0.05);
  --item-shadow: rgba(0, 0, 0, 0.05);

  --font-heading: "Noah", sans-serif;
  --font-body: "Noah", sans-serif;
}

/* Dark Mode Variables */
body.dark-mode {
  --bg-color: #121212;
  --section-bg: #1e1e1e;
  --text-primary: #e0e0e0;
  --text-secondary: #b0b0b0;
  --heading-color: #d49a6a; /* Gold/Bronze for Headings (No more Pink) */
  --accent-color: #d49a6a;
  --border-color: #333333;
  --nav-bg: rgba(18, 18, 18, 0.98);
  --footer-bg: #2a0902;
  --cat-nav-bg: #2a0902; /* Dark Maroon for Category Nav (No more Pink) */
  --shadow-color: rgba(255, 255, 255, 0.05);
  --item-shadow: rgba(0, 0, 0, 0.3);

  /* Override backgrounds to #d49a69 as requested */
  --footer-bg: #d49a69;
  --cat-nav-bg: #d49a69;
}

/* Ensure Logo is White in Dark Mode */
body.dark-mode .logo img {
  filter: brightness(0) invert(1);
}

/* Ensure text contrast on Gold Background in Dark Mode */
body.dark-mode .category-nav a,
body.dark-mode footer {
  color: #1b1b1b; /* Dark text for better contrast on gold */
}
body.dark-mode .category-nav a:hover,
body.dark-mode .category-nav a.active {
  color: #5a0e11; /* Maroon for hover/active on gold */
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-color);
  color: var(--text-primary);
  line-height: 1.6;
  transition:
    background-color 0.3s ease,
    color 0.3s ease;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--heading-color);
  transition: color 0.3s ease;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color 0.3s ease;
}

ul {
  list-style: none;
}

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

/* Theme Toggle */
.theme-toggle {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 40px; /* Reduced from 50px */
  height: 40px; /* Reduced from 50px */
  background-color: var(--accent-color);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  color: white;
  font-size: 1rem; /* Reduced from 1.2rem */
  cursor: pointer;
  z-index: 1001;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  transition:
    transform 0.3s ease,
    background-color 0.3s ease;
}

.theme-toggle:hover {
  transform: scale(1.1);
  background-color: var(--heading-color);
}

/* Navigation */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--nav-height);
  background-color: var(--nav-bg);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 10px var(--shadow-color);
  z-index: 1000;
  display: flex;
  justify-content: center; /* Center the logo */
  align-items: center;
  transition:
    height 0.3s ease,
    background-color 0.3s ease; /* Smooth transition for height */
}

.nav-container {
  display: flex;
  justify-content: center; /* Center content */
  align-items: center;
  width: 100%;
}

.logo img {
  height: 180px; /* Increased size to 180px */
  width: auto;
  max-height: 160px; /* Prevent overflow */
  padding: 5px 0;
  transition: height 0.3s ease; /* Smooth transition for size */
}

/* Hide Nav Links and Hamburger */
.nav-links,
.hamburger,
.mobile-menu {
  display: none !important;
}

/* Hero Section */
.hero {
  height: 40vh;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  /* Updated background image to banner5.jpg with darker overlay */
  background:
    linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)),
    url("img/banner5.jpg") no-repeat center center/cover;
  color: white;
  margin-top: var(--nav-height);
  transition: margin-top 0.3s ease;
}

.hero-content h1 {
  font-size: 3rem;
  margin-bottom: 5px;
  font-weight: 700;
  color: white;
}

.hero-subtext {
  font-size: 1.5rem;
  font-weight: 300;
  color: var(--accent-color);
  margin-bottom: 15px;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.hero-content p {
  font-size: 1.1rem;
  margin-bottom: 20px;
  font-weight: 400;
  letter-spacing: 1px;
}

.btn-scroll {
  display: inline-block;
  padding: 10px 25px;
  background-color: var(--accent-color);
  border: none;
  color: white;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 2px;
  transition: all 0.3s ease;
  border-radius: 2px;
}

.btn-scroll:hover {
  background-color: white;
  color: var(--accent-color);
}

/* Category Nav (Horizontal List) */
.category-nav {
  background-color: var(--cat-nav-bg);
  padding: 15px 0;
  position: sticky;
  top: var(--nav-height);
  z-index: 999;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  transition:
    top 0.3s ease,
    background-color 0.3s ease;
}

.category-nav ul {
  display: flex;
  justify-content: center;
  gap: 30px;
  flex-wrap: wrap;
}

.category-nav a {
  color: white;
  font-family: var(--font-heading);
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.category-nav a:hover,
.category-nav a.active {
  color: var(--accent-color);
}

/* Menu Sections */
.menu-container {
  padding: 20px 0; /* Reduced top padding */
}

.menu-section {
  padding: 40px 20px; /* Reduced vertical padding */
  max-width: 1000px; /* Slightly wider for better responsiveness */
  margin: 0 auto;
  border-bottom: 1px solid var(--border-color);
  transition: border-color 0.3s ease;
  scroll-margin-top: 220px; /* Offset for fixed navbar + sticky category nav */
}

.menu-section:last-child {
  border-bottom: none;
}

.section-title {
  text-align: center;
  font-size: 2.2rem; /* Slightly smaller for cleaner look */
  margin-bottom: 25px; /* Reduced margin */
  color: var(--heading-color);
  position: relative;
  padding-bottom: 10px;
  transition: color 0.3s ease;
}

.section-title i {
  font-size: 0.8em; /* Make icon slightly smaller relative to text */
  margin-right: 8px;
}

.section-title::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background-color: var(--accent-color);
}

/* Internal Sub-navigation for Sections */
.section-subnav {
  display: flex;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
  margin-bottom: 40px; /* Reduced margin */
}

.section-subnav a {
  font-family: var(--font-heading);
  font-size: 1rem;
  color: var(--text-secondary);
  border-bottom: 2px solid transparent;
  padding-bottom: 3px;
  transition: all 0.3s ease;
  font-weight: 700;
}

.section-subnav a:hover,
.section-subnav a.active-sub {
  color: var(--accent-color);
  border-bottom-color: var(--accent-color);
}

/* Subcategories */
.subcategory {
  margin-bottom: 40px; /* Reduced spacing */
  scroll-margin-top: 220px; /* Adjusted offset for taller navbar */
  text-align: center; /* Center align subcategory headers */
}

.subcategory h3 {
  font-size: 1.6rem;
  margin-bottom: 20px;
  color: var(--heading-color);
  font-style: italic;
  /* Removed left border to support center alignment */
  display: inline-block;
  border-bottom: 2px solid var(--accent-color);
  padding-bottom: 5px;
  transition: color 0.3s ease;
}

/* Menu Items */
.menu-items {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px; /* Increased gap */
  text-align: left;
}

.item {
  background-color: var(--section-bg);
  padding: 20px; /* Increased padding */
  border-radius: 4px;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease,
    background-color 0.3s ease;
  border: 1px solid transparent;

  flex: 1 1 350px; /* Increased min-width to accommodate content */
  max-width: 480px; /* Slightly wider max-width */
  width: 100%;
}

.item:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px var(--item-shadow);
  border-color: var(--accent-color);
}

.item-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap; /* Allow wrapping when content is too long */
  margin-bottom: 8px; /* More spacing below header */
  border-bottom: 1px dotted var(--border-color);
  padding-bottom: 8px; /* More spacing inside header */
  transition: border-color 0.3s ease;
}

.item-name {
  font-weight: 700;
  font-size: 1.1rem; /* Slightly larger name */
  color: var(--text-primary);
  flex-grow: 1; /* Take up available space */
  padding-right: 15px; /* Add more spacing between name and price */
  transition: color 0.3s ease;
}

.item-price {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--accent-color);
  font-size: 1.05rem;
  /* Removed white-space: nowrap to allow wrapping on small screens if needed, 
     but kept aligned to right mostly */
  text-align: right;
}

.item-desc {
  font-size: 0.9rem; /* Slightly larger description */
  color: var(--text-secondary);
  font-style: italic;
  margin-top: 5px;
  line-height: 1.5;
  transition: color 0.3s ease;
}

/* Footer */
footer {
  text-align: center;
  padding: 30px;
  background-color: var(--footer-bg);
  color: white;
  font-size: 0.9rem;
  transition: background-color 0.3s ease;
}

/* Responsive */
@media (max-width: 768px) {
  :root {
    --nav-height: 100px; /* Reduce navbar height on mobile */
  }

  .logo img {
    height: 100px; /* Reduce logo size on mobile */
    max-height: 80px;
  }

  .navbar {
    height: var(--nav-height);
  }

  .hero {
    margin-top: var(--nav-height);
  }

  .category-nav {
    top: var(--nav-height);
  }

  .hero-content h1 {
    font-size: 2.2rem;
  }

  .section-title {
    font-size: 2rem;
  }

  /* Flex items handle mobile naturally, but ensure they don't look weird */
  .item {
    flex-basis: 100%; /* Full width on small screens */
    max-width: 100%;
  }

  .item-header {
    flex-direction: column; /* Stack name and price on very small screens if needed */
    gap: 5px;
  }

  .item-name {
    padding-right: 0;
  }

  .item-price {
    text-align: left; /* Align price left when stacked */
  }

  /* Subcategories */
  .subcategory {
    scroll-margin-top: 180px; /* Adjusted for smaller navbar on mobile */
  }

  /* Menu Sections */
  .menu-section {
    scroll-margin-top: 180px; /* Adjusted for smaller navbar on mobile */
  }

  .section-subnav {
    gap: 10px;
  }

  .section-subnav a {
    font-size: 0.9rem;
  }

  .category-nav ul {
    gap: 15px; /* Tighter gap for category links */
  }

  .category-nav a {
    font-size: 0.9rem; /* Smaller font for category links */
  }
}
