:root {
  --gap: 20px;
  --panel-padding: 25px;
  --panel-bg: #d8c2a0; /* light brown */
}

/* Base reset */
* { margin:0; padding:0; box-sizing:border-box; font-family: Arial, sans-serif; }

/* Hamburger */
.hamburger {
  width:34px;
  height:24px;
  position:fixed;
  top:15px;
  left:15px;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  cursor:pointer;
  z-index:111111;
}
.hamburger span {
  display: block;
  height: 4px;
  border-radius: 2px;
  background: #fff; /* changed from #333 to white */
  transition: all .35s ease;
}

.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px,5px); }
.hamburger.active span:nth-child(2) { opacity:0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px,-5px); }

/* Overlay */
.menu-overlay {
  position: fixed;
  inset: 0;
  display: flex;                /* keep flexbox active */
  align-items: flex-start;
  justify-content: center;
  background: rgba(207,179,150,0.5);
  z-index: 100000;
  padding: 100px;

  opacity: 0;
  transform: translateY(-100%);  
  pointer-events: none;

  transition: opacity 0.5s ease, transform 0.5s ease;
}
.menu-overlay.active { display:flex;   opacity: 1;
  transform: translateY(0);
  pointer-events: auto;}

/* Close button */
.menu-close {
  position:absolute;
  top:15px;
  right:20px;
  font-size:32px;
  color:#333;
  cursor:pointer;
  z-index:2100;
  user-select:none;
  transition: color .3s;
}
.menu-close:hover { color:#000; }

/* Panel */
.menu-panel {
  width:calc(100% - 40px);
  max-width:1200px;
  background: rgba(207,179,150,0);
  padding: var(--panel-padding);
  border-radius:0px;
  height: auto;           /* let it grow with content */
  padding-bottom: 50px;   /* extra 50px under images/text */
}

/* Inner wrapper */
.menu-inner { width:100%; }

/* Flex container for 4 items */
.menu-container {
  display:flex;
  flex-wrap:wrap;
  gap: var(--gap);
  justify-content:space-between;
  align-items:stretch;
}

/* Menu items */
.menu-item {
  flex: 0 0 calc((100% - 3*var(--gap))/4);
  max-width: calc((100% - 3*var(--gap))/4);
  display:flex;
  flex-direction:column;
}

/* Link wraps image + text */
.menu-item a { display:flex; flex-direction:column; text-decoration:none; color:inherit; height:100%; }

/* Image */
.menu-item img {
  width:100%;
  display:block;
  border:2px solid rgba(255,255,255,0.6);
  border-radius: 4px 4px 0 0;
  transition: filter .28s ease;
}

/* Text below image */
.menu-item p {
  margin-top:8px;
  background:#fff;
  padding:10px;
  text-align:center;
  border-radius:0 0 4px 4px;
  font-size:1.2rem;
}

/* Hover effect */
.menu-item a:hover img {
  opacity: 0.6; /* adjust 0.7 to any value you like */
  transition: opacity 0.3s ease;
}

/* Optional: keep transition smooth on non-hover state */
.menu-item img {
  transition: opacity 0.3s ease, border 0.3s ease;
}

/* Tablet portrait: 2 per row */
@media(max-width:900px) {
  .menu-item {
    flex: 0 0 calc((100% - 1*var(--gap))/2);
    max-width: calc((100% - 1*var(--gap))/2);
  }
}

/* Mobile: 1 per row, hide images */
@media(max-width:600px) {
  .menu-item {
    flex:0 0 100%;
    max-width:100%;
  }
  .menu-item img { display:none; }
  .menu-item p { font-size:1.25rem; padding:14px; }
}