/* General Styles for Blog Page */
.page-blog {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #333333; /* Default text color for light body background */
  background-color: #FFFFFF;
}

.page-blog__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

.page-blog__section-spacing {
  padding: 60px 0;
}

.page-blog__section-title {
  font-size: clamp(24px, 4vw, 36px);
  font-weight: 700;
  color: #017439;
  text-align: center;
  margin-bottom: 40px;
  line-height: 1.3;
}

.page-blog__section-title--light {
  color: #FFFFFF;
}

.page-blog__text-block {
  font-size: 17px;
  line-height: 1.7;
  text-align: center;
  max-width: 800px;
  margin: 0 auto 30px;
  color: #333333;
}

.page-blog__text-block--light {
  color: #f0f0f0;
}

/* Buttons */
.page-blog__cta-button {
  display: inline-block;
  padding: 14px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  font-size: 18px;
  transition: all 0.3s ease;
  text-align: center;
  max-width: 100%; /* Ensure buttons adapt to container */
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-blog__btn-primary {
  background-color: #C30808; /* Register/Login color */
  color: #FFFF00; /* Register/Login font color */
  border: 2px solid #C30808;
}

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

.page-blog__btn-secondary {
  background-color: #017439;
  color: #FFFFFF;
  border: 2px solid #017439;
}

.page-blog__btn-secondary:hover {
  background-color: #005f2e;
  border-color: #005f2e;
}

.page-blog__btn-tertiary {
  background-color: #FFFFFF;
  color: #017439;
  border: 2px solid #017439;
}

.page-blog__btn-tertiary:hover {
  background-color: #f0f0f0;
  color: #005f2e;
  border-color: #005f2e;
}

/* Hero Section */
.page-blog__hero-section {
  position: relative;
  padding-top: 10px; /* Small top padding, relying on body padding-top from shared.css */
  background-color: #017439;
  color: #FFFFFF;
  text-align: center;
  overflow: hidden;
}

.page-blog__hero-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  max-height: 600px; /* Limit height for aesthetic */
  filter: brightness(0.7); /* Darken image for text readability */
}

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

.page-blog__main-title {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 800;
  margin-bottom: 20px;
  line-height: 1.2;
  color: #FFFF00; /* Highlight title */
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.page-blog__intro-description {
  font-size: clamp(1rem, 2vw, 1.25rem);
  margin-bottom: 30px;
  color: #FFFFFF;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.4);
}

/* Featured Posts */
.page-blog__featured-posts {
  background-color: #f9f9f9;
}

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

.page-blog__post-card {
  background-color: #FFFFFF;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.page-blog__post-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

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

.page-blog__post-content {
  padding: 25px;
}

.page-blog__post-title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 15px;
  color: #017439;
  line-height: 1.4;
}

.page-blog__post-excerpt {
  font-size: 15px;
  color: #555555;
  margin-bottom: 20px;
}

.page-blog__read-more {
  display: block;
  font-size: 15px;
  color: #C30808;
  font-weight: 600;
  text-decoration: none;
}

.page-blog__read-more time {
  font-weight: normal;
  font-style: italic;
  color: #777;
  margin-left: 5px;
}

.page-blog__view-all-button-container {
  text-align: center;
}

/* Game Types Section */
.page-blog__dark-section {
  background-color: #017439;
  color: #FFFFFF;
}

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

.page-blog__game-category-card {
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 30px;
  text-align: center;
  transition: background-color 0.3s ease, transform 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.page-blog__game-category-card:hover {
  background-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-5px);
}

.page-blog__game-category-title {
  font-size: 22px;
  font-weight: 700;
  color: #FFFF00;
  margin-bottom: 15px;
}

.page-blog__game-category-card p {
  font-size: 16px;
  color: #FFFFFF;
  margin-bottom: 25px;
  flex-grow: 1;
}

/* Promotions Section */
.page-blog__promotion-image {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
  margin: 0 auto 40px;
  max-width: 900px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

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

.page-blog__promo-item {
  background-color: #FFFFFF;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  padding: 30px;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.page-blog__promo-title {
  font-size: 20px;
  font-weight: 600;
  color: #017439;
  margin-bottom: 15px;
}

.page-blog__promo-item p {
  font-size: 15px;
  color: #555555;
  margin-bottom: 25px;
  flex-grow: 1;
}

/* Guide Section */
.page-blog__guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.page-blog__guide-item {
  background-color: #FFFFFF;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  padding: 30px;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.page-blog__guide-title {
  font-size: 20px;
  font-weight: 600;
  color: #017439;
  margin-bottom: 15px;
}

.page-blog__guide-item p {
  font-size: 15px;
  color: #555555;
  margin-bottom: 25px;
  flex-grow: 1;
}

/* FAQ Section */
details.page-blog__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  border: 1px solid #e0e0e0;
  overflow: hidden;
  background: #fff;
}
details.page-blog__faq-item summary.page-blog__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  cursor: pointer;
  user-select: none;
  list-style: none;
  transition: background-color 0.3s ease;
}
details.page-blog__faq-item summary.page-blog__faq-question::-webkit-details-marker {
  display: none;
}
details.page-blog__faq-item summary.page-blog__faq-question:hover {
  background: #f5f5f5;
}
.page-blog__faq-qtext {
  flex: 1;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
  text-align: left;
  color: #333333; /* Ensure contrast */
}
.page-blog__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  color: #666;
  flex-shrink: 0;
  margin-left: 15px;
  width: 28px;
  text-align: center;
}
details.page-blog__faq-item .page-blog__faq-answer {
  padding: 0 20px 20px;
  background: #f9f9f9;
  border-radius: 0 0 5px 5px;
  color: #555555; /* Ensure contrast */
}

