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

body {
  background: #111;
  color: #eee;
  font-family: system-ui, -apple-system, sans-serif;
  padding: 10px 20px;
  min-height: 100vh;
}

#grid,
#grid.tile-grid {
  display: block !important;
  grid-template-columns: none !important;
}

.page-group {
  margin-bottom: 22px;
}

.page-heading {
  font-size: 2.0rem;
  font-weight: 750;
  color: #ccc;
  margin: 0;                 /* was: 6px 0 10px — now handled by the row */
  letter-spacing: 0.12em;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.page-heading-row {
  position: relative;
  text-align: center;
  margin: 0 0 10px;
  min-height: 40px;
}

.page-back {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 110px;
  display: block;
  text-decoration: none;
  opacity: 0.85;
  transition: opacity 0.15s ease;
}

.page-back:hover {
  opacity: 1;
}

.page-back img {
  display: block;
  width: 100%;
  height: auto;
}

.folder-sub {
  font-size: 0.9rem;
  color: #888;
  margin-bottom: 26px;
}

.menu-logo {
  display: block;
  width: 100vw;
  max-width: 1000px;
  height: auto;
  margin: 0 auto 30px;
}

/* Top row: back button (left) + banner (centered in page) */
body.folder-page {
  position: relative;
}

/* ---------- Menu covers ---------- */
.menu-grid {
  max-width: 1000px;
  margin: 0 auto;
}

.menu-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px 5px; /* was 16px;*/
  margin-bottom: 16px;
}

.menu-cover {
  display: block;
  border-radius: 8px;
  overflow: hidden;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.menu-cover:hover {
  transform: scale(1.03);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
}

.menu-cover img {
  display: block;
  width: 100%;
  height: auto;
}

@media (max-width: 600px) {
  .menu-title { font-size: 1.5rem; }
}

/* ---------- Folder tile grid ---------- */
.tile-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 34px;
}

.tile {
  /*position: relative;            lets the caption sit over the video */
  background: #1a1a1a;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.15s ease;
}

.tile:hover {
  transform: scale(1.03);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
}

.tile video {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
  background: #000;
}

.tile .caption {
  padding: 5px 8px;
  font-size: 2.0rem;
  font-weight: 500;
  color: #f5f5f5;
  text-align: center;
  word-break: break-word;
  letter-spacing: 0.02em;
  /*text-shadow: 0 0 4px rgba(0,0,0,0.9);
  background: #111;*/
}
/*
.tile .caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 4px 10px 6px;
  background: none;
  color: #fff;
  font-size: 2rem;
  font-weight: 500;
  text-align: left;
  letter-spacing: 0.02em;
  line-height: 1.1;
  word-break: break-word;
  text-shadow:
    0 0 6px rgba(0, 0, 0, 0.95),
    0 0 12px rgba(0, 0, 0, 0.8),
    1px 1px 2px rgba(0, 0, 0, 1),
    -1px -1px 2px rgba(0, 0, 0, 1);
  pointer-events: none;
}*/

/* ---------- Lightbox ---------- */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.lightbox.open { display: flex; }

.lb-inner {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lb-inner video {
  max-width: 90vw;
  max-height: 78vh;
  background: #000;
  border-radius: 6px;
  display: block;
  object-fit: contain;
}

.lb-close {
  position: absolute;
  top: -60px;
  right: 0;
  background: rgba(0, 0, 0, 0.6);
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-radius: 8px;
  color: #fff;
  font-size: 2.2rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.lb-close:hover {
  background: rgba(0, 0, 0, 0.9);
  border-color: rgba(255, 255, 255, 0.8);
}

.lb-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.6);
  border: 2px solid rgba(255, 255, 255, 0.4);
  color: #fff;
  font-size: 2.2rem;
  font-weight: 700;
  width: 56px;
  height: 90px;
  cursor: pointer;
  border-radius: 8px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, border-color 0.15s ease;
  z-index: 10;
}

.lb-arrow:hover {
  background: rgba(0, 0, 0, 0.9);
  border-color: rgba(255, 255, 255, 0.75);
}

.lb-prev { left: 0px; }
.lb-next { right: 0px; }

@media (max-width: 900px) {
  .lb-arrow {
    width: 44px;
    height: 72px;
    font-size: 1.8rem;
  }
  .lb-prev { left: 8px; }
  .lb-next { right: 8px; }
}

.lb-footer {
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: #ccc;
  font-size: 1.5rem;
}

.lb-play {
  background: rgba(255,255,255,0.1);
  border: 2px solid rgba(255, 255, 255, 0.4);
  color: #fff;
  font-size: 1.6rem;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  min-width: 60px;
}
.lb-play:hover { background: rgba(255,255,255,0.2); }

.lb-caption {
  color: #eee;
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}