/* ==========================================================================
   GTA Cache — Mod page stylesheet
   ========================================================================== */

/* -------- Hero -------- */

.mod-hero {
  position: relative;
  margin-top: 16px;
  border-radius: 10px 10px 0px 0px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  isolation: isolate;
}
.mod-hero__bg {
  position: absolute;
  inset: 0;
  background-color: #191b27;
  background-image:
    radial-gradient(circle at 78% 18%, rgba(127,181,57,.12), transparent 55%),
    linear-gradient(135deg, #23252f 0%, #14141c 100%);
  background-size: cover;
  background-position: center;
  z-index: -2;
  filter: saturate(1.1) contrast(1.05);
}
.mod-hero__overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(19,20,28,.35) 0%, rgba(19,20,28,.98) 100%),
    linear-gradient(90deg, rgba(19,20,28,.85) 0%, rgba(19,20,28,.45) 55%, rgba(19,20,28,.7) 100%),
    rgba(19,20,28,.35);
  z-index: -1;
}
.mod-hero__inner {
  padding: 64px 40px 40px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-height: 460px;
  justify-content: flex-end;
}
.mod-hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 4px;
}
.mod-hero h1 {
  font-size: clamp(32px, 5vw, 56px);
  margin: 0;
  max-width: 780px;
  text-shadow: 0 2px 18px rgba(0,0,0,.5);
}
.mod-hero__tagline {
  font-size: 17px;
  color: #d2d5dc;
  max-width: 700px;
  margin: 0;
}
.mod-hero__cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 8px;
}

/* -------- Stat strip -------- */

.stat-strip {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 var(--radius) var(--radius);
  margin-top: -1px;
  overflow: hidden;
}
.stat-strip__item {
  padding: 18px 22px;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.stat-strip__item:last-child { border-right: none; }
.stat-strip__label {
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-faint);
  font-weight: 600;
}
.stat-strip__value {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 6px;
}
.stat-strip__value .accent { color: var(--accent-hi); }
.stat-strip__value .gold   { color: var(--gold); }

/* -------- Layout grid -------- */

.mod-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 40px;
  margin-top: 48px;
}

/* -------- Content sections -------- */

.mod-content > section {
  margin-bottom: 44px;
}
.mod-content h2 {
  font-size: 28px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
}
.mod-content h2::before {
  content: "";
  width: 4px;
  height: 22px;
  background: var(--accent);
  border-radius: 2px;
  display: inline-block;
}
.mod-content h3 {
  font-size: 20px;
  margin-top: 28px;
  color: var(--text);
}
.mod-content ul, .mod-content ol {
  padding-left: 22px;
  color: #c9ccd3;
}
.mod-content li { margin-bottom: 8px; }
.mod-content ul li::marker { color: var(--accent); }
.mod-content ol li::marker { color: var(--accent-hi); font-weight: 700; }

/* Feature grid */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  list-style: none;
  padding: 0;
}
.feature-grid li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 15px;
  color: var(--text);
  margin: 0;
}
.feature-grid li svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--accent-hi);
}
/* When an item contains an inline link, fall back to inline layout so the
   flex `gap` doesn't space out the surrounding text / links. */
.feature-grid li:has(a) {
  display: block;
}
.feature-grid li:has(a) > svg {
  display: inline-block;
  vertical-align: -4px;
  margin-right: 10px;
  margin-top: 0;
}

/* Location cards */
.location-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
}
.location-cards li {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
}
.location-cards strong {
  font-family: var(--font-display);
  font-size: 16px;
  color: var(--text);
  letter-spacing: .02em;
}
.location-cards span {
  font-size: 13px;
  color: var(--text-faint);
}

/* Callout box */
.callout {
  background: linear-gradient(135deg, rgba(127,181,57,.08), rgba(127,181,57,.02));
  border: 1px solid rgba(127,181,57,.25);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 18px 22px;
  margin: 20px 0;
}
.callout p:last-child { margin-bottom: 0; }
.callout strong { color: var(--accent-hi); }

/* Installation steps */
.install-steps {
  counter-reset: step;
  list-style: none;
  padding: 0;
}
.install-steps li {
  position: relative;
  padding: 16px 18px 16px 64px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
  counter-increment: step;
}
.install-steps li::before {
  content: counter(step);
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent);
  color: #0b0c0f;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Screenshot gallery */
.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.gallery a {
  display: block;
  position: relative;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
  aspect-ratio: 16 / 10;
  background: var(--bg-2);
}
.gallery a::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.35);
  opacity: 0;
  transition: opacity .15s ease;
}
.gallery a:hover::after { opacity: 1; }
.gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s ease;
}
.gallery a:hover img { transform: scale(1.05); }

/* -------- Showcase figure (single in-content image) -------- */