/* Call to Action Section */
.page-blog__call-to-action {
  text-align: center;
}

.page-blog__call-to-action .page-blog__cta-button {
  margin-top: 30px;
}

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

  .page-blog__main-title {
    font-size: 2.8rem;
  }

  .page-blog__intro-description {
    font-size: 1.1rem;
  }

  .page-blog__post-grid,
  .page-blog__game-category-grid,
  .page-blog__promotion-highlights,
  .page-blog__guide-grid {
    gap: 20px;
  }
}

@media (max-width: 768px) {
  .page-blog__section-spacing {
    padding: 40px 0;
  }

  .page-blog__section-title {
    font-size: 26px;
    margin-bottom: 25px;
  }

  .page-blog__text-block {
    font-size: 16px;
    margin-bottom: 20px;
  }

  /* Hero Section */
  .page-blog__hero-image {
    object-fit: contain; /* Ensure image is fully visible */
    max-height: 400px;
  }

  .page-blog__hero-content {
    padding: 15px;
    transform: translate(-50%, -50%); /* Re-center */
  }

  .page-blog__main-title {
    font-size: 2rem; /* Adjusted for smaller screens */
    margin-bottom: 15px;
  }

  .page-blog__intro-description {
    font-size: 1rem;
    margin-bottom: 20px;
  }

  .page-blog__cta-button {
    padding: 12px 20px;
    font-size: 16px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

  .page-blog__view-all-button-container,
  .page-blog__call-to-action .page-blog__cta-button {
    padding-left: 15px;
    padding-right: 15px;
    width: 100%;
    box-sizing: border-box;
  }

  /* Featured Posts */
  .page-blog__post-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .page-blog__post-title {
    font-size: 18px;
  }

  .page-blog__post-excerpt {
    font-size: 14px;
  }

  .page-blog__post-image {
    height: 180px;
  }

  /* Game Types Section */
  .page-blog__game-category-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .page-blog__game-category-title {
    font-size: 20px;
  }

  /* Promotions Section */
  .page-blog__promotion-image {
    margin-bottom: 30px;
  }

  .page-blog__promotion-highlights {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .page-blog__promo-title {
    font-size: 18px;
  }

  /* Guide Section */
  .page-blog__guide-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .page-blog__guide-title {
    font-size: 18px;
  }

  /* FAQ Section */
  details.page-blog__faq-item summary.page-blog__faq-question { padding: 15px; }
  .page-blog__faq-qtext { font-size: 15px; }
  details.page-blog__faq-item .page-blog__faq-answer {
    padding: 0 15px 15px;
  }

  /* General image responsiveness */
  .page-blog img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  
  .page-blog__section,
  .page-blog__card,
  .page-blog__container,
  .page-blog__post-card,
  .page-blog__game-category-card,
  .page-blog__promo-item,
  .page-blog__guide-item {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  .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;
    flex-wrap: wrap !important;
    gap: 10px;
  }
  .page-blog__cta-buttons {
    display: flex;
    flex-direction: column;
  }
}