/* Blog module — extends the existing GameOn theme (style.css) with a
   few small helpers the base theme doesn't ship. Loaded only on blog pages. */

/* ---------- Blog card (grid) ---------- */
.blog-item-card {
  overflow: hidden;
}

.blog-item-card .card-thumb {
  position: relative;
}

.blog-item-card .card-thumb img {
  height: 220px;
  object-fit: cover;
}

.blog-item .card-content .title {
  margin: 12px 0;
  font-size: 1.25rem;
  overflow-wrap: break-word;
}

.blog-item .card-content p {
  color: var(--body-color, #6b7280);
  overflow-wrap: break-word;
}

.blog-item .post-meta {
  row-gap: 8px;
}

.line-clamp-1 {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---------- Category nav + search ---------- */
.blog-category-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.blog-category-nav a {
  display: inline-block;
  padding: 8px 20px;
  border-radius: 50px;
  border: 1px solid var(--primary-l-color, #e5e7eb);
  font-size: 0.9rem;
  font-weight: 500;
  color: inherit;
  white-space: nowrap;
  transition: all 0.3s ease;
}

.blog-category-nav a:hover,
.blog-category-nav a.active {
  background-image: linear-gradient(150deg, #7d41ee 0%, #5d3cd7 78%);
  border-color: transparent;
  color: #fff;
}

.blog-search-box .input-group {
  border-radius: 50px;
  overflow: hidden;
  border: 1px solid var(--primary-l-color, #e5e7eb);
}

.blog-search-box input {
  border: 0;
  padding: 12px 20px;
  /* 16px min font-size prevents iOS Safari auto-zoom on focus */
  font-size: 16px;
  box-shadow: none !important;
}

.blog-search-box button {
  background-image: linear-gradient(150deg, #7d41ee 0%, #5d3cd7 78%);
  color: #fff;
  border: 0;
  padding: 0 22px;
  flex-shrink: 0;
}

/* ---------- Sidebar widgets ---------- */
.blog-sidebar-widget {
  border-radius: var(--border-radius-sm, 12px);
  background-color: var(--primary-bg-color-2, #f8f7fd);
  padding: 30px;
  margin-bottom: 30px;
}

.blog-sidebar-widget .widget-title {
  margin-bottom: 20px;
  font-size: 1.15rem;
  font-weight: 600;
}

.blog-sidebar-widget.has-overlay {
  overflow: hidden;
}

.blog-recent-post {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.blog-recent-post_body {
  flex: 1 1 0%;
  min-width: 0;
}

.blog-recent-post:not(:last-child) {
  margin-bottom: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--primary-l-color, #e5e7eb);
}

.blog-recent-post img {
  width: 70px;
  height: 70px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
}

.blog-recent-post .title {
  font-size: 0.95rem;
  font-weight: 500;
  margin-bottom: 4px;
  overflow: hidden;
}

.blog-recent-post .title a {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.blog-recent-post .date {
  font-size: 0.8rem;
  opacity: 0.7;
}

/* ---------- Share icons ---------- */
.blog-share-icons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.blog-share-icons a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--primary-l-color, #e5e7eb);
  transition: all 0.3s ease;
}

.blog-share-icons a:hover {
  background-image: linear-gradient(150deg, #7d41ee 0%, #5d3cd7 78%);
  border-color: transparent;
  color: #fff !important;
}

/* ---------- Article body ---------- */
.blog-details-body {
  overflow-wrap: break-word;
}

.blog-details-body img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
}

.blog-details-body h2,
.blog-details-body h3,
.blog-details-body h4 {
  margin-top: 1.6em;
  margin-bottom: 0.8em;
}

.blog-details-body p {
  line-height: 1.8;
  margin-bottom: 1.2em;
}

.blog-single .post-thumbnail img {
  border-radius: 12px;
}

/* ---------- Responsive tuning ---------- */
@media (max-width: 991px) {
  .blog-item-card .card-thumb img {
    height: 200px;
  }
}

@media (max-width: 767px) {
  .blog-sidebar-widget {
    padding: 22px;
  }

  .blog-category-nav {
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 6px;
    scrollbar-width: none;
  }

  .blog-category-nav::-webkit-scrollbar {
    display: none;
  }

  .blog-category-nav a {
    flex-shrink: 0;
  }
}

@media (max-width: 575px) {
  .blog-item-card .card-thumb img {
    height: 190px;
  }

  .blog-item .card-content {
    padding: 1.25rem !important;
  }

  .blog-item .card-content .title {
    font-size: 1.1rem;
  }

  .blog-sidebar-widget {
    padding: 18px;
  }

  .blog-share-icons a {
    width: 38px;
    height: 38px;
  }
}
