
/* ── INTRO SECTION ─────────────────────────────────────────────────── */

.menu-intro {
  padding: 5rem 1rem 6rem;
  background-color: var(--text-nearly-black);
}

.menu-intro-wrapper {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  gap: 2rem;
}

.intro-left {
  flex: 1 1 45%;
}

.intro-right {
  flex: 1 1 45%;
}

.menu-label {
  font-size: 1rem;
  font-weight: 700;
  color: #c52d2f;
  margin-bottom: 0.5rem;
  letter-spacing: 0.05em;
}

.menu-headline {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--bg-cream);
  line-height: 1.2;
}

.intro-heading {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  color: var(--bg-cream);
}

.intro-description {
  font-size: 1rem;
  color: var(--bg-cream);
  line-height: 1.6;
}


/* ── MENU SECTION ─────────────────────────────────────────────────── */
.menu-section {
  padding: 0rem 1rem;
  background-color: var(--accent-warm);
  color: var(--text-nearly-black);
}

.menu-title {
  text-align: center;
  font-size: 2.5rem;
  font-family: var(--font-heading);
  margin-bottom: 2rem;
  color: var(--text-nearly-black);
}


/* ── GRID LAYOUT ─────────────────────────────────────────────────── */
.menu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto 2rem;
  padding: 0 1rem;
}

/* ── CARD STYLING ────────────────────────────────────────────────── */
.menu-card {
  background-color: var(--bg-cream);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
  text-align: center;
  min-height: 220px;  /* consistent card height */
  cursor: pointer;
}

.menu-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.menu-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.menu-card h3 {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  margin: 1rem 0 0.5rem;
  color: var(--text-nearly-black);
}

.menu-card p {
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text-dark-gray);
  padding: 0 1rem 1rem;
  line-height: 1.6;
}

/* ── MENU SUB-SECTIONS ─────────────────────────────────────────────────── */

.menu-subsection {
  margin-bottom: 4rem;
  text-align: center;
}

.subsection-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  max-width: 1200px;
  margin: 2rem auto 2rem auto;
  padding: 1rem;
}

.subsection-header h2 {
  font-size: 1rem;
  font-weight: 700;
  font-family: var(--font-heading);
  color: var(--text-nearly-black);
  white-space: nowrap;
}

.subsection-header hr {
  flex-grow: 1;
  height: 1px;
  border: none;
  background-color: var(--text-nearly-black);
}

.menu-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* ── MODAL WRAPPER ─────────────────────────────────────────────────── */
/* Modal backdrop */
.modal {
  display: none;
  position: fixed;
  z-index: 999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  justify-content: center;
  align-items: center;
}

/* Modal content box */
.modal-content {
  position: relative;
  background-color: var(--bg-cream);
  display: flex;
  flex-direction: row;
  border-radius: 12px;
  max-width: 900px;
  width: 90%;
  height: auto;
  max-height: 90vh;          /* LIMIT HEIGHT */
  display: flex;
  flex-direction: row;
  overflow: hidden;/* SCROLL IF TOO TALL */
  box-shadow: 0 0 20px rgba(0,0,0,0.2);
}

/* Left side image */
.modal-left {
  flex: 1 1 50%;
  max-height: 100%;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}

.modal-left img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}


/* Right side text */
.modal-right {
  width: 66.6%;
  margin-left: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Close button */
.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 2rem;
  background: none;
  border: none;
  color: #333;
  cursor: pointer;
}

/* ────────────── RESPONSIVE MODAL ────────────── */
@media (max-width: 768px) {
  .modal-content {
    flex-direction: column;
    width: 95%;
    max-width: none;         /* no max-width restriction */
    margin: 0 auto;          /* center it */
    border-radius: 12px;
  }

  .modal-left {
    width: 100%;
    height: auto;
    max-height: 220px;
  }

  .modal-left img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .modal-right {
    width: 100%;
    margin: 2rem 1rem 1.5rem 1rem; /* uniform margin all sides */
    text-align: left;
  }

  .modal-right h2,
  .modal-right h3 {
    font-size: 1.25rem;
    line-height: 1.3;
    margin-bottom: 0.5rem;
    word-wrap: break-word;
  }

  .modal-right p {
    font-size: 0.95rem;
    line-height: 1.4;
  }

  .modal-close {
    top: 0.5rem;
    right: 0.5rem;
    font-size: 1.5rem;
  }
}

/* --- Keep everything inside the viewport --- */
.modal, .modal * { box-sizing: border-box; }

/* Add a small gutter inside the backdrop so the card can center cleanly */
@media (max-width: 900px) {
  .modal { padding: 12px; } /* edge gutter */
}

/* Mobile/tablet modal layout */
@media (max-width: 900px) {
  .modal-content {
    flex-direction: column;
    /* fill available width but never exceed the viewport */
    width: 100%;
    max-width: calc(100vw - 24px);  /* 24px = 12px gutter on each side */
    margin: 0;                      /* rely on .modal padding for centering */
    border-radius: 12px;
    overflow: hidden;               /* clip any stray child overflow */
  }

  .modal-left {
    width: 100%;
    max-height: 220px;
  }
  .modal-left img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;                 /* removes inline image gap */
  }

  .modal-right {
    width: 100%;
    /* kill the desktop push that causes overflow */
    margin: 0 !important;
    /* use inner padding instead of outer margin */
    padding: 1rem 1rem 1.25rem;
    text-align: left;
    overflow-wrap: anywhere;        /* avoid long-word overflow */
  }

  .modal-right h2,
  .modal-right h3 {
    font-size: 1.25rem;
    line-height: 1.3;
    margin-bottom: 0.5rem;
  }
  .modal-right p {
    font-size: 0.95rem;
    line-height: 1.45;
  }

  .modal-close {
    top: 0.5rem;
    right: 0.5rem;
    font-size: 1.5rem;
  }
}

/* Very small phones */
@media (max-width: 480px) {
  .modal-left { max-height: 180px; }
  .modal-right { padding: 0.85rem 0.9rem 1rem; }
  .modal-right h2, .modal-right h3 { font-size: 1.1rem; }
  .modal-right p { font-size: 0.88rem; line-height: 1.35; }
}

/* --- Modal open/close animation --- */
.modal {
  /* keep your existing layout props (position: fixed, etc.) */
  opacity: 0;
  pointer-events: none;
  transition: opacity 240ms ease;
}

.modal.is-visible {
  opacity: 1;
  pointer-events: auto;
}

/* animate the panel itself */
.modal-content {
  transform: translateY(16px) scale(0.98);
  opacity: 0;
  transition: transform 260ms cubic-bezier(.22,.61,.36,1), opacity 260ms ease;
  will-change: transform, opacity;
}

/* when visible, bring it in */
.modal.is-visible .modal-content {
  transform: translateY(0) scale(1);
  opacity: 1;
}

/* motion safety */
@media (prefers-reduced-motion: reduce) {
  .modal,
  .modal-content {
    transition: none !important;
  }
}

/* Subsection description (sits under the header, above the grid) */
.subsection-desc {
  max-width: 900px;
  margin: -0.25rem auto 1.75rem; /* tucks closer to the header */
  padding: 0 1rem;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-dark-gray);
  text-align: center;
  font-weight: 600;   /* <-- added bold */
}

/* Optional: slightly smaller on phones */
@media (max-width: 600px) {
  .subsection-desc {
    font-size: 0.95rem;
    margin-bottom: 1.25rem;
  }
}
