/* style/blog.css */

/* Base styles and variables */
:root {
  --page-blog-primary-color: #26A9E0;
  --page-blog-secondary-color: #FFFFFF;
  --page-blog-dark-background: #121212; /* Inherited from body via shared.css */
  --page-blog-light-text: #ffffff;
  --page-blog-dark-text: #333333;
  --page-blog-accent-login: #EA7C07;
}

.page-blog {
  color: var(--page-blog-light-text); /* Default text color for dark body background */
  font-family: Arial, sans-serif;
  line-height: 1.6;
}

.page-blog__dark-bg {
  background-color: var(--page-blog-dark-background);
  color: var(--page-blog-light-text);
}

.page-blog__light-bg {
  background-color: var(--page-blog-secondary-color);
  color: var(--page-blog-dark-text);
}

.page-blog__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
}

/* Hero Section */
.page-blog__hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 10px; /* Small top padding for visual separation */
  padding-bottom: 60px;
  text-align: center;
  overflow: hidden;
}

.page-blog__hero-image-wrapper {
  width: 100%;
  max-height: 675px; /* Max height for desktop hero image */
  overflow: hidden;
  position: relative;
}

.page-blog__hero-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  filter: brightness(0.6); /* Slightly darken image for text readability */
}

.page-blog__hero-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  max-width: 900px;
  padding: 20px;
  box-sizing: border-box;
  z-index: 1;
  color: var(--page-blog-light-text);
}

.page-blog__main-title {
  font-size: clamp(2em, 4vw, 3.5em);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 20px;
  color: var(--page-blog-secondary-color);
}

.page-blog__description {
  font-size: 1.1em;
  margin-bottom: 30px;
  color: rgba(255, 255, 255, 0.9);
}

.page-blog__cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

/* General Section Styles */
.page-blog__section {
  padding: 60px 0;
}

.page-blog__section-title {
  font-size: 2.5em;
  text-align: center;
  margin-bottom: 20px;
  font-weight: 700;
}

.page-blog__latest-posts .page-blog__section-title,
.page-blog__industry-news .page-blog__section-title,
.page-blog__cta-bottom .page-blog__section-title {
  color: var(--page-blog-dark-text);
}

.page-blog__game-guides .page-blog__section-title,
.page-blog__faq-section .page-blog__section-title {
  color: var(--page-blog-light-text);
}

.page-blog__section-description {
  font-size: 1.1em;
  text-align: center;
  max-width: 800px;
  margin: 0 auto 40px;
}

/* Post Grid */
.page-blog__posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-bottom: 40px;
}

.page-blog__post-card {
  background-color: var(--page-blog-secondary-color);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
}

.page-blog__post-thumbnail {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
}

.page-blog__post-content {
  padding: 20px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  color: var(--page-blog-dark-text);
}

.page-blog__post-title {
  font-size: 1.4em;
  margin-bottom: 10px;
  font-weight: 600;
}

.page-blog__post-title a {
  color: var(--page-blog-dark-text);
  text-decoration: none;
}

.page-blog__post-title a:hover {
  color: var(--page-blog-primary-color);
}

.page-blog__post-meta {
  font-size: 0.9em;
  color: #666;
  margin-bottom: 15px;
}

.page-blog__post-excerpt {
  font-size: 1em;
  color: #555;
  margin-bottom: 20px;
  flex-grow: 1;
}

.page-blog__read-more {
  display: inline-block;
  color: var(--page-blog-primary-color);
  text-decoration: none;
  font-weight: 600;
}

.page-blog__read-more:hover {
  text-decoration: underline;
}

/* Game Guides */
.page-blog__game-guides .page-blog__section-description {
  color: rgba(255, 255, 255, 0.9);
}

.page-blog__guides-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.page-blog__guide-card {
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  overflow: hidden;
  padding-bottom: 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--page-blog-light-text);
}

.page-blog__guide-thumbnail {
  width: 100%;
  height: 200px;
  object-fit: cover;
  margin-bottom: 15px;
}

.page-blog__guide-title {
  font-size: 1.3em;
  font-weight: 600;
  margin-bottom: 10px;
  padding: 0 15px;
}

.page-blog__guide-title a {
  color: var(--page-blog-light-text);
  text-decoration: none;
}

.page-blog__guide-title a:hover {
  color: var(--page-blog-primary-color);
}

.page-blog__guide-excerpt {
  font-size: 0.95em;
  color: rgba(255, 255, 255, 0.8);
  padding: 0 15px;
}

/* Industry News */
.page-blog__industry-news .page-blog__section-description {
  color: var(--page-blog-dark-text);
}

.page-blog__news-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 40px;
}

.page-blog__news-item {
  background-color: var(--page-blog-secondary-color);
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  color: var(--page-blog-dark-text);
}

.page-blog__news-title {
  font-size: 1.3em;
  margin-bottom: 8px;
  font-weight: 600;
}

.page-blog__news-title a {
  color: var(--page-blog-dark-text);
  text-decoration: none;
}

.page-blog__news-title a:hover {
  color: var(--page-blog-primary-color);
}

.page-blog__news-meta {
  font-size: 0.85em;
  color: #777;
  margin-bottom: 10px;
}

.page-blog__news-excerpt {
  font-size: 0.95em;
  color: #444;
}

/* FAQ Section */
.page-blog__faq-section .page-blog__section-description {
  color: rgba(255, 255, 255, 0.9);
}

