:root {
  --primary-red: rgba(139, 0, 0, 0.95);
  --accent-crimson: #c41e3a; /* Important for mobile menu items */
  --jade-green: #066c37;
  --rich-burgundy: #8b1538;
  --soft-parchment: #f5f1e8;
  --cream-light: #faf8f3;
  --warm-cream: #f8f4ed;
  --text-dark: #2c2c2c;
  --text-medium: #666;
  --text-light: #888;
  --white: #ffffff;
  --black: #000000;
  --shadow-light: 0 2px 15px rgba(0, 0, 0, 0.08);
  --shadow-medium: 0 4px 25px rgba(0, 0, 0, 0.12);
  --shadow-heavy: 0 8px 40px rgba(0, 0, 0, 0.15);
  --shadow-elegant: 0 10px 30px rgba(196, 30, 58, 0.15);
  --border-radius: 8px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

  --color-primary: #8b0000;
  --color-text: #333;
  --color-text-light: #666;
  --color-background: #f9f5ea;
  --color-border: #d1c9b8;
  --color-white: white;
  --transition-standard: all 0.3s ease;
}

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

body {
  font-family: "Crimson Text", -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  line-height: 1.6;
  min-height: 100vh;
}

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: var(--color-background);
  z-index: 1000;
  box-shadow: none;
  transition: var(--transition);
  backdrop-filter: none;
  height: 70px;
}

.navbar.scrolled {
  background: var(--soft-parchment);
  box-shadow: 0px 0px 5px black;
}
.nav-container {
  max-width: 1500px;
  margin: 0 auto;
  padding: 0 32px; /* From first page */
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 70px;
}

.nav-logo {
  display: flex; /* This makes it visible on desktop */
  align-items: center;
}

.nav-logo .logo-img {
  height: 48px;
  width: auto;
}

.nav-menu {
  display: flex;
  gap: 2.5rem;
  align-items: center;
}

.nav-link {
  text-decoration: none;
  color: var(--text-dark);
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  position: relative;
  padding: 8px 0;
  transition: color 0.3s ease;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -2px;
  width: 0;
  height: 2px;
  background: var(--primary-red);
  transition: width 0.3s ease, left 0.3s ease;
  transform: translateX(-50%);
}

.nav-link:hover::after {
  width: 80px;
  left: 50%;
}

.nav-link:hover {
  color: var(--primary-red);
}

/* Main Content */
main {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

footer {
  text-align: center;
  padding: 1rem;
  background: #303030;
  color: white;
  position: relative;
  z-index: 5;
}

.menu-content {
  background: var(--color-background);
  color: var(--color-text);
  width: 70%;
  margin-left: 30%;
  margin-top: 70px;
  padding: 2% 0 5% 0;
}

.menu-container-new {
  display: flex;
  min-height: 100vh;
}

/* Menu Sidebar */
.menu-sidebar {
  width: 30%;
  background: var(--color-background);
  display: flex;
  flex-direction: column;
  position: fixed;
  justify-content: center;
  left: 0;
  top: 0;
  height: 100vh;
  padding-top: 80px;
  padding-bottom: 40px;
  border-right: 1px solid var(--color-border);
  text-align: center;
}

.sidebar-decoration {
  text-align: center;
  margin-bottom: 10px;
}

.sidebar-decoration i {
  font-size: 24px;
  color: #8b0000;
}

.sidebar-title {
  color: var(--color-primary);
  font-size: 24px;
  font-weight: normal;
  margin: 0 0 24px;
  padding-bottom: 10px;
  position: relative;
  letter-spacing: 0.7px;
}

.sidebar-title:after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 1px;
  background-color: var(--color-primary);
}

/* Menu Categories */
.menu-categories {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 10px 20px;
  margin: 0 auto;
  width: 100%;
  max-width: 220px;
  align-items: center;
}

.category-link {
  display: inline-block;
  color: var(--color-text);
  padding: 8px 0;
  transition: var(--transition-standard);
  text-decoration: none;
  cursor: pointer;
  position: relative;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  font-size: 15px;
  font-weight: 500;
}

