/* style/blog.css */

/* Body background is dark (from shared.css var(--background-color)) so text should be light */
.page-blog {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: #F2FFF6; /* Text Main */
  background-color: #08160F; /* Background */
}

.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;
  text-align: center;
  padding-top: 10px; /* Small top padding for first section */
  padding-bottom: 40px;
  overflow: hidden;
}

.page-blog__hero-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  max-height: 600px; /* Limit hero image height */
}

.page-blog__hero-content {
  padding: 20px;
  max-width: 900px;
  margin-top: 20px;
}

.page-blog__main-title {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  color: #F2C14E; /* Gold */
  margin-bottom: 15px;
  font-weight: 700;
  line-height: 1.2;
}

.page-blog__description {
  font-size: 1.1rem;
  color: #A7D9B8; /* Text Secondary */
  margin-bottom: 30px;
}

.page-blog__cta-button {
  display: inline-block;
  background: linear-gradient(180deg, #2AD16F 0%, #13994A 100%);
  color: #ffffff;
  padding: 15px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.1rem;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.page-blog__cta-button:hover {
  background: linear-gradient(180deg, #13994A 0%, #2AD16F 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* Section common styles */
.page-blog__section-title {
  font-size: clamp(2rem, 4vw, 2.8rem);
  color: #F2C14E; /* Gold */
  text-align: center;
  margin-bottom: 40px;
  font-weight: 700;
}

.page-blog__text-block {
  font-size: 1rem;
  margin-bottom: 20px;
  color: #F2FFF6; /* Text Main */
  text-align: justify;
}

.page-blog__light-bg {
  background-color: #0A4B2C; /* Deep Green */
  color: #F2FFF6;
  padding: 60px 0;
}

.page-blog__dark-bg {
  background-color: #08160F; /* Background */
  color: #F2FFF6;
  padding: 60px 0;
}

/* Featured Posts Section */
.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: #11271B; /* Card BG */
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  border: 1px solid #2E7A4E; /* Border */
}

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

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

.page-blog__post-title {
  font-size: 1.4rem;
  margin-bottom: 15px;
  color: #F2C14E; /* Gold */
  line-height: 1.3;
}

.page-blog__post-title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-blog__post-title a:hover {
  color: #57E38D; /* Glow */
}

.page-blog__post-excerpt {
  font-size: 0.95rem;
  color: #A7D9B8; /* Text Secondary */
  margin-bottom: 20px;
  flex-grow: 1;
}

.page-blog__read-more {
  display: inline-block;
  color: #57E38D; /* Glow */
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease;
  align-self: flex-start;
}

.page-blog__read-more:hover {
  color: #F2C14E; /* Gold */
}

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

/* Promotion Categories Section */
.page-blog__category-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
}

.page-blog__category-item {
  background-color: #11271B; /* Card BG */
  border-radius: 10px;
  padding: 30px;
  text-align: center;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  border: 1px solid #2E7A4E; /* Border */
}

.page-blog__category-icon {
  width: 100px;
  height: 100px;
  object-fit: contain;
  margin-bottom: 20px;
  filter: drop-shadow(0 0 5px rgba(87, 227, 141, 0.5)); /* Subtle glow */
}

.page-blog__category-heading {
  font-size: 1.5rem;
  color: #F2C14E; /* Gold */
  margin-bottom: 10px;
}

.page-blog__category-description {
  font-size: 0.95rem;
  color: #A7D9B8; /* Text Secondary */
}

/* Why Choose SP8BET Section */
.page-blog__benefits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
}

.page-blog__benefit-item {
  background-color: #11271B; /* Card BG */
  border-radius: 10px;
  padding: 30px;
  text-align: center;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  border: 1px solid #2E7A4E; /* Border */
}

.page-blog__benefit-icon {
  width: 80px;
  height: 80px;
  object-fit: contain;
  margin-bottom: 20px;
  filter: drop-shadow(0 0 5px rgba(87, 227, 141, 0.5));
}

.page-blog__benefit-heading {
  font-size: 1.4rem;
  color: #57E38D; /* Glow */
  margin-bottom: 10px;
}

.page-blog__benefit-description {
  font-size: 0.95rem;
  color: #A7D9B8; /* Text Secondary */
}

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

.page-blog__faq-item {
  background-color: #11271B; /* Card BG */
  border-radius: 8px;
  margin-bottom: 15px;
  border: 1px solid #2E7A4E; /* Border */
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.page-blog__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  font-size: 1.15rem;
  font-weight: bold;
  color: #F2C14E; /* Gold */
  cursor: pointer;
  transition: background-color 0.3s ease;
  list-style: none; /* For details/summary */
}

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

.page-blog__faq-question:hover {
  background-color: #1E3A2A; /* Divider */
}

.page-blog__faq-toggle {
  font-size: 1.5rem;
  line-height: 1;
  margin-left: 15px;
  color: #57E38D; /* Glow */
}

.page-blog__faq-answer {
  padding: 0 20px 20px;
  font-size: 1rem;
  color: #A7D9B8; /* Text Secondary */
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s ease-out, padding 0.5s ease-out;
}

.page-blog__faq-item[open] .page-blog__faq-answer {
  max-height: 500px; /* Adjust as needed for content */
  padding: 0 20px 20px;
}

.page-blog__faq-item[open] .page-blog__faq-question {
  background-color: #1E3A2A; /* Divider */
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .page-blog__container,
  .page-blog__hero-content {
    padding-left: 15px;
    padding-right: 15px;
  }

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

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

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

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

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

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

  .page-blog__post-grid,
  .page-blog__category-list,
  .page-blog__benefits-grid {
    grid-template-columns: 1fr;
  }

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

  .page-blog__post-title {
    font-size: 1.2rem;
  }

  .page-blog__category-heading,
  .page-blog__benefit-heading {
    font-size: 1.3rem;
  }

  .page-blog__faq-question {
    font-size: 1rem;
    padding: 15px;
  }

  .page-blog__faq-toggle {
    font-size: 1.2rem;
  }

  /* Mobile image and video responsive styles */
  .page-blog img,
  .page-blog video {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  
  .page-blog__hero-section,
  .page-blog__introduction-section,
  .page-blog__featured-posts,
  .page-blog__promotion-categories,
  .page-blog__why-choose-sp8bet,
  .page-blog__cta-section,
  .page-blog__faq-section,
  .page-blog__conclusion-section,
  .page-blog__post-card,
  .page-blog__category-item,
  .page-blog__benefit-item,
  .page-blog__faq-item,
  .page-blog__video-section,
  .page-blog__video-container,
  .page-blog__video-wrapper {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    overflow: hidden !important;
  }

  /* Buttons in mobile */
  .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: 0;
    padding-right: 0;
    flex-wrap: wrap !important;
    gap: 10px;
    display: flex; /* Ensure flex for wrapping if multiple buttons */
    flex-direction: column; /* Stack buttons vertically */
  }

  .page-blog__cta-button,
  .page-blog__btn-primary,
  .page-blog__btn-secondary,
  .page-blog a[class*="button"],
  .page-blog a[class*="btn"] {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  /* Adjust padding for sections to avoid double padding from container */
  .page-blog__introduction-section,
  .page-blog__featured-posts,
  .page-blog__promotion-categories,
  .page-blog__why-choose-sp8bet,
  .page-blog__cta-section,
  .page-blog__faq-section,
  .page-blog__conclusion-section {
    padding-left: 0;
    padding-right: 0;
  }

  .page-blog__hero-section {
    padding-top: 10px !important; /* body already handles header offset */
  }
}

/* Ensure color contrast */
.page-blog p, .page-blog li, .page-blog__text-block, .page-blog__post-excerpt, .page-blog__category-description, .page-blog__benefit-description, .page-blog__faq-answer {
  color: #A7D9B8; /* Text Secondary */
}

.page-blog h1, .page-blog h2, .page-blog h3, .page-blog__main-title, .page-blog__section-title, .page-blog__post-title, .page-blog__category-heading, .page-blog__benefit-heading, .page-blog__faq-question {
  color: #F2C14E; /* Gold for titles */
}

.page-blog__cta-button {
  color: #ffffff; /* White text on green gradient button */
}

.page-blog__read-more {
  color: #57E38D; /* Glow for read more link */
}

.page-blog__post-title a {
  color: inherit;
}

.page-blog__post-title a:hover {
  color: #57E38D; /* Glow on hover */
}