/* Large displays: cap the reading width */
@media (min-width: 1600px) {
  :root {
    --gclc-shell-max: 1320px;
  }
}

@media (min-width: 1281px) {
  :root {
    --gclc-rail-width: 92px;
  }
}

/* Tablet / small desktop tweaks */
@media (max-width: 1024px) {
  .gclc-hero {
    min-height: auto;
    padding: 3rem 1.75rem;
  }
  .gclc-hero__content {
    max-width: 100%;
  }
  .gclc-hero__overlay {
    background: linear-gradient(0deg, rgba(11, 7, 24, 0.96) 0%, rgba(11, 7, 24, 0.9) 55%, rgba(11, 7, 24, 0.45) 100%);
  }
  .gclc-selector__grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .gclc-callout {
    grid-template-columns: minmax(0, 1fr);
  }
  .gclc-guide-layout {
    flex-direction: column !important;
  }
  .gclc-guide-center {
    order: -1 !important;
    margin-bottom: 1rem !important;
  }
  .gclc-guide-col {
    width: 100% !important;
    max-width: 640px !important;
  }
  .gclc-comparison-card {
    flex-direction: column !important;
    gap: 1.25rem !important;
  }
  .gclc-comparison-badge {
    writing-mode: horizontal-tb !important;
    transform: none !important;
    width: 100% !important;
    min-height: auto !important;
    padding: 0.6rem 1rem !important;
    text-align: left !important;
    justify-content: flex-start !important;
  }
  .gclc-game-img-link {
    flex: 0 0 auto !important;
    width: 100% !important;
  }
  .gclc-genre-banner {
    flex-direction: column !important;
    text-align: left !important;
    padding: 2rem 1.5rem !important;
  }
  .gclc-genre-banner__media {
    order: -1 !important;
    margin-bottom: 1rem !important;
    width: 100% !important;
  }
  .gclc-compare-split {
    flex-direction: column !important;
    gap: 1.5rem !important;
  }
  .gclc-compare-split__media {
    order: -1 !important;
    margin-bottom: 1rem !important;
    width: 100% !important;
  }
  .gclc-contact-showcase {
    flex-direction: column !important;
    padding: 2rem 1.5rem !important;
    gap: 2rem !important;
  }
  .gclc-contact-showcase__info,
  .gclc-contact-showcase__form-wrapper {
    max-width: 100% !important;
    width: 100% !important;
  }
  .gclc-contact-btn {
    width: 100% !important;
  }
}

/* ---------- Mobile navigation switch (below 920px) ---------- */
@media (max-width: 919px) {
  .gclc-shell {
    grid-template-columns: minmax(0, 1fr);
  }
  .gclc-rail {
    display: none;
  }
  .gclc-topbar {
    display: flex;
  }
  .gclc-utility {
    gap: 0.5rem 1rem;
  }
}

@media (min-width: 920px) {
  .gclc-drawer {
    display: none !important;
  }
}

/* ---------- Card and media grids scale up ---------- */
@media (min-width: 640px) {
  .gclc-cards3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 960px) {
  .gclc-cards3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .gclc-media {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .gclc-media--reverse .gclc-media__figure {
    order: 2;
  }

  .gclc-media--reverse .gclc-media__body {
    order: 1;
  }
}

/* ---------- Stacking of two-column blocks ---------- */
@media (max-width: 768px) {
  .gclc-entry,
  .gclc-entry:nth-child(even) {
    grid-template-columns: minmax(0, 1fr);
  }
  .gclc-entry__media,
  .gclc-entry:nth-child(even) .gclc-entry__media {
    order: -1;
  }
  .gclc-entry__media img {
    min-height: 180px;
    aspect-ratio: 16 / 9;
  }
  .gclc-split {
    grid-template-columns: minmax(0, 1fr);
  }
  .gclc-route {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.4rem;
  }
  .gclc-glossary > div {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.25rem;
  }
  .gclc-callout__note {
    grid-column: 1 / -1;
  }
}

/* ---------- Narrow-screen comparison handling ---------- */
@media (max-width: 620px) {
  .gclc-picker {
    grid-template-columns: minmax(0, 1fr);
  }
  .gclc-summary__grid {
    grid-template-columns: minmax(0, 1fr);
  }
  table.gclc-matrix {
    min-width: 640px;
  }
}

/* ---------- Small phones ---------- */
@media (max-width: 480px) {
  .gclc-actions .gclc-btn {
    width: 100%;
  }
  .gclc-cookie__actions .gclc-btn {
    flex: 1 1 100%;
  }
  .gclc-footer__bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 360px) {
  :root {
    --gclc-step-6: 3rem;
  }
  .gclc-route {
    padding-block: 1.1rem;
  }
}

/* Ensure body text never dips below readable size */
@media (max-width: 480px) {
  body {
    font-size: 1rem;
  }
  .gclc-note,
  .gclc-coord {
    font-size: 0.8rem;
  }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .gclc-drawer__panel,
  .gclc-drawer__scrim,
  .gclc-totop,
  .gclc-btn {
    transition: none !important;
  }
}

/* ---------- Print (comparison focus) ---------- */
@media print {
  .gclc-rail,
  .gclc-topbar,
  .gclc-drawer,
  .gclc-cookie,
  .gclc-totop,
  .gclc-footer,
  .gclc-picker,
  .gclc-actions,
  .gclc-utility__link {
    display: none !important;
  }
  .gclc-shell {
    grid-template-columns: minmax(0, 1fr);
  }
  body {
    background: #fff;
    color: #000;
  }
  .gclc-matrix-scroll {
    overflow: visible;
    border: 0;
  }
  table.gclc-matrix {
    min-width: 0;
    width: 100%;
    font-size: 11px;
  }
  .gclc-matrix thead th {
    background: #000 !important;
    color: #fff !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  a[href]::after {
    content: "";
  }
}