.page-blog__faq-list {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.page-blog__faq-item {
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  overflow: hidden;
  color: var(--page-blog-light-text);
}

.page-blog__faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1.1em;
  font-weight: 600;
  transition: background-color 0.3s ease;
}

.page-blog__faq-item summary:hover {
  background-color: rgba(255, 255, 255, 0.15);
}

.page-blog__faq-item summary::-webkit-details-marker {
  display: none;
}

.page-blog__faq-qtext {
  flex-grow: 1;
}

.page-blog__faq-toggle {
  font-size: 1.5em;
  line-height: 1;
  width: 20px;
  text-align: center;
}

.page-blog__faq-answer {
  padding: 0 20px 20px;
  font-size: 1em;
  color: rgba(255, 255, 255, 0.8);
}

/* CTA Bottom */
.page-blog__cta-bottom {
  text-align: center;
  padding: 80px 0;
}

.page-blog__cta-bottom .page-blog__section-description {
  color: var(--page-blog-dark-text);
  margin-bottom: 40px;
}

/* Buttons */
.page-blog__btn-primary,
.page-blog__btn-secondary {
  display: inline-block;
  padding: 12px 25px;
  border-radius: 5px;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
  box-sizing: border-box;
  text-align: center;
  white-space: normal;
  word-wrap: break-word;
}

.page-blog__btn-primary {
  background-color: var(--page-blog-primary-color);
  color: var(--page-blog-light-text);
  border: 2px solid var(--page-blog-primary-color);
}

.page-blog__btn-primary:hover {
  background-color: #1f8ec4;
  border-color: #1f8ec4;
}

.page-blog__btn-secondary {
  background-color: transparent;
  color: var(--page-blog-primary-color);
  border: 2px solid var(--page-blog-primary-color);
}

.page-blog__btn-secondary:hover {
  background-color: var(--page-blog-primary-color);
  color: var(--page-blog-light-text);
}

.page-blog__btn-large {
  padding: 15px 35px;
  font-size: 1.1em;
}

.page-blog__view-all {
  text-align: center;
  margin-top: 20px;
}

/* Responsive Styles */
@media (max-width: 1024px) {
  .page-blog__hero-content {
    max-width: 700px;
  }

  .page-blog__main-title {
    font-size: clamp(2em, 5vw, 3em);
  }
}

@media (max-width: 768px) {
  .page-blog {
    font-size: 16px;
    line-height: 1.6;
  }

  .page-blog__hero-section {
    padding-bottom: 40px;
  }

  .page-blog__hero-image-wrapper {
    max-height: 400px;
  }

  .page-blog__hero-content {
    padding: 15px;
  }

  .page-blog__main-title {
    font-size: clamp(2em, 6vw, 2.5em);
  }

  .page-blog__description {
    font-size: 1em;
  }

  .page-blog__cta-buttons {
    flex-direction: column;
    gap: 15px;
  }

  .page-blog__btn-primary,
  .page-blog__btn-secondary {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-blog__section {
    padding: 40px 0;
  }

  .page-blog__section-title {
    font-size: 2em;
  }

  .page-blog__section-description {
    font-size: 1em;
    margin-bottom: 30px;
  }

  .page-blog__posts-grid,
  .page-blog__guides-grid {
    grid-template-columns: 1fr;
  }

  .page-blog__post-card,
  .page-blog__guide-card,
  .page-blog__news-item {
    margin-left: 15px;
    margin-right: 15px;
    width: auto;
  }

  .page-blog__post-thumbnail,
  .page-blog__guide-thumbnail {
    height: 180px;
  }

  .page-blog__post-title,
  .page-blog__guide-title,
  .page-blog__news-title {
    font-size: 1.2em;
  }

  .page-blog__faq-item summary {
    font-size: 1em;
    padding: 15px;
  }

  .page-blog__faq-answer {
    padding: 0 15px 15px;
  }

  /* Mobile image responsiveness */
  .page-blog img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }

  .page-blog__section,
  .page-blog__card,
  .page-blog__container,
  .page-blog__posts-grid,
  .page-blog__guides-grid,
  .page-blog__news-list,
  .page-blog__faq-list {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  /* Adjust for hero content to prevent overflow due to absolute positioning */
  .page-blog__hero-content {
    position: static;
    transform: none;
    padding: 20px 15px;
    width: 100%;
    max-width: 100%;
    margin-top: -100px; /* Pull content up over image if needed, but primarily use image-then-text */
    background: linear-gradient(to bottom, rgba(18,18,18,0.0), rgba(18,18,18,0.8));
    color: var(--page-blog-light-text);
  }
  .page-blog__hero-section {
    flex-direction: column;
    padding-bottom: 0;
  }
  .page-blog__hero-image-wrapper {
    order: 1;
    width: 100%;
    height: 250px;
    max-height: 250px;
    overflow: hidden;
  }
  .page-blog__hero-content {
    order: 2;
    margin-top: 0; /* No negative margin in this image-then-text scenario */
    background: none; /* No gradient overlay if text is below */
    position: relative; /* Reset position */
    top: auto;
    left: auto;
    transform: none;
    text-align: center;
    padding: 30px 15px;
  }

  .page-blog__cta-bottom {
    padding: 60px 15px;
  }
}

@media (max-width: 480px) {
  .page-blog__main-title {
    font-size: 1.8em;
  }
  .page-blog__section-title {
    font-size: 1.8em;
  }
}