:root {
  --primary-color: #11A84E;
  --secondary-color: #22C768;
  --button-bg: linear-gradient(180deg, #2AD16F 0%, #13994A 100%);
  --card-bg: #11271B;
  --bg-color: #08160F;
  --text-main: #F2FFF6;
  --text-secondary: #A7D9B8;
  --border-color: #2E7A4E;
  --glow-color: #57E38D;
  --gold-color: #F2C14E;
  --divider-color: #1E3A2A;
  --deep-green: #0A4B2C;
}

/* style/blog.css */
/* body đã có padding-top: var(--header-offset); nên không cần thêm ở đây */
.page-blog {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: var(--text-main); /* #F2FFF6 */
  background-color: var(--bg-color); /* #08160F */
}

/* Hero Section */
.page-blog__hero-section {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column; /* Stacks image then content */
  align-items: center;
  justify-content: center;
  padding: 10px 0 60px 0; /* Small top padding, more bottom padding */
  overflow: hidden;
  background: var(--bg-color); /* Matches body background */
}

.page-blog__hero-image-wrapper {
    width: 100%;
    max-height: 500px; /* Limit height for hero image */
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

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

.page-blog__hero-content-wrapper {
  text-align: center;
  padding: 40px 20px;
  max-width: 900px;
  z-index: 1; /* Ensure content is above image if any overlap */
  color: var(--text-main);
}

.page-blog__main-title {
  font-size: clamp(2em, 5vw, 3.5em); /* Responsive H1 font size */
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 20px;
  line-height: 1.2;
}

.page-blog__description {
  font-size: 1.1em;
  color: var(--text-secondary);
  margin-bottom: 30px;
}

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

.page-blog__btn-primary,
.page-blog__btn-secondary {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  white-space: normal; /* Allow text wrapping */
  word-wrap: break-word; /* Allow text wrapping */
  max-width: 100%; /* Ensure button fits container */
  box-sizing: border-box;
}

.page-blog__btn-primary {
  background: var(--button-bg); /* linear-gradient */
  color: var(--text-main); /* #F2FFF6 */
  border: none;
}

.page-blog__btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}

.page-blog__btn-secondary {
  background: transparent;
  color: var(--text-main); /* #F2FFF6 */
  border: 2px solid var(--border-color); /* #2E7A4E */
}

.page-blog__btn-secondary:hover {
  background: rgba(46, 122, 78, 0.2); /* Slightly lighter border color */
  transform: translateY(-2px);
}

/* General Section Styling */
.page-blog__container {
  width: 100%; /* Ensure container takes full width */
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
  box-sizing: border-box;
}

.page-blog__section-title {
  font-size: 2.5em;
  color: var(--gold-color); /* #F2C14E */
  text-align: center;
  margin-bottom: 20px;
  font-weight: 700;
}

.page-blog__section-description {
  font-size: 1.1em;
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: 40px;
}

/* Latest Articles Section */
.page-blog__latest-articles-section {
  background-color: var(--bg-color);
  padding: 60px 0;
}

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

.page-blog__article-card {
  background-color: var(--card-bg); /* #11271B */
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

.page-blog__article-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.page-blog__article-image {
  width: 100%;
  height: 225px; /* Fixed height for consistency */
  object-fit: cover;
  display: block;
}

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

.page-blog__article-title {
  font-size: 1.4em;
  color: var(--text-main);
  margin-bottom: 10px;
  line-height: 1.3;
}

.page-blog__article-title a {
  color: inherit;
  text-decoration: none;
}

.page-blog__article-title a:hover {
  color: var(--gold-color);
}

.page-blog__article-meta {
  font-size: 0.9em;
  color: var(--text-secondary);
  margin-bottom: 15px;
}

.page-blog__article-excerpt {
  color: var(--text-secondary);
  margin-bottom: 20px;
  flex-grow: 1;
}

.page-blog__read-more-btn {
  display: inline-block;
  padding: 10px 20px;
  background: var(--deep-green); /* #0A4B2C */
  color: var(--text-main);
  border-radius: 5px;
  text-decoration: none;
  font-weight: 500;
  transition: background-color 0.3s ease;
  align-self: flex-start;
}

.page-blog__read-more-btn:hover {
  background-color: var(--primary-color); /* #11A84E */
}

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

/* Why Choose Keo88 Section */
.page-blog__why-choose-keo88-section {
  background-color: var(--deep-green); /* #0A4B2C */
  padding: 80px 0;
}

.page-blog__features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  text-align: center;
}

.page-blog__feature-item {
  background-color: var(--card-bg);
  border-radius: 10px;
  padding: 30px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease;
}

.page-blog__feature-item:hover {
  transform: translateY(-5px);
}

.page-blog__feature-icon {
  width: 100%;
  max-width: 150px;
  height: auto;
  margin-bottom: 20px;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.page-blog__feature-title {
  font-size: 1.5em;
  color: var(--gold-color);
  margin-bottom: 15px;
}

.page-blog__feature-description {
  color: var(--text-secondary);
  font-size: 1em;
}

/* Gaming Categories Section */
.page-blog__gaming-categories-section {
  background-color: var(--bg-color);
  padding: 80px 0;
}

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

.page-blog__category-item {
  background-color: var(--card-bg);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease;
  text-align: center;
}

.page-blog__category-item:hover {
  transform: translateY(-5px);
}

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

.page-blog__category-title {
  font-size: 1.3em;
  color: var(--text-main);
  margin: 20px 15px 10px 15px;
}

.page-blog__category-description {
  color: var(--text-secondary);
  font-size: 0.95em;
  padding: 0 15px 20px 15px;
}

.page-blog__category-link {
  display: block;
  padding: 12px 15px;
  background-color: var(--primary-color); /* #11A84E */
  color: var(--text-main);
  text-decoration: none;
  font-weight: 500;
  transition: background-color 0.3s ease;
}

.page-blog__category-link:hover {
  background-color: var(--secondary-color); /* #22C768 */
}

/* Promotions Section */
.page-blog__promotions-section {
  background-color: var(--deep-green); /* #0A4B2C */
  padding: 80px 0;
}

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

.page-blog__promotion-card {
  background-color: var(--card-bg);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
}

.page-blog__promotion-card:hover {
  transform: translateY(-5px);
}

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

.page-blog__promotion-title {
  font-size: 1.4em;
  color: var(--text-main);
  margin: 20px 20px 10px 20px;
}

.page-blog__promotion-description {
  color: var(--text-secondary);
  font-size: 0.95em;
  padding: 0 20px 20px 20px;
  flex-grow: 1;
}

/* FAQ Section */
.page-blog__faq-section {
  background-color: var(--bg-color);
  padding: 80px 0;
}

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

.page-blog__faq-item {
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
}

.page-blog__faq-item summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  cursor: pointer;
  outline: none;
  list-style: none; /* Remove default marker */
  color: var(--text-main);
  font-weight: 600;
  font-size: 1.1em;
  transition: background-color 0.3s ease;
}

.page-blog__faq-item summary::-webkit-details-marker {
  display: none; /* Remove default marker for Webkit */
}

.page-blog__faq-item summary:hover {
  background-color: rgba(46, 122, 78, 0.1); /* Lighter hover for contrast */
}

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

.page-blog__faq-toggle {
  font-size: 1.5em;
  line-height: 1;
  margin-left: 15px;
  color: var(--gold-color);
}

.page-blog__faq-answer {
  padding: 0 25px 20px 25px;
  color: var(--text-secondary);
  font-size: 1em;
}

.page-blog__responsible-gambling-cta {
    text-align: center;
    margin-top: 40px;
}

/* CTA Section */
.page-blog__cta-section {
  background: linear-gradient(to right, var(--primary-color), var(--secondary-color)); /* Using brand colors */
  padding: 80px 0;
  text-align: center;
  color: var(--text-main);
}

.page-blog__cta-section .page-blog__section-title {
  color: var(--text-main); /* H2 in CTA section should be white */
}

.page-blog__cta-section .page-blog__section-description {
  color: var(--text-main);
  margin-bottom: 50px;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-blog__main-title {
    font-size: clamp(1.8em, 6vw, 3em);
  }
  .page-blog__section-title {
    font-size: 2em;
  }
}

@media (max-width: 768px) {
  .page-blog__hero-section {
    padding: 10px 0 40px 0;
  }
  .page-blog__hero-content-wrapper {
    padding: 30px 15px;
  }
  .page-blog__main-title {
    font-size: clamp(1.5em, 8vw, 2.5em);
  }
  .page-blog__description {
    font-size: 1em;
  }
  .page-blog__section-title {
    font-size: 1.8em;
  }
  .page-blog__section-description {
    font-size: 0.95em;
  }
  .page-blog__container {
    padding: 30px 15px;
  }
  .page-blog__cta-buttons {
    flex-direction: column;
    gap: 15px;
  }
  .page-blog__btn-primary,
  .page-blog__btn-secondary {
    padding: 12px 20px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }
  .page-blog__articles-grid,
  .page-blog__features-grid,
  .page-blog__categories-grid,
  .page-blog__promotions-grid {
    grid-template-columns: 1fr;
    gap: 25px;
  }

  /* Image responsive rules */
  .page-blog img {
    max-width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  .page-blog__hero-image-wrapper,
  .page-blog__latest-articles-section,
  .page-blog__why-choose-keo88-section,
  .page-blog__gaming-categories-section,
  .page-blog__promotions-section,
  .page-blog__faq-section,
  .page-blog__cta-section,
  .page-blog__article-card,
  .page-blog__feature-item,
  .page-blog__category-item,
  .page-blog__promotion-card,
  .page-blog__faq-item {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  /* Add padding to sections and cards for mobile */
  .page-blog__container,
  .page-blog__hero-content-wrapper,
  .page-blog__article-card,
  .page-blog__feature-item,
  .page-blog__category-item,
  .page-blog__promotion-card,
  .page-blog__faq-item {
    padding-left: 15px !important;
    padding-right: 15px !important;
  }
  .page-blog__hero-image-wrapper {
      max-height: 300px;
  }
  .page-blog__article-image,
  .page-blog__category-image,
  .page-blog__promotion-image {
      height: 180px;
  }
  .page-blog__feature-icon {
      max-width: 100px;
  }
  .page-blog__faq-item summary {
    font-size: 1em;
    padding: 15px 20px;
  }
  .page-blog__faq-answer {
    padding: 0 20px 15px 20px;
  }
}