/* ==========================================================================
   CC Games — improvements.css
   Loaded AFTER styles.css and slideshow.css — overrides & additions only.
   ========================================================================== */

/* ── Smooth header scroll shadow ─────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  background-color: rgba(251, 251, 251, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: box-shadow 0.3s ease;
}
.site-header.scrolled {
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.08);
}

/* ── Nav links — remove underline on hover, use the blue line instead ────── */
.nav-link:hover {
  text-decoration: none;
}
.nav-item {
  transition: color 0.25s ease, transform 0.25s ease;
}
.nav-item:hover {
  color: #007bff;
  transform: translateY(-1px);
}

/* ── Stat cards ───────────────────────────────────────────────────────────── */
/* Also stop the white page background showing behind stat section */
.stats-section {
  background-color: transparent;
  padding-bottom: 10px;
}

/* ── "View More Blogs" button & all .view-more-link buttons ──────────────── */
.view-more-link {
  transition: background-color 0.25s ease,
              box-shadow 0.25s ease,
              transform 0.2s ease;
}
.view-more-link:hover {
  background-color: #0056b3;
  box-shadow: 0 0 18px rgba(0, 123, 255, 0.55);
  transform: translateY(-2px);
  color: #fff;
  text-decoration: none;
}
.view-more-link:active {
  transform: translateY(0);
  box-shadow: 0 0 8px rgba(0, 123, 255, 0.4);
}

/* ── Blog list cards on home (latest-blog-body) ─────────────────────────── */
.latest-blog-body {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  border: 1px solid transparent;
}
.latest-blog-body:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.10);
  border-color: rgba(0, 123, 255, 0.15);
}

/* 16:9 thumbnail on home blog list */
.blog-thumbnail img {
  width: 200px;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 8px;
}

/* ── Read More link — arrow slide on hover ───────────────────────────────── */
.read-more-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: gap 0.2s ease, color 0.2s ease;
}
.read-more-link:hover {
  gap: 8px;
  text-decoration: none;
  color: #0056b3;
}

/* ── Social media buttons — lift + glow ──────────────────────────────────── */
.btn-primary {
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.25s ease !important;
}
.btn-primary:hover {
  transform: translateY(-3px) !important;
  box-shadow: 0 8px 24px rgba(99, 71, 255, 0.35) !important;
}
.btn-primary:active {
  transform: translateY(0) !important;
}

/* ── Social buttons section — nicer card ─────────────────────────────────── */
.social-media-buttons {
  border: 1px solid rgba(0, 0, 0, 0.06);
  transition: box-shadow 0.3s ease;
}

/* ── Slide cards — hover lift ────────────────────────────────────────────── */
.thumbnail-container {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.slide.active .thumbnail-container:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
}

/* ── About page — game cards hover ──────────────────────────────────────── */
.game-card {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.game-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.13);
}
.game-card img {
  transition: transform 0.4s ease;
}
.game-card:hover img {
  transform: scale(1.04);
}

/* ── Contact form — comfy submit button ──────────────────────────────────── */
.submit-btn {
  transition: background-color 0.25s ease,
              transform 0.2s ease,
              box-shadow 0.25s ease;
}
.submit-btn:hover {
  background-color: #0056b3;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 86, 179, 0.35);
}
.submit-btn:active {
  transform: translateY(0);
  box-shadow: none;
}

/* ── Footer logo hover ───────────────────────────────────────────────────── */
.footer-logo {
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.footer-logo-link:hover .footer-logo {
  transform: scale(1.06);
  opacity: 0.9;
}

/* ==========================================================================
   BLOGS PAGE — card grid with 16:9 thumbnails
   ========================================================================== */

/* Filter buttons */
.blog-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 32px;
  justify-content: center;
}

.blog-filter-btn {
  display: inline-block;
  background-color: #333;
  color: #fff;
  text-decoration: none;
  padding: 9px 20px;
  border-radius: 20px;
  font-weight: bold;
  font-size: 14px;
  border: none;
  cursor: pointer;
  box-shadow: none;
  transition: background-color 0.25s ease,
              box-shadow 0.25s ease,
              transform 0.2s ease;
}
.blog-filter-btn:hover {
  background-color: #0056b3;
  box-shadow: 0 0 14px rgba(0, 123, 255, 0.45);
  transform: translateY(-2px);
  color: #fff;
}
.blog-filter-btn:active {
  transform: translateY(0);
}
.blog-filter-btn.active {
  background-color: #007bff;
  box-shadow: 0 0 12px rgba(0, 123, 255, 0.5);
}