.category-link:after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 1px;
  background-color: var(--color-primary);
  transform: scaleX(0);
  transition: transform 0.3s ease;
  transform-origin: center;
}

.category-link:hover:after,
.category-link.active:after {
  transform: scaleX(1.2);
}

.category-link:hover,
.category-link.active {
  color: var(--color-primary);
}

.category-icon {
  margin-right: 10px;
  font-size: 14px;
}

.category-name {
  font-weight: 600;
}

.category-link.active {
  font-weight: 700;
}

.menu-header {
  text-align: center;
  margin-bottom: 2rem;
}

.category-heading {
  font-size: 1.8rem;
  color: var(--color-primary);
  margin-top: 1rem;
  font-weight: bold;
  letter-spacing: 0.7px;
  position: relative;
  text-align: center;
  margin-bottom: 0.5rem;
}

.selected-category {
  font-size: 2.4rem;
  color: var(--color-primary);
  margin: 1.2rem 0;
  font-weight: normal;
  letter-spacing: 1.2px;
}

.menu-decoration {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 1rem 0;
}

.decoration-line {
  height: 1px;
  background: #d1c9b8;
  width: 100px;
  display: inline-block;
  margin: 0 10px;
}

.menu-decoration i {
  color: var(--color-primary);
  font-size: 1.2rem;
}

.menu-intro {
  text-align: center;
  color: var(--color-text-light);
  font-size: 1.1rem;
  margin-top: 1rem;
  margin-bottom: 2rem;
  font-style: italic;
}

/* Menu Items */
.menu-items {
  display: grid;
  width:600px;
  max-width: 60%;
  flex-direction: column;
  /* gap: 0.5rem; */
}

.menu-item {
  padding-bottom: 1rem;
  display: flex;
  gap: 0;
  align-items: center;
  transition: transform 0.2s ease, background-color 0.2s ease, gap 0.2s ease;
  padding-top: 0.5rem;
}

.item-image-container {
  height: 0;
  width: 0;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  opacity: 0;
  transition: all 0.3s ease;
}

.item-image {
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.item-image:hover {
  transform: scale(1.05);
}

.item-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  /* min-height: 60px; */
}

.item-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  /* margin-bottom: 0.3rem; */
  position: relative;
  gap: 1rem;
}

.item-header h3 {
  font-size: 1.15rem;
  color: var(--color-text);
  font-weight: 600;
  margin: 0;
  position: relative;
  z-index: 1;
  padding-right: 0.5rem;
}

.price {
  font-size: 1.05rem;
  color: var(--color-primary);
  min-width: 60px;
  text-align: right;
  font-weight: 600;
  margin: 0;
}

.description {
  font-size: 0.95rem;
  color: var(--color-text-light);
  line-height: 1.4;
  margin-top: 0.3rem;
  font-style: italic;
}

/* Mobile Menu Styles */
.mobile-menu {
  display: none;
  padding: 0;
  margin-top: 60px;
  background: var(--color-background);
}

.mobile-hero {
  background: var(--color-primary);
  color: white;
  text-align: center;
  padding: 40px 20px;
  position: relative;
  overflow: hidden;
}

.mobile-hero:before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url("/assets/images/hero.jpg") repeat;
  opacity: 0.1;
}

.mobile-hero h1 {
  font-size: 2.2rem;
  margin: 0;
  font-weight: normal;
  letter-spacing: 1.5px;
  position: relative;
}

.mobile-hero .hero-decoration {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 15px 0;
  position: relative;
}

.mobile-hero .decoration-line {
  height: 1px;
  background: rgba(255, 255, 255, 0.3);
  width: 60px;
  display: inline-block;
  margin: 0 10px;
}

.mobile-hero i {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.2rem;
}

.mobile-menu-categories {
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  padding: 20px;
  background: var(--color-background);
  min-height: calc(100vh - 60px - 180px); /* Account for header and hero */
}

/* Desktop/Mobile Display Control */
@media screen and (min-width: 768px) {
  .desktop-menu {
    display: flex;
  }
  .mobile-menu {
    display: none;
  }
}

