/*
  A game's page below its hero (themes/vault-squarespace/layouts/games/single.html), as the single game page of
  VaultLearningGames/vault-hugo-rebuild: its class names, layout, colours and spacing (that repo's
  themes/vault-theme/static/css/style.css, "Game Single Page", "Content Layout", "Standard Item Styling",
  "Gameplay Video Section", "Screenshots Section", "Lightbox Styles" and the tag chips), with the fonts the site
  already has (vault-sq.css: --heading for headings, --body for text, --meta for the chips) in place of the
  reference's Lato / IBM Plex Mono. Loaded only by the game page; nothing here touches the first (Squarespace)
  section, the header, the footer or the player.
*/
.game-single { background: #f8f9fa; color: #333; padding: 2rem 0 3rem; font-weight: 400; line-height: 1.7; }
.game-single__wrap { max-width: 1600px; margin: 0 auto; padding: 0 var(--gutter, 20px); }
.game-single h2 { font-family: var(--heading); color: #1f2937; }
.game-single a { color: inherit; }
.game-single img { display: block; max-width: 100%; }

/*
  The meta bar (partials/vault-game-tags.html): the Maker, Grade and Subject groups between the hero and the
  content card. A white card like the sections under it (.game-content: white, 12px corners, the same side padding),
  holding one row of groups, each a quiet label over its chips; the groups wrap as a row and stack on a phone.
  All of the spacing is the container's gap (the groups and the chip rows carry no margins of their own), so a game
  with one group, or with a long list of subjects, reads the same as a game with all three. The chips keep the
  reference's colours (vault-hugo-rebuild's "Standard Item Styling"), a size up and with a little more padding so
  they read as buttons rather than labels; the label and the spacing are the site's.
*/
.game-single .game-meta {
  display: flex; flex-wrap: wrap; align-items: flex-start; gap: 1.25rem 3rem;
  margin: 0 0 1.5rem; padding: 1.5rem 2rem; list-style: none;
  background: #fff; border-radius: 12px; }
.game-single .meta-group {
  display: flex; flex-direction: column; gap: 0.625rem; margin: 0; padding: 0; min-width: 0; max-width: 100%; }
.game-single .meta-label {
  display: block; margin: 0; font-family: var(--meta); font-size: 0.75rem; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase; line-height: 1.3; color: #6b7280; }
.game-single .meta-tags {
  display: flex; flex-wrap: wrap; gap: 0.625rem; margin: 0; padding: 0; list-style: none; min-width: 0; }
.game-single .grade-tag, .game-single .subject-tag, .game-single .topic-tag, .game-single .maker-tag {
  display: inline-block; max-width: 100%; padding: 0.4rem 1rem; border-radius: 999px; font-family: var(--meta);
  font-size: 0.9375rem; font-weight: 500; line-height: 1.5; text-decoration: none; overflow-wrap: break-word; }
.game-single .grade-tag { background: #dbeafe; color: #1e40af; }
.game-single .subject-tag { background: #dcfce7; color: #166534; }
.game-single .topic-tag { background: #fef3c7; color: #92400e; }
.game-single .maker-tag { background: #f3e8ff; color: #7c3aed; }
/* A maker that links: the chip's own colour, underlined on hover and on keyboard focus only. */
.game-single a.maker-tag { color: #7c3aed; text-decoration: none; transition: background-color 0.2s ease; }
.game-single a.maker-tag:hover, .game-single a.maker-tag:focus-visible {
  background: #e9d5ff; text-decoration: underline; text-underline-offset: 2px; }
.game-single a.maker-tag:focus-visible { outline: 2px solid rgba(124, 58, 237, 0.6); outline-offset: 2px; }
/* On a phone the groups read down the page, one under the other. */
@media (max-width: 640px) {
  .game-single .game-meta { flex-direction: column; gap: 1.25rem; padding: 1.25rem; }
  .game-single .meta-group { width: 100%; }
}

/* Content layout: text sections on the left (3), trailer and screenshots on the right (2) */
.game-single .game-content { background: #fff; padding: 2rem 2rem 1rem; border-radius: 12px; }
.game-single .content-layout { display: flex; gap: 3rem; margin: 0 0 1rem; align-items: flex-start; min-height: 0; }
.game-single .content-layout > .content-sections { flex: 3; min-width: 0; }
.game-single .content-layout > .right-column { flex: 2; min-width: 0; }
.game-single .content-sections { max-width: 100%; margin: 0 auto; display: flex; flex-direction: column; gap: 2rem; }
.game-single .content-section h2 { margin: 0 0 1rem; font-size: 1.5rem; line-height: 1.3; font-weight: 600; }
.game-single .content-section .section-body { line-height: 1.7; color: #374151; }
.game-single .content-section .section-body p { margin: 0 0 1rem; white-space: normal; }
.game-single .content-section .section-body p:last-child { margin-bottom: 0; }
.game-single .content-section .section-body a { color: #0f766e; text-decoration: underline; text-underline-offset: 2px; }
.game-single .content-section .section-body a:hover { color: #115e59; }
.game-single .content-section .section-body ul, .game-single .content-section .section-body ol { margin: 0 0 1rem; padding-left: 1.5rem; }

/* Educational Standards: one card per standard */
.game-single .standard-item { margin-bottom: 1.5rem; padding: 1rem; background: #f8f9fa; border-radius: 6px; }
.game-single .standard-item:last-child { margin-bottom: 0; }
.game-single .standard-item strong { display: block; font-family: var(--meta); font-size: 1.1rem; color: #1f2937; margin-bottom: 0.5rem; }
.game-single .standard-item p { margin: 0; color: #4b5563; line-height: 1.6; }

/* Right column: the trailer card, then the screenshots card */
.game-single .right-column { display: flex; flex-direction: column; gap: 1.5rem; }
.game-single .gameplay-video-section, .game-single .screenshots-section {
  background: #fff; padding: 1.5rem; border-radius: 8px; border: 1px solid #e5e7eb; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); }
.game-single .gameplay-video-section h2, .game-single .screenshots-section h2 { margin: 0 0 1.5rem; font-size: 1.25rem; line-height: 1.3; font-weight: 600; }
.game-single .video-container { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: 6px; overflow: hidden; border: 1px solid #e5e7eb; background: #000; }
.game-single .video-container iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: none; }
.game-single .video-link { margin: 0.75rem 0 0; font-size: 0.875rem; color: #6b7280; }
.game-single .video-link a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.game-single .video-link a:hover { color: #1f2937; }

/* Screenshots: a 3-column grid of square thumbnails (2 on tablets, 1 on phones) */
.game-single .screenshots-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.75rem; }
.game-single .screenshot-item { display: block; width: 100%; padding: 0; margin: 0; background: #f3f4f6; cursor: pointer;
  border-radius: 6px; overflow: hidden; transition: transform 0.2s ease, box-shadow 0.2s ease; border: 1px solid #e5e7eb; aspect-ratio: 1; }
.game-single .screenshot-item:hover, .game-single .screenshot-item:focus-visible { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); outline: none; }
.game-single .screenshot-item:focus-visible { box-shadow: 0 0 0 3px rgba(0, 184, 163, 0.6); }
.game-single .screenshot-item img { width: 100%; height: 100%; object-fit: cover; display: block; }

@media (max-width: 768px) {
  .game-single .game-content { padding: 1.5rem 1.25rem 0.75rem; }
  .game-single .content-layout { flex-direction: column; gap: 2rem; }
  .game-single .content-layout > .content-sections, .game-single .content-layout > .right-column { flex: none; width: 100%; }
  .game-single .screenshots-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .game-single .screenshots-grid { grid-template-columns: 1fr; }
}

/* Lightbox: the full-size screenshot over a dark blur (static/sq/js/game-single.js) */
.lightbox { position: fixed; z-index: 9999; left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.9); backdrop-filter: blur(5px); }
.lightbox[hidden] { display: none; }
.lightbox-content { position: relative; margin: auto; padding: 20px; width: 90%; max-width: 1200px; height: 90%; display: flex; align-items: center; justify-content: center; }
.lightbox-close { position: absolute; top: 20px; right: 35px; color: #fff; font-size: 40px; font-weight: bold; line-height: 1; cursor: pointer;
  z-index: 10000; transition: color 0.3s ease; background: none; border: 0; padding: 0; }
.lightbox-close:hover, .lightbox-close:focus-visible { color: #00ECD0; outline: none; }
#lightbox-image { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; border-radius: 8px; box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5); }
.lightbox-nav { position: absolute; top: 50%; left: 0; transform: translateY(-50%); width: 100%; display: flex; justify-content: space-between; pointer-events: none; }
.lightbox-prev, .lightbox-next { background: rgba(0, 0, 0, 0.5); color: #fff; border: none; font-size: 30px; line-height: 1; padding: 15px 20px; cursor: pointer;
  border-radius: 50%; transition: background-color 0.3s ease; pointer-events: auto; }
.lightbox-prev:hover, .lightbox-next:hover, .lightbox-prev:focus-visible, .lightbox-next:focus-visible { background: rgba(0, 236, 208, 0.8); outline: none; }
.lightbox-prev { margin-left: 20px; }
.lightbox-next { margin-right: 20px; }
@media (max-width: 768px) {
  .lightbox-content { width: 95%; height: 95%; padding: 10px; }
  .lightbox-close { top: 10px; right: 20px; font-size: 30px; }
  .lightbox-prev, .lightbox-next { font-size: 24px; padding: 10px 15px; }
  .lightbox-prev { margin-left: 10px; }
  .lightbox-next { margin-right: 10px; }
}
