@import url("https://fonts.googleapis.com/css2?family=Dosis:wght@400;500;600;700;800&display=swap");

:root {
  --brand-blue: #0065a0;
  --brand-dark: #0c486c;
  --sidebar: #202020;
  --orange: #ee6900;
  --line: #e0e0e0;
  --title: #0065a0;
  --text: #343434;
  --shadow: 0 1px 4px rgba(50, 50, 50, 0.22);
  --radius: 5px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--text);
  font-family: "Dosis", Arial, Helvetica, sans-serif;
  font-size: 14px;
  line-height: 1.35;
  background: var(--brand-dark);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

.page {
  min-height: 100vh;
  background: var(--brand-dark);
}

.site-header,
.category-layout,
.footer {
  max-width: 1440px;
  margin: 0 auto;
}

.site-header {
  height: 47px;
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr) 230px;
  align-items: center;
  gap: 12px;
  padding: 0 8px;
  background: var(--brand-blue);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.38);
}

.logo {
  display: flex;
  align-items: center;
}

.logo img {
  width: 166px;
  display: block;
}

.mobile-menu {
  display: none;
}

.main-menu {
  height: 47px;
  display: flex;
  justify-content: flex-end;
  overflow: hidden;
}

.main-menu a {
  height: 47px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  border-right: 1px solid #014c78;
  color: #d8f0fb;
  font-size: 14px;
  font-weight: 700;
}

.search {
  position: relative;
  height: 31px;
}

.search input {
  width: 100%;
  height: 31px;
  padding: 0 36px 0 10px;
  border: 2px solid #014c78;
  border-radius: 3px;
  outline: 0;
  color: #555;
  background: #dceef7;
  font-weight: 600;
}

.search button {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 30px;
  height: 27px;
  border: 0;
  border-left: 1px solid #8fb8cc;
  background: #c4dbe8;
}

.search button::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 6px;
  width: 10px;
  height: 10px;
  border: 2px solid #335d72;
  border-radius: 50%;
}

.search button::after {
  content: "";
  position: absolute;
  left: 18px;
  top: 17px;
  width: 8px;
  height: 2px;
  background: #335d72;
  transform: rotate(45deg);
}

.category-layout {
  display: grid;
  grid-template-columns: minmax(0, 1084px) 356px;
  align-items: start;
  background: #fff;
}

.content {
  min-height: 100vh;
  padding: 16px 10px 20px;
  background: #fff;
}

.category-head h1,
.content h2,
.related h2 {
  margin: 0;
  color: var(--title);
  font-size: 28px;
  font-weight: 800;
  line-height: 1.15;
  text-transform: uppercase;
}

.category-head h1 {
  color: #2c2c2c;
  font-size: 26px;
  text-transform: none;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  color: #444;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  font-weight: 600;
}

.breadcrumb a {
  text-decoration: underline;
}

/* Liste sayfaları (/games/newest, /games/try-now-gd) üst satırı: solda
 * breadcrumb, sağda "X - Y of N games" sayacı + sayfa butonları (referans). */
.list-subhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--line);
}

.list-subhead .breadcrumb {
  flex: 1 1 auto;
  min-height: 40px;
  border-bottom: 0;
}

.pagination--top {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.pagination--top p {
  margin: 0;
  font-size: 12.8px;
  color: #000;
  white-space: nowrap;
}

.top-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1.45fr);
  gap: 22px;
  margin-top: 22px;
}

.spotlight h2,
.new-games h2,
.popular h2 {
  margin-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.spotlight-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.spot-card,
.tile {
  display: block;
  overflow: hidden;
  border: 1px solid #ddd;
  border-radius: var(--radius);
  color: #434343;
  background: #fff;
  box-shadow: var(--shadow);
}

.spot-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  display: block;
  object-fit: cover;
  border: 2px solid #fff;
  border-bottom: 0;
}

.spot-card span,
.tile span {
  display: block;
  height: 36px;
  padding: 8px 5px 5px;
  overflow: hidden;
  font-size: 15px;
  font-weight: 600;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.game-grid {
  display: grid;
  gap: 16px;
}

.new-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.popular {
  margin-top: 20px;
}

.popular-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.tile img {
  width: 100%;
  aspect-ratio: 5 / 3;
  display: block;
  object-fit: cover;
  border: 2px solid #fff;
  border-bottom: 0;
}

/* Sayfalama — referans (gamesgames.com .pagination--bottom):
 * solda "1 - 36 of 149 games" sayacı, sağda bitişik buton grubu;
 * seçili sayfa sarı (#f5be19), diğerleri gri (#bdbdbd), uçlar 6.4px. */
.pagination--bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 14px 0 6px;
}

.pagination--bottom p {
  margin: 0;
  font-size: 12.8px;
  color: #000;
}

.pagination .button-group {
  display: flex;
}

.pagination .button-group a,
.pagination .button-group span {
  min-width: 27px;
  height: 28px;
  padding: 0 9px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  background: #bdbdbd;
}

.pagination .button-group a:hover {
  background: #a8a8a8;
}

.pagination .button-group > :first-child {
  border-radius: 6.4px 0 0 6.4px;
}

.pagination .button-group > :last-child {
  border-radius: 0 6.4px 6.4px 0;
}

.pagination .button-group .current,
.pagination .button-group .current:hover {
  background: #f5be19;
}

/* Açıklama bloğu — referans (.editorial): beyaz zemin, siyah uppercase
 * H2 (24px), siyah H3 (21px), 16/24px metin, mavi linkler. */
.seo {
  margin-top: 18px;
  padding: 20px 0 8px;
  color: #000;
  background: transparent;
}