@media (max-width: 768px) {
  .desktop-menu {
    display: none;
  }
  .mobile-menu {
    display: block;
    margin-top: 0;
    padding-top: 60px;
  }

  .nav-container {
    padding: 0 15px;
    background: var(--soft-parchment);
  }
  .nav-logo .logo-img {
    height: 50px;
    width: auto;
  }
  .hamburger-menu {
    display: block !important; /* Use !important to override potential global display:none */
    color: var(--accent-crimson); /* Color from first page */
    z-index: 2000; /* Above the nav-menu */
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    position: absolute; /* Relative to .nav-container or .navbar if it's a direct child */
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    transition: transform 0.3s ease;
  }

  .hamburger-menu i {
    color: var(--accent-crimson);
    font-size: 24px;
    transition: transform 0.3s ease;
  }
  .hamburger-menu.active i {
    color: var(--accent-crimson); /* Color from first page */
    transform: rotate(180deg); /* Or your preferred rotation/icon change */
  }
  .nav-menu {
    /* Mobile state for the menu container */
    position: fixed;
    top: 0; /* Start from the very top */
    left: 0;
    width: 100vw;
    height: 100vh;
    background: var(--soft-parchment);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0;
    display: flex;
    z-index: 1500;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s, visibility 0.3s;
  }
  .nav-menu.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    animation: slideDownMenu 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  }
  .nav-menu.closing {
    animation: slideUpMenu 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  }
  @keyframes slideDownMenu {
    0% {
      opacity: 0;
      transform: translateY(-40px);
    }
    100% {
      opacity: 1;
      transform: translateY(0);
    }
  }
  @keyframes slideUpMenu {
    0% {
      opacity: 1;
      transform: translateY(0);
    }
    100% {
      opacity: 0;
      transform: translateY(-40px);
    }
  }

  .nav-menu .nav-link {
    /* Mobile links */
    color: var(--accent-crimson);
    font-size: 1.3rem;
    font-family: "Crimson Text", serif;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    width: 100vw;
    text-align: center;
    background: transparent;
    border: none;
    outline: none;
    padding: 18px 0 10px 0;
    margin: 0;
    opacity: 1;
    transition: all 0.3s;
    position: relative;
    display: block;
  }

  .nav-menu .nav-link::after {
    content: "";
    display: block;
    margin: 12px auto 0 auto;
    width: 50%;
    height: 1px;
    background: var(--accent-crimson);
    opacity: 0.25;
    border-radius: 1px;
    transition: width 0.3s, background 0.3s;
  }
  .nav-menu .nav-link:last-child::after {
    display: none;
  }
  .nav-menu .nav-link:hover,
  .nav-menu .nav-link:focus {
    color: var(--accent-crimson);
    background: transparent;
  }
  .nav-menu .nav-link:hover::after,
  .nav-menu .nav-link:focus::after {
    width: 90%;
    background: var(--primary-red);
    opacity: 0.5;
  }

  /* Mobile Menu Logo (the one inside .nav-menu) */
  .nav-menu .mobile-menu-logo {
    display: none; /* Hidden by default */
    width: 160px;
    height: auto;
    margin: 0 auto 0.5rem auto; /* Small margin at the bottom */
    background: var(
      --soft-parchment
    ); /* White background for the logo padding area */
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    padding: 5px; /* Padding around the logo image */
  }

  .nav-menu.active .mobile-menu-logo {
    /* Shown when menu is active */
    display: block;
    animation: fadeIn 0.3s ease 0.2s forwards; /* Delay slightly */
    opacity: 1; /* Start transparent for fadeIn */
  }
}

@media (min-width: 769px) {
  .hamburger-menu {
    display: none !important;
  }
  .mobile-menu-logo {
    display: none !important;
  }

  .menu-item:hover {
    transform: translateX(5px);
    gap: 1.5rem;
  }
  .item-image-container{
    display: flex;
  }

  .item-header h3 {
    background: var(--color-background); /* Default background to hide the line under text */
  }

  .price {
    z-index: 1;
    background: var(--color-background); /* Default background to hide the line under text */
  }

  .item-header::after {
    content: "";
    position: absolute;
    left: 0; 
    right: 0;
    bottom: 6px;
    border-bottom: 1px dotted rgba(0, 0, 0, 0.25); /* Subtle, light grey dots */
    z-index: 0;
  }

  .item-image-container {
    display: flex; /* Or its original display value */
  }

  .menu-item:hover .item-image-container {
    display: flex; /* Or its original display value */
    height: 100px;
    width: auto;
    opacity: 1;
  }
}