.mod-figure { margin: 4px 0 38px; }
.mod-figure__frame {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  aspect-ratio: 16 / 9;
  box-shadow: var(--shadow-lg);
}
.mod-figure__frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.mod-figure figcaption {
  margin-top: 10px;
  font-size: 13px;
  color: var(--text-faint);
  text-align: center;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(8, 9, 14, .92);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  opacity: 0;
  visibility: hidden;
  transition: opacity .2s ease, visibility .2s ease;
}
.lightbox.is-open {
  opacity: 1;
  visibility: visible;
}
.lightbox__img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: var(--radius-sm);
  box-shadow: 0 30px 80px -20px rgba(0,0,0,.8);
}
.lightbox__close {
  position: absolute;
  top: 20px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.15);
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s ease;
}
.lightbox__close:hover { background: rgba(255,255,255,.16); }
.lightbox__close svg { width: 20px; height: 20px; }
body.has-lightbox { overflow: hidden; }

/* Placeholder for missing images */
.img-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  background:
    linear-gradient(135deg, var(--bg-3) 0%, var(--bg-2) 100%);
  color: var(--text-faint);
  font-size: 12px;
  letter-spacing: .1em;
  text-transform: uppercase;
}

/* Bottom download band */
.download-band {
  background:
    radial-gradient(circle at 20% 50%, rgba(127,181,57,.18), transparent 60%),
    var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.download-band__text h3 {
  margin: 0 0 4px;
  font-size: 22px;
}
.download-band__text p {
  margin: 0;
  color: var(--text-dim);
  font-size: 14px;
}

/* Share row */
.share-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 32px 0 0;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.share-row__label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--text-faint);
  margin-right: 4px;
}
.share-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-2);
  border: 1px solid var(--border);
  color: var(--text-dim);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all .15s ease;
}
.share-btn:hover {
  background: var(--bg-3);
  color: var(--accent-hi);
  border-color: var(--border-2);
}
.share-btn svg { width: 16px; height: 16px; }

/* -------- Sidebar -------- */

.mod-sidebar {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.side-card {
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.side-card__title {
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin: 0 0 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

/* Quick info */
.quick-info {
  list-style: none;
  margin: 0;
  padding: 0;
}
.quick-info li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.quick-info li:last-child { border-bottom: none; }
.quick-info dt {
  color: var(--text-faint);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.quick-info dd {
  margin: 0;
  color: var(--text);
  font-weight: 500;
}

/* Author card */
.author-card {
  display: flex;
  align-items: center;
  gap: 14px;
}
.author-card__avatar {
  width: 52px;
  height: 52px;
  border-radius: var(--radius);
  background: var(--bg-3);
  overflow: hidden;
  flex-shrink: 0;
  border: 1px solid var(--border);
}
.author-card__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: var(--radius);
}
.author-card__name {
  font-family: var(--font-display);
  font-size: 18px;
  color: var(--text);
  margin: 0;
}
.author-card__role {
  font-size: 12px;
  color: var(--text-faint);
  margin: 2px 0 0;
  text-transform: uppercase;
  letter-spacing: .06em;
}

/* Related list */
.related-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.related-list a {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 8px;
  margin: -8px;
  border-radius: var(--radius-sm);
  color: var(--text);
}
.related-list a:hover {
  background: var(--bg-2);
}
.related-list__icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: rgba(127,181,57,.10);
  color: var(--accent-hi);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.related-list__icon svg {
  width: 22px;
  height: 22px;
}
/* Legacy thumb (kept narrowly in case any page hasn't been migrated yet) */
.related-list__thumb {
  width: 64px;
  height: 48px;
  border-radius: 4px;
  background: var(--bg-3);
  flex-shrink: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: var(--text-faint);
  letter-spacing: .08em;
}
.related-list__thumb img {
  width: 100%; height: 100%; object-fit: cover;
}
.related-list__meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.related-list__meta strong {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-height: 1.3;
}
.related-list__meta span {
  font-size: 12px;
  color: var(--text-faint);
}

/* Category list */
.cat-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.cat-list li { margin-bottom: 6px; }
.cat-list a {
  display: flex;
  justify-content: space-between;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-dim);
  font-size: 14px;
  transition: background .15s, color .15s;
}
.cat-list a:hover {
  background: var(--bg-2);
  color: var(--accent-hi);
}
.cat-list .count {
  font-size: 12px;
  color: var(--text-faint);
  background: var(--bg-2);
  padding: 2px 8px;
  border-radius: 99px;
}

/* -------- Responsive -------- */

@media (max-width: 1080px) {
  .mod-layout {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .mod-sidebar {
    position: static;
    max-height: none;
  }
  .stat-strip { grid-template-columns: repeat(3, 1fr); }
  .stat-strip__item:nth-child(4),
  .stat-strip__item:nth-child(5) { border-top: 1px solid var(--border); }
  .stat-strip__item:nth-child(3) { border-right: none; }
  .stat-strip__item:nth-child(4) { border-right: 1px solid var(--border); }
}

@media (max-width: 720px) {
  .mod-hero__inner {
    padding: 40px 22px 28px;
    min-height: 380px;
  }
  .stat-strip { grid-template-columns: repeat(2, 1fr); }
  .stat-strip__item { border-right: 1px solid var(--border); }
  .stat-strip__item:nth-child(even) { border-right: none; }
  .stat-strip__item:nth-child(n+3) { border-top: 1px solid var(--border); }
  .feature-grid,
  .location-cards,
  .gallery {
    grid-template-columns: 1fr;
  }
  .download-band {
    text-align: center;
    flex-direction: column;
  }
}
