/* ==========================================================
   GameQuarium — Theme overrides & component-specific styles
   Bootstrap 5.3 handles layout, spacing, flex, text utilities.
   Only add CSS here for things Bootstrap can't do.
   ========================================================== */

/* --- Design tokens --- */
:root {
  --gq-teal:        #00897b;
  --gq-teal-dark:   #00695c;
  --gq-teal-deep:   #004d40;
  --gq-teal-light:  #e0f2f1;
  --gq-coral:       #ff6f61;
  --gq-coral-hover: #e65b4f;
  --gq-text:        #263238;
  --gq-text-muted:  #607d8b;
  --gq-bg:          #f0f7f6;
  --gq-white:       #ffffff;
  --gq-radius:      12px;
  --gq-radius-sm:   8px;
  --gq-radius-lg:   18px;
  --gq-shadow-hover:0 8px 24px rgba(0,77,64,.14);
  --gq-font:        'Nunito', 'Segoe UI', sans-serif;
}

/* --- Base theme (colors, font — not available in Bootstrap) --- */
body {
  font-family: var(--gq-font) !important;
  color: var(--gq-text);
  background: var(--gq-bg) !important;
  -webkit-text-size-adjust: 100%;
}

h1, h2, h3 {
  font-family: var(--gq-font) !important;
  font-weight: 800 !important;
  color: var(--gq-text);
}

h2 span {
  text-decoration: underline;
  text-decoration-color: var(--gq-teal);
  text-underline-offset: 4px;
}

a { color: var(--gq-teal); }
a:hover { color: var(--gq-teal-dark); }

img { max-width: 100%; height: auto; }

/* --- Header (gradient bg, nav pill styling) --- */
.site-header {
  background: linear-gradient(135deg, var(--gq-teal-deep) 0%, var(--gq-teal) 100%);
}
.site-header__logo {
  height: 48px;
  width: auto;
  display: block;
}
.site-header__tagline {
  font-size: .8rem;
  color: rgba(255,255,255,.7);
  font-weight: 600;
}
.site-header__nav-link {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: .5rem 1rem;
  min-height: 48px;
  border-radius: 20px;
  font-size: .85rem;
  font-weight: 700;
  color: rgba(255,255,255,.85);
  text-decoration: none;
  transition: background .15s, color .15s;
}
.site-header__nav-link:hover {
  background: rgba(255,255,255,.18);
  color: #fff;
}

/* --- Content block (white card wrapping page content) --- */
.content-block {
  padding: 2rem !important;
  background-color: var(--gq-white) !important;
  border-radius: 0 0 var(--gq-radius) var(--gq-radius);
}
.gq-hero + .content-block {
  padding-top: 1.5rem !important;
}

/* --- Hero --- */
.gq-hero {
  background: linear-gradient(135deg, var(--gq-teal) 0%, #26a69a 60%, #4db6ac 100%);
  padding: 3.5rem 1rem 2.5rem;
  text-align: center;
  color: #fff;
}
.gq-hero__title {
  font-size: clamp(1.6rem, 4vw, 2.5rem) !important;
  font-weight: 800 !important;
  margin: 0 0 .5rem !important;
  color: #fff;
}
.gq-hero__sub {
  font-size: 1.05rem;
  font-weight: 600;
  opacity: .85;
  margin: 0;
}

/* --- App card (custom component — no BS equivalent) --- */
.gq-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.1rem;
  background: var(--gq-white);
  border: 1px solid #e0e0e0;
  border-radius: var(--gq-radius);
  text-decoration: none !important;
  color: inherit;
  transition: box-shadow .2s, border-color .2s, transform .2s;
  min-height: 48px;
  overflow: hidden;
}
.gq-card:hover {
  border-color: var(--gq-teal);
  box-shadow: var(--gq-shadow-hover);
  transform: translateY(-2px);
  color: inherit;
  text-decoration: none;
}
.gq-card__icon {
  width: 64px;
  min-width: 64px;
  height: 64px;
  border-radius: 14px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--gq-teal-light);
  aspect-ratio: 1 / 1;
}
.gq-card__info {
  flex: 1 1 0;
  min-width: 0;
  overflow: hidden;
}
.gq-card__title {
  line-height: 1.3;
  color: var(--gq-text);
  font-weight: 700;
  margin-bottom: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.gq-card__cat {
  font-size: .72rem;
  font-weight: 700;
  color: var(--gq-teal);
  text-transform: uppercase;
  letter-spacing: .04em;
}

/* --- Single page: app hero (custom layout) --- */
.app-hero {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  padding: 1.5rem;
  background: var(--gq-teal-light);
  border-radius: var(--gq-radius);
  margin-bottom: 1.5rem;
}
.app-hero__icon {
  width: 96px;
  height: 96px;
  border-radius: var(--gq-radius-lg);
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 2px 10px rgba(0,77,64,.12);
  background: var(--gq-white);
  aspect-ratio: 1 / 1;
}
.app-hero__info { flex: 1; min-width: 0; }
.app-hero__info h1 { margin: 0 0 .4rem !important; font-size: 1.5rem !important; }

.app-hero__banner {
  width: 100%;
  border-radius: var(--gq-radius);
  max-height: 240px;
  object-fit: cover;
  margin-bottom: 1.5rem;
  aspect-ratio: 16 / 7;
}

/* --- Byline --- */
.gq-byline {
  font-size: .82rem;
  color: var(--gq-text-muted);
  margin-bottom: 1rem;
}
.gq-byline a { color: var(--gq-teal); }

/* --- App heading --- */
.app-heading {
  font-size: 1.1rem !important;
  color: var(--gq-teal-dark);
}

/* --- Screenshots strip (horizontal scroll — no BS equivalent) --- */
.app-screens {
  white-space: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: .5rem;
  -webkit-overflow-scrolling: touch;
}
.app-screens img {
  height: 220px;
  width: auto;
  border-radius: var(--gq-radius-sm);
  margin-right: 10px;
}

/* --- Download CTA button --- */
.gq-download-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: .75rem;
  min-height: 48px;
  font-size: 1rem;
  font-weight: 700;
  color: #fff !important;
  background: var(--gq-coral) !important;
  border: 0 !important;
  border-radius: var(--gq-radius-sm);
  cursor: pointer;
  transition: background .15s;
}
.gq-download-btn:hover {
  background: var(--gq-coral-hover) !important;
}