.mobile-hero {
  margin-top: 0;
  padding: 30px 20px;
  background: var(--color-primary);
}

.mobile-hero h1 {
  font-size: 2.2rem;
  margin: 0;
  padding-top: 10px;
  font-weight: normal;
  letter-spacing: 1.5px;
  position: relative;
}

.mobile-menu .category-wrapper {
  margin-bottom: 12px;
}

.mobile-menu .category-link {
  background: #fdf7ee;
  padding: 18px 20px;
  box-shadow: var(--shadow-light);
  margin: 0;
  border-radius: 15px;
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 16px;
  color: var(--color-text);
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  transition: all 0.3s ease;
}
.mobile-menu .category-link.active {
  background: var(--color-primary);
  color: white;
  border-radius: 10px 10px 0 0;
}

.mobile-menu .category-link:after {
  display: none;
}

.mobile-menu .category-link:before {
  content: "+";
  position: absolute;
  right: 20px;
  font-size: 24px;
  color: rgba(0, 0, 0, 0.8);
  transition: transform 0.3s ease, color 0.3s ease;
}

.mobile-menu .category-link.active {
  background: var(--color-primary);
  color: white;
}

.mobile-menu .category-link.active:before {
  content: "+";
  color: rgba(255, 255, 255, 0.8);
  transform: rotate(45deg);
}

.mobile-menu .category-heading {
  padding: 14px 20px;
  margin: 0;
  background: #8b000015;
  color: var(--color-primary);
  font-size: 1.05rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  font-weight: 600;
  position: relative;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--color-border);
}

.mobile-menu .menu-items {
  display: none;
  max-width: 100%;
  padding: 0;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-top: none;
  border-bottom-left-radius: 8px;
  border-bottom-right-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  transform-origin: top;
  opacity: 0;
  transform: translateY(-10px);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.mobile-menu .menu-items.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
  animation: expandMenu 0.3s ease-out forwards;
}

@keyframes expandMenu {
  0% {
    opacity: 0;
    transform: translateY(-10px) scaleY(0.55);
  }
  50% {
    opacity: 0.8;
  }
  100% {
    opacity: 1;
    transform: translateY(0) scaleY(1);
  }
}

.mobile-menu .menu-item {
  padding: 0;
  border-bottom: 1px solid var(--color-border);
  cursor: pointer;
  transition: background-color 0.2s ease;
  position: relative;
  overflow: hidden;
  background: white;
}

.mobile-menu .menu-item:first-child {
  border-top: none;
}

.mobile-menu .item-content {
  background-color: #fdf7ee00;
  padding: 18px 20px;
  position: relative;
  z-index: 1;
}