.seo h2 {
  color: #000;
  font-size: 24px;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.seo h3 {
  color: #000;
  font-size: 21px;
  margin: 18px 0 8px;
}

.seo p {
  margin: 0 0 12px;
  font-size: 16px;
  line-height: 24px;
  font-weight: 500;
}

.seo a {
  color: #438afe;
}

.seo ul,
.seo ol {
  margin: 0 0 12px 22px;
  font-size: 16px;
  line-height: 24px;
}

.related {
  min-height: 100vh;
  padding: 20px 14px;
  color: #fff;
  background: var(--sidebar);
}

/* "More categories" butonu — referans: sidebar altında açık renk buton */
.related-more {
  display: block;
  margin: 14px 2px 4px;
  padding: 10px 14px;
  text-align: center;
  border-radius: 6px;
  background: #fff;
  color: #333;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.related-more:hover {
  background: #e8e8e8;
}

/* /allcategories/ — referans (gamesgames.com/allcategories):
 * her grup beyaz bant (24px 16px padding), gruplar arası 16px kalın
 * #f5f5f5 ayraç şeridi; mavi uppercase başlıklar (kategoriye link,
 * çapa id'li) + 3 kolonlu gri metin link listeleri. */
.allcats-layout .content {
  width: 100%;
  padding: 0;
}

.label-wrapper {
  margin: 0;
  padding: 24px 16px;
  background: #fff;
}

.label-wrapper + .label-wrapper {
  border-top: 16px solid #f5f5f5;
}

.label-title {
  margin: 0 0 16px;
  color: #438afe;
  font-size: 24px;
  font-weight: 700;
  text-transform: uppercase;
}

.label-title a {
  color: #438afe;
  text-decoration: none;
}

.label-title a:hover {
  text-decoration: underline;
}

.label_list {
  list-style: none;
  margin: 0;
  padding: 0;
  column-count: 3;
  column-gap: 24px;
}

@media (max-width: 900px) {
  .label_list {
    column-count: 2;
  }
}

@media (max-width: 560px) {
  .label_list {
    column-count: 1;
  }
}

.label_list-item {
  break-inside: avoid;
  padding: 0 8px;
}

.label_list-item-link {
  display: inline-block;
  color: #8d8d8d;
  font-size: 16px;
  line-height: 24px;
  text-decoration: none;
}

.label_list-item-link:hover {
  color: #438afe;
  text-decoration: underline;
}

/* Çapa ile gelindiğinde başlık header altında kalmasın */
.label-title[id] {
  scroll-margin-top: 60px;
}

.related h2 {
  color: #fff;
  margin-bottom: 12px;
  font-size: 23px;
  text-transform: none;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.related-grid a {
  min-width: 0;
  display: grid;
  grid-template-columns: 70px 1fr;
  align-items: center;
  overflow: hidden;
  border-radius: 3px;
  background: #4a4a4a;
}

.related-grid img {
  width: 70px;
  height: 46px;
  display: block;
  object-fit: cover;
}

/* Görseli olmayan kategori için ikon fallback (nadiren). */
.related-ico {
  width: 70px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, .06);
}
.related-ico i { font-size: 22px; color: #cfe0ee; line-height: 1; }

.related-grid span {
  min-width: 0;
  padding: 0 8px;
  overflow: hidden;
  color: #efefef;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.1;
  text-overflow: ellipsis;
}

.more-cats {
  display: block;
  min-width: 130px;
  height: 38px;
  margin: 22px auto 0;
  border: 0;
  border-radius: 5px;
  color: #fff;
  font-weight: 800;
  background: var(--orange);
}

.footer {
  color: #d9f1fc;
  background: #014c78;
  border-top: 12px solid #037fc8;
}

.footer-inner {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 46px;
  max-width: 980px;
  margin: 0 auto;
  padding: 36px 20px 42px;
}

.footer h6 {
  margin: 0 0 16px;
  color: #fff;
  font-size: 14px;
  text-transform: uppercase;
}

.footer a {
  display: block;
  margin-bottom: 13px;
  color: #d9f1fc;
  font-size: 13px;
  font-weight: 600;
}

.footer p {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 20px 28px;
  color: #d9f1fc;
  font-size: 12px;
}

@media (max-width: 1100px) {
  .site-header {
    grid-template-columns: 175px 1fr 190px;
  }

  .main-menu a {
    padding: 0 8px;
    font-size: 13px;
  }

  .category-layout {
    grid-template-columns: 1fr;
  }

  .related {
    display: none;
  }
}

@media (max-width: 760px) {
  .site-header {
    position: relative;
    height: 48px;
    display: block;
    padding: 0;
  }

  .logo,
  .main-menu {
    display: none;
  }

  .mobile-menu {
    position: absolute;
    left: 13px;
    top: 13px;
    width: 22px;
    height: 18px;
    display: block;
    border: 0;
    border-top: 3px solid #baddf9;
    border-bottom: 3px solid #baddf9;
    background: transparent;
  }

  .mobile-menu::before {
    content: "";
    position: absolute;
    left: 0;
    top: 5px;
    width: 22px;
    height: 3px;
    background: #baddf9;
  }

  .search {
    position: absolute;
    right: 0;
    top: 0;
    width: 48px;
    height: 48px;
  }

  .search input {
    display: none;
  }

  .search button {
    top: 6px;
    right: 8px;
    width: 36px;
    height: 36px;
    border: 0;
    background: transparent;
  }

  .search button::before {
    left: 8px;
    top: 7px;
    width: 13px;
    height: 13px;
    border-color: #baddf9;
  }

  .search button::after {
    left: 22px;
    top: 22px;
    width: 10px;
    background: #baddf9;
  }

  .content {
    padding: 12px 6px;
  }

  .top-grid,
  .spotlight-grid {
    grid-template-columns: 1fr;
  }

  .new-grid,
  .popular-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 22px;
  }
}
