.page-blog {
  font-family: 'Arial', sans-serif;
  color: #333333; /* Default text color for light background */
  background-color: #FFFFFF;
}

.page-blog__hero-section {
  background-color: #017439; /* Primary brand color for hero background */
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-bottom: 40px;
  text-align: center;
  padding-top: 10px; /* Small top padding, assuming body handles header offset */
}

.page-blog__hero-image-wrapper {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  box-sizing: border-box;
}

.page-blog__hero-image {
  width: 100%;
  height: auto;
  display: block;
  max-width: 100%;
}

.page-blog__hero-content {
  max-width: 900px;
  margin: 20px auto 0;
  padding: 0 15px;
  color: #FFFFFF; /* White text on dark background */
}

.page-blog__main-title {
  font-weight: bold;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 15px;
  color: #FFFF00; /* Custom color for login/register font, used here for emphasis */
}

.page-blog__intro-text {
  font-size: 1.1em;
  line-height: 1.6;
  margin-bottom: 30px;
}

.page-blog__btn-primary,
.page-blog__btn-secondary {
  display: inline-block;
  padding: 12px 25px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

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

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

.page-blog__btn-secondary {
  background-color: #FFFFFF;
  color: #017439; /* Primary brand color */
  border: 2px solid #017439;
  margin-left: 15px;
}

.page-blog__btn-secondary:hover {
  background-color: #f0f0f0;
  border-color: #017439;
}

.page-blog__latest-posts,
.page-blog__why-choose-w88,
.page-blog__faq-section {
  padding: 60px 0;
}

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

.page-blog__section-title {
  font-size: 2.5em;
  font-weight: bold;
  text-align: center;
  margin-bottom: 40px;
  color: #017439; /* Primary brand color */
}

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

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

.page-blog__post-card {
  background-color: #FFFFFF;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  height: 100%; /* Ensure cards have equal height */
  display: flex;
  flex-direction: column;
}

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

.page-blog__post-link {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.page-blog__post-image {
  width: 100%;
  height: 200px; /* Fixed height for consistency */
  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.3em;
  font-weight: bold;
  margin-bottom: 10px;
  color: #017439;
  line-height: 1.4;
}

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

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

.page-blog__read-more {
  color: #C30808;
  font-weight: bold;
  display: inline-flex;
  align-items: center;
}

.page-blog__read-more i {
  margin-left: 8px;
  font-size: 0.9em;
}

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

.page-blog__categories {
  background-color: #017439; /* Primary brand color */
  padding: 60px 0;
}

.page-blog__category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 25px;
}

.page-blog__category-card {
  background-color: #FFFFFF;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  text-align: center;
  padding: 25px;
  text-decoration: none;
  color: #333333;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-blog__category-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

.page-blog__category-icon {
  width: 100%; /* Ensure icons are not tiny */
  max-width: 80px; /* But keep them reasonable size */
  height: auto;
  margin-bottom: 15px;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.page-blog__category-title {
  font-size: 1.2em;
  font-weight: bold;
  color: #017439;
}

.page-blog__why-choose-w88 .page-blog__content-wrapper {
  max-width: 900px;
  margin: 0 auto 30px;
  text-align: center;
  line-height: 1.7;
  font-size: 1.1em;
  color: #555555;
}

.page-blog__why-list {
  list-style: none;
  padding: 0;
  margin: 30px auto;
  max-width: 700px;
  text-align: left;
}

.page-blog__why-list li {
  margin-bottom: 10px;
  font-size: 1em;
  color: #333333;
}

.page-blog__why-list i {
  color: #017439;
  margin-right: 10px;
}

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

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

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

.page-blog__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px;
  font-weight: bold;
  font-size: 1.1em;
  color: #017439;
  cursor: pointer;
  list-style: none;
}

.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;
  color: #C30808;
  transition: transform 0.3s ease;
}

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

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

/* --- Responsive Styles --- */
@media (max-width: 1024px) {
  .page-blog__main-title {
    font-size: 2.8em;
  }

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

  .page-blog__category-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  }
}

@media (max-width: 768px) {
  .page-blog__hero-section {
    flex-direction: column;
    padding-top: 10px !important;
    padding-bottom: 30px;
  }

  .page-blog__hero-image {
    object-fit: contain !important; /* Ensure main image is not cropped on mobile */
    aspect-ratio: unset !important;
    max-height: none !important;
  }

  .page-blog__main-title {
    font-size: 2.2em;
    margin-bottom: 10px;
  }

  .page-blog__intro-text {
    font-size: 1em;
    margin-bottom: 20px;
  }

  .page-blog__btn-primary,
  .page-blog__btn-secondary {
    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;
    margin-left: 0 !important; /* Remove margin for single column layout */
  }

  .page-blog__cta-buttons {
    flex-direction: column !important; /* Stack buttons vertically */
    gap: 15px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-blog__latest-posts,
  .page-blog__why-choose-w88,
  .page-blog__faq-section,
  .page-blog__categories {
    padding: 40px 0;
  }

  .page-blog__container {
    padding: 0 15px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .page-blog__section-title {
    font-size: 1.8em;
    margin-bottom: 30px;
  }

  .page-blog__post-grid {
    grid-template-columns: 1fr; /* Single column for blog posts */
    gap: 20px;
  }

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

  .page-blog__post-title {
    font-size: 1.1em;
  }

  .page-blog__post-excerpt {
    font-size: 0.95em;
  }

  .page-blog__category-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
  }

  .page-blog__category-card {
    padding: 15px;
  }

  .page-blog__why-choose-w88 .page-blog__content-wrapper {
    font-size: 1em;
  }

  .page-blog__why-list {
    margin: 20px auto;
    padding: 0 10px;
  }

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

  .page-blog__faq-answer {
    padding: 0 20px 15px;
    font-size: 0.95em;
  }

  .page-blog img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

  .page-blog__post-card, .page-blog__category-card {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
}