.mobile-menu .item-header {
  margin-bottom: 6px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.mobile-menu .item-header h3 {
  font-size: 1.05rem;
  margin: 0;
  padding-right: 10px;
  color: var(--color-text);
  font-weight: 600;
}

.mobile-menu .price {
  color: var(--color-primary);
  font-weight: 600;
  font-size: 1rem;
}

.mobile-menu .description {
  font-size: 0.9rem;
  color: var(--color-text-light);
  margin: 6px 0 0 0;
  line-height: 1.5;
}

.mobile-menu .item-image-container {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: auto;
  margin: 12px auto;
  border-radius: 6px;
  overflow: hidden;
  background: #f8f8f8;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, opacity 0.3s ease;
  opacity: 0;
  margin-top: 0;
}

.mobile-menu .item-image-container.active {
  display: block;
  animation: slideDown 0.3s ease-out;
  max-height: fit-content;
  max-width: 90%;
  opacity: 1;
  margin: 12px auto;
}

.mobile-menu .item-image {
  width: 100%;
  height: auto;
  object-fit: cover;
  margin: 0 auto;
  display: block;
}

.mobile-menu .menu-item:active {
  background-color: rgba(139, 0, 0, 0.03);
}

.mobile-menu .menu-item:before {
  display: none;
}

.mobile-menu .menu-item:hover:before {
  display: none;
}

.mobile-menu .menu-item.has-image .item-header {
  padding-left: 24px; /* Make space for chevron */
}

.mobile-menu .menu-item.has-image .item-header:before {
  content: "▶";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  transition: transform 0.3s ease;
  color: var(--color-primary);
}

.mobile-menu .menu-item.has-image.expanded .item-header:before {
  transform: translateY(-50%) rotate(90deg);
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Add responsive height adjustments */
@media screen and (max-height: 800px) {
  .menu-sidebar {
    padding-top: 60px;
    padding-bottom: 30px;
  }

  .sidebar-title {
    font-size: 20px;
    margin: 0 0 20px;
  }

  .menu-categories {
    gap: 14px;
  }

  .category-link {
    font-size: 14px;
    padding: 6px 0;
  }

  /* Menu content adjustments */
  .menu-content {
    margin-top: 60px;
  }

  .selected-category {
    font-size: 2rem;
    margin: 1rem 0;
  }

  .menu-items {
    gap: 0.4rem;
  }

  .menu-item {
    padding: 0.8rem 0;
  }

  .item-image-container {
    height: 100px;
  }
}

@media screen and (max-height: 700px) {
  .menu-sidebar {
    padding-top: 50px;
    padding-bottom: 25px;
  }

  .sidebar-title {
    font-size: 18px;
    margin: 0 0 16px;
  }

  .menu-categories {
    gap: 12px;
  }

  .category-link {
    font-size: 13px;
    padding: 5px 0;
  }

  .sidebar-decoration i {
    font-size: 20px;
  }

  /* Menu content adjustments */
  .menu-content {
    margin-top: 50px;
  }

  .selected-category {
    font-size: 1.8rem;
    margin: 0.8rem 0;
  }

  .menu-items {
    gap: 0.3rem;
  }

  .menu-item {
    padding: 0.6rem 0;
  }

  .item-image-container {
    height: 90px;
  }

  .item-header h3 {
    font-size: 1.1rem;
  }

  .price {
    font-size: 1rem;
  }

  .description {
    font-size: 0.9rem;
  }
}

@media screen and (max-height: 600px) {
  .menu-sidebar {
    padding-top: 40px;
    padding-bottom: 20px;
  }

  .sidebar-title {
    font-size: 16px;
    margin: 0 0 14px;
  }

  .menu-categories {
    gap: 10px;
  }

  .category-link {
    font-size: 12px;
    padding: 4px 0;
  }

  .sidebar-decoration i {
    font-size: 18px;
  }

  /* Menu content adjustments */
  .menu-content {
    margin-top: 40px;
  }

  .selected-category {
    font-size: 1.6rem;
    margin: 0.6rem 0;
  }

  .menu-items {
    gap: 0.2rem;
  }

  .menu-item {
    padding: 0.5rem 0;
  }

  .item-image-container {
    height: 80px;
  }

  .item-header h3 {
    font-size: 1rem;
  }

  .price {
    font-size: 0.95rem;
  }

  .description {
    font-size: 0.85rem;
  }
}

/* Loading Spinner Styles */
.menu-loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  color: var(--color-primary);
  gap: 16px;
}

.loader-spinner {
  font-size: 3rem;
  animation: pulse 1.5s ease-in-out infinite;
}

.menu-loader p {
  font-size: 1.1rem;
  font-style: italic;
  color: var(--color-text-light);
  margin: 0;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.6;
    transform: scale(1.1);
  }
}

/* Error Message Styles */
.menu-error {
  text-align: center;
  background: linear-gradient(135deg, #fff5f5 0%, #fed7d7 100%);
  border: 1px solid #feb2b2;
  border-radius: 12px;
  padding: 24px 32px;
  margin: 20px auto;
  max-width: 400px;
  color: #c53030;
  font-size: 1rem;
  font-weight: 500;
  box-shadow: 0 4px 15px rgba(197, 48, 48, 0.1);
}

.menu-error::before {
  content: "⚠️ ";
}