/* --- Sidebar (custom component) --- */
.gq-sidebar {
  background: var(--gq-bg);
  border-radius: var(--gq-radius);
  padding: 1.25rem;
}
.gq-sidebar-app {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .6rem 0;
  border-bottom: 1px solid #e0e0e0;
  text-decoration: none;
  color: inherit;
  min-height: 48px;
}
.gq-sidebar-app:last-child { border-bottom: 0; }
.gq-sidebar-app:hover { color: var(--gq-teal); }
.gq-sidebar-app img {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
  aspect-ratio: 1 / 1;
}
.gq-sidebar-app__title {
  font-weight: 700;
  font-size: .88rem;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* --- App widget (category listing) --- */
.app-widget {
  padding: 1rem;
  background-color: var(--gq-bg);
  border-radius: var(--gq-radius-sm);
}
.app-widget a {
  text-decoration: none;
  color: inherit !important;
  min-height: 48px;
  display: block;
}
.app-widget img {
  height: 50px;
  width: 50px;
  border-radius: 10px;
  margin-right: .75rem;
  aspect-ratio: 1 / 1;
}

/* --- Buttons (theme color override) --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff !important;
  background: var(--gq-teal) !important;
  border: 0 !important;
  border-radius: var(--gq-radius-sm) !important;
  font-weight: 700 !important;
  min-height: 48px;
}
.btn:hover {
  background-color: var(--gq-teal-dark) !important;
}

/* --- Badge theme color --- */
.badge {
  background-color: var(--gq-teal) !important;
}

/* --- Pagination tap target --- */
.page-link {
  min-height: 48px;
  min-width: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.active > .page-link { background-color: var(--gq-teal) !important; }

/* --- Footer (gradient bg, link colors) --- */
.site-footer {
  background: linear-gradient(135deg, var(--gq-teal-deep) 0%, var(--gq-teal-dark) 100%);
  color: rgba(255,255,255,.9);
  padding: 2.5rem 0 1.5rem;
  margin-top: auto;
}
.site-footer a {
  color: rgba(255,255,255,.8);
  text-decoration: none;
  padding: .25rem 0;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
.site-footer a:hover { color: #fff; }
.footer__heading {
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: rgba(255,255,255,.5);
  margin-bottom: .5rem;
}

/* ==========================================================
   Responsive
   ========================================================== */
@media (max-width: 767px) {
  .container { max-width: 100% !important; }
  .content-block { padding: 1rem !important; }
  .gq-hero { padding: 2.5rem 1rem 2rem; }
  .gq-card__icon { width: 52px; min-width: 52px; height: 52px; }

  .site-header .container { justify-content: center !important; text-align: center; }

  .app-hero { flex-direction: column; align-items: center; text-align: center; }
  .app-hero__icon { width: 72px; height: 72px; }
  .app-hero__info h1 { font-size: 1.25rem !important; }

  .app-screens img { height: 180px; }
}
