/* style/blog.css */

/* Base styles for the blog page */
.page-blog {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: #ffffff; /* Body background is dark (#0a0a0a), so use light text */
  background-color: transparent; /* inherited from body, to prevent double background */
}

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

/* Color contrast classes */
.page-blog__dark-bg {
  background-color: #26A9E0;
  color: #ffffff;
}

.page-blog__light-bg {
  background-color: #ffffff;
  color: #333333;
}

/* Highlight text */
.page-blog__highlight {
  color: #EA7C07; /* Use 'Login' color for highlight */
  font-weight: bold;
}

.page-blog__highlight-link {
  color: #EA7C07; /* Use 'Login' color for highlight links */
  text-decoration: underline;
}

/* Hero Section */
.page-blog__hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 60px 20px;
  padding-top: 10px; /* Small top padding, body handles header offset */
  text-align: center;
  overflow: hidden;
}

.page-blog__hero-image-wrapper {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  margin-bottom: 30px;
}

.page-blog__hero-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  border-radius: 8px;
}

.page-blog__hero-content {
  max-width: 800px;
  z-index: 1;
  color: #ffffff; /* Ensure text is white on dark background */
}

.page-blog__main-title {
  font-weight: bold;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: #ffffff;
  margin-bottom: 20px;
  max-width: 100%;
  font-size: clamp(2.2rem, 4vw, 3rem); /* H1 font size clamp */
}

.page-blog__description {
  font-size: 1.1em;
  margin-bottom: 30px;
  color: #f0f0f0;
}

/* Section Titles */
.page-blog__section-title {
  font-size: 2.5em;
  font-weight: bold;
  text-align: center;
  margin-bottom: 20px;
  color: inherit; /* Inherit from parent for contrast */
}

.page-blog__section-intro {
  font-size: 1.1em;
  text-align: center;
  margin-bottom: 40px;
  color: inherit;
}

/* Buttons */
.page-blog__cta-button {
  display: inline-block;
  padding: 12px 25px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease, color 0.3s ease;
  box-sizing: border-box;
  max-width: 100%;
  white-space: normal;
  word-wrap: break-word;
  text-align: center;
}

.page-blog__btn-primary {
  background-color: #26A9E0;
  color: #ffffff;
  border: 2px solid #26A9E0;
}

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

.page-blog__btn-secondary {
  background-color: #ffffff;
  color: #26A9E0;
  border: 2px solid #26A9E0;
}

.page-blog__btn-secondary:hover {
  background-color: #e0e0e0;
}

.page-blog__cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 30px;
  flex-wrap: wrap;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

/* Featured Posts Section */
.page-blog__featured-posts,
.page-blog__guide-section,
.page-blog__promotions-section,
.page-blog__game-review-section,
.page-blog__faq-section,
.page-blog__cta-section {
  padding: 60px 0;
}

.page-blog__post-grid,
.page-blog__promotion-grid,
.page-blog__game-review-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.page-blog__post-card,
.page-blog__promotion-card,
.page-blog__review-card {
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  color: #333333; /* For light background */
}

.page-blog__post-card:hover,
.page-blog__promotion-card:hover,
.page-blog__review-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.page-blog__post-image,
.page-blog__promotion-image,
.page-blog__review-image,
.page-blog__guide-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

.page-blog__post-content {
  padding: 20px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.page-blog__post-title {
  font-size: 1.5em;
  margin-bottom: 10px;
  line-height: 1.3;
}

.page-blog__post-title a {
  color: #333333;
  text-decoration: none;
}

.page-blog__post-title a:hover {
  color: #26A9E0;
}

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

.page-blog__post-excerpt {
  margin-bottom: 20px;
  flex-grow: 1;
}

.page-blog__read-more {
  align-self: flex-start;
}

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

/* Guide Section */
.page-blog__guide-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 60px;
  color: #ffffff;
}

.page-blog__guide-item:last-child {
  margin-bottom: 0;
}