/* Card grid */
.blog-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 28px;
}

/* Individual blog card */
.blog-card-item {
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(0, 0, 0, 0.06);
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  cursor: pointer;
}
.blog-card-item:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.14);
}
.blog-card-item:active {
  transform: translateY(-2px);
}

/* 16:9 thumbnail */
.blog-card-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #eee;
}
.blog-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}
.blog-card-item:hover .blog-card-thumb img {
  transform: scale(1.05);
}

/* Card body */
.blog-card-body {
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.blog-card-meta {
  font-size: 12px;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}
.blog-card-title {
  font-size: 18px;
  font-weight: 700;
  color: #007bff;
  margin: 0 0 8px;
  line-height: 1.3;
}
.blog-card-excerpt {
  font-size: 14px;
  color: #555;
  line-height: 1.55;
  margin: 0 0 14px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}
.blog-card-cta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  font-weight: bold;
  color: #007bff;
  text-decoration: none;
  transition: gap 0.2s ease, color 0.2s ease;
  margin-top: auto;
}
.blog-card-cta:hover {
  gap: 8px;
  color: #0056b3;
  text-decoration: none;
}

/* Blogs page heading area */
.blogs-page-header {
  text-align: center;
  margin-bottom: 32px;
}
.blogs-page-header h1 {
  font-size: 48px;
  margin-bottom: 8px;
  color: #007bff;
}
.blogs-page-header p {
  font-size: 18px;
  color: #666;
  margin: 0;
}

/* ── Animatable — stagger children in a grid ─────────────────────────────── */
.blog-card-item.animatable {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.blog-card-item.animatable.animate {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   Slideshow arrow buttons — override broken original styles
   ========================================================================== */
.prev, .next {
  position: absolute;
  top: 38%;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  background-color: rgba(0, 0, 0, 0.5);
  color: white !important;
  font-size: 18px;
  font-weight: bold;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1000;
  user-select: none;
  text-decoration: none !important;
  transition: background-color 0.25s ease, transform 0.25s ease;
}

.prev { left: 8px; }
.next { right: 8px; }

.prev:hover, .next:hover {
  background-color: rgba(0, 123, 255, 0.85) !important;
  transform: translateY(-50%) scale(1.1) !important;
  color: white !important;
  text-decoration: none !important;
}

.prev:active, .next:active {
  transform: translateY(-50%) scale(0.95) !important;
}

/* Fix 1: Stop horizontal scroll from slideshow overflow */
body {
  overflow-x: hidden;
}



/* Stat boxes — clip to border-radius, no shadow causing white halo */
.stat-box {
  overflow: hidden;
  box-shadow: none !important;
}
.stat-box:hover {
  transform: scale(1.05) translateY(-4px);
  box-shadow: none !important;
}

/* ==========================================================================
   Single Blog Post Page
   ========================================================================== */

.post-page {
  max-width: 860px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}

.post-back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #007bff;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 28px;
  transition: gap 0.2s ease, color 0.2s ease;
}
.post-back-link:hover {
  gap: 10px;
  color: #0056b3;
}

/* Hero image */
.post-hero {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 28px;
  background: #eee;
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
}
.post-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Meta row */
.post-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.post-game-tag {
  background: #007bff;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 99px;
  letter-spacing: 0.02em;
}
.post-date {
  color: #888;
  font-size: 0.88rem;
}

/* Title */
.post-title {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 800;
  color: #111;
  line-height: 1.2;
  margin: 0 0 24px;
}

/* Game stats bar */
.post-game-bar {
  display: flex;
  align-items: center;
  gap: 0;
  background: #f4f6fa;
  border: 1px solid rgba(0,0,0,0.07);
  border-radius: 14px;
  padding: 16px 24px;
  margin-bottom: 36px;
  flex-wrap: wrap;
  gap: 20px;
}
.post-game-stat {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 120px;
}
.post-game-stat svg {
  width: 18px;
  height: 18px;
  stroke: #007bff;
  flex-shrink: 0;
}
.post-game-stat-value {
  font-size: 1.15rem;
  font-weight: 700;
  color: #111;
}
.post-game-stat-label {
  font-size: 0.8rem;
  color: #888;
}

/* Play button */
.post-play-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #007bff;
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 10px 22px;
  border-radius: 99px;
  text-decoration: none;
  margin-left: auto;
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 14px rgba(0,123,255,0.35);
  white-space: nowrap;
}
.post-play-btn svg {
  width: 14px;
  height: 14px;
  fill: #fff;
}
.post-play-btn:hover {
  background: #0056b3;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0,123,255,0.45);
  color: #fff;
  text-decoration: none;
}

/* Post body text */
.post-body {
  font-size: 1.05rem;
  line-height: 1.8;
  color: #333;
}

/* ==========================================================================
   Games Page
   ========================================================================== */

.games-page-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 28px;
  padding-bottom: 60px;
}

.games-page-card {
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  border: 1px solid rgba(0,0,0,0.06);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.games-page-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.13);
}

/* Thumbnail with play overlay */
.games-page-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #eee;
}
.games-page-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}
.games-page-card:hover .games-page-thumb img {
  transform: scale(1.05);
}
.games-page-thumb-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.25s ease;
}
.games-page-card:hover .games-page-thumb-overlay {
  background: rgba(0,0,0,0.45);
}
.games-page-play-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #007bff;
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 10px 22px;
  border-radius: 99px;
  text-decoration: none;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.25s ease, transform 0.25s ease, background 0.2s;
  box-shadow: 0 4px 14px rgba(0,123,255,0.4);
}
.games-page-play-btn svg {
  width: 13px;
  height: 13px;
}
.games-page-card:hover .games-page-play-btn {
  opacity: 1;
  transform: translateY(0);
}
.games-page-play-btn:hover {
  background: #0056b3;
  color: #fff;
  text-decoration: none;
}

/* Card body */
.games-page-body {
  padding: 18px 20px 20px;
}
.games-page-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #111;
  margin: 0 0 4px;
}
.games-page-creator {
  font-size: 0.8rem;
  color: #888;
  margin-bottom: 14px;
}

/* Stats row */
.games-page-stats {
  display: flex;
  gap: 18px;
  margin-bottom: 16px;
}
.games-page-stat {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.85rem;
  color: #444;
  font-weight: 500;
}
.games-page-stat svg {
  width: 15px;
  height: 15px;
  stroke: #007bff;
  flex-shrink: 0;
}

.games-page-link {
  display: inline-block;
  font-size: 0.88rem;
  font-weight: 600;
  color: #007bff;
  text-decoration: none;
  transition: color 0.2s, gap 0.2s;
}
.games-page-link:hover {
  color: #0056b3;
  text-decoration: none;
}

/* ==========================================================================
   Header — logo + nav centering
   The original .site-header used text-align:center but .nav-bar was
   inline-block (shrinks to content), so nothing was truly centered.
   Now .site-header is a flex column, everything centers naturally.
   ========================================================================== */
.site-header {
  display: block;
  width: 100%;
  text-align: center;
  padding: 20px 0;
}
.header-logo-link {
  display: inline-block;
  margin-bottom: 12px;
  margin-right: 15px;
}
.header-logo {
  display: block;
  height: 80px;
  width: auto;
  margin: 0 auto;
}
.nav-bar {
  display: block;
  width: 100%;
  text-align: center;
}
.nav-menu {
  display: inline-flex;
  align-items: center;
  list-style: none;
  padding: 0;
  margin: 0;
  gap: 0;
}

/* Use gap on the nav menu instead of margins on items, so there are
   no asymmetric outer margins shifting the perceived centre */
.nav-bar {
  display: block;
  width: 100%;
  text-align: center;
}
.nav-menu {
  display: inline-block;
  padding: 0;
  margin: 0;
}
.nav-item {
  margin: 0 20px !important;
}
.nav-menu .nav-item:first-child { margin-left: 0 !important; }
.nav-menu .nav-item:last-child  { margin-right: 0 !important; }