.page-blog__guide-subtitle {
  font-size: 2em;
  margin-bottom: 20px;
  color: #ffffff;
}

.page-blog__guide-image {
  max-width: 800px;
  margin-bottom: 30px;
  border-radius: 8px;
}

.page-blog__guide-text {
  max-width: 800px;
  font-size: 1.1em;
  color: #f0f0f0;
}

/* Promotions Section */
.page-blog__promotion-card,
.page-blog__review-card {
  padding: 20px;
}

.page-blog__promotion-title,
.page-blog__review-title {
  font-size: 1.6em;
  margin: 15px 0;
  line-height: 1.3;
  color: inherit;
}

.page-blog__promotion-description,
.page-blog__review-text {
  font-size: 1em;
  margin-bottom: 20px;
  flex-grow: 1;
  color: inherit;
}

/* Game Review Section specific for dark background */
.page-blog__game-review-section .page-blog__review-card {
  background-color: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.page-blog__game-review-section .page-blog__review-title a,
.page-blog__game-review-section .page-blog__review-title {
  color: #ffffff;
}

.page-blog__game-review-section .page-blog__review-title a:hover {
  color: #26A9E0;
}

/* FAQ Section */
.page-blog__faq-list {
  max-width: 900px;
  margin: 40px auto 0;
}

.page-blog__faq-item {
  background-color: #f8f8f8;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
  color: #333333;
}

.page-blog__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px;
  font-size: 1.2em;
  font-weight: bold;
  cursor: pointer;
  background-color: #ffffff;
  border-bottom: 1px solid #e0e0e0;
  user-select: none;
  color: #333333;
}

.page-blog__faq-item[open] .page-blog__faq-question {
  border-bottom: 1px solid #e0e0e0;
}

.page-blog__faq-question::-webkit-details-marker,
.page-blog__faq-question::marker {
  display: none;
}

.page-blog__faq-toggle {
  font-size: 1.5em;
  line-height: 1;
  transition: transform 0.3s ease;
  color: #26A9E0;
}

.page-blog__faq-item[open] .page-blog__faq-toggle {
  transform: rotate(45deg);
}

.page-blog__faq-answer {
  padding: 15px 25px 20px;
  font-size: 1em;
  color: #555555;
}

/* Responsive Styles */
@media (max-width: 1024px) {
  .page-blog__main-title {
    font-size: clamp(2rem, 5vw, 2.8rem);
  }

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

  .page-blog__guide-subtitle {
    font-size: 1.8em;
  }
}

@media (max-width: 768px) {
  .page-blog__container {
    padding: 0 15px;
  }

  .page-blog__hero-section {
    padding: 40px 15px;
    padding-top: 10px !important;
  }

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

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

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

  .page-blog__cta-button {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
  }

  .page-blog__featured-posts,
  .page-blog__guide-section,
  .page-blog__promotions-section,
  .page-blog__game-review-section,
  .page-blog__faq-section,
  .page-blog__cta-section {
    padding: 40px 0;
  }

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

  .page-blog__section-intro {
    font-size: 1em;
  }

  .page-blog__post-grid,
  .page-blog__promotion-grid,
  .page-blog__game-review-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .page-blog__post-card,
  .page-blog__promotion-card,
  .page-blog__review-card {
    margin: 0 auto;
    max-width: 400px; /* Constrain card width for better readability on small screens */
  }

  /* Image, Video, and Container Responsive Fixes */
  .page-blog img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  
  .page-blog video,
  .page-blog__video {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }

  .page-blog__section,
  .page-blog__card,
  .page-blog__container,
  .page-blog__hero-image-wrapper,
  .page-blog__video-section,
  .page-blog__video-container,
  .page-blog__video-wrapper,
  .page-blog__cta-buttons,
  .page-blog__button-group,
  .page-blog__btn-container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    overflow: hidden !important;
  }

  .page-blog__faq-question {
    font-size: 1.1em;
    padding: 15px 20px;
  }

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