/* style/blog.css */

/* Biến màu tùy chỉnh */
:root {
  --betway-primary-color: #C91F17;
  --betway-secondary-color: #E53935;
  --betway-button-gradient: linear-gradient(180deg, #FFD86A 0%, #E6B800 100%);
  --betway-card-bg: #D32F2F;
  --betway-background: #B71C1C;
  --betway-text-main: #FFF5E1;
  --betway-border-color: #F2B544;
  --betway-glow-color: #FFCC66;
  --betway-gold-color: #F4D34D;
  --betway-deep-red: #7A0E0E;
}

.page-blog {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: #333333; /* Mặc định cho nền sáng */
}

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

.page-blog__section-title {
  font-size: clamp(28px, 4vw, 38px);
  font-weight: 700;
  color: var(--betway-primary-color);
  text-align: center;
  margin-bottom: 20px;
  line-height: 1.2;
}

.page-blog__section-title--light {
  color: var(--betway-text-main);
}

.page-blog__section-intro {
  font-size: clamp(16px, 2.5vw, 18px);
  color: #666666;
  text-align: center;
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.page-blog__section-intro--light {
  color: #f0f0f0;
}

/* Hero Section */
.page-blog__hero-section {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-top: 10px; /* Nhỏ hơn so với header-offset của body */
  background: var(--betway-background);
}

.page-blog__hero-image-wrapper {
  width: 100%;
  max-height: 675px;
  overflow: hidden;
}

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

.page-blog__hero-content {
  padding: 40px 15px;
  max-width: 900px;
  z-index: 1;
  color: var(--betway-text-main);
}

.page-blog__main-title {
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 20px;
  color: var(--betway-gold-color);
  text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.page-blog__description {
  font-size: clamp(18px, 2.5vw, 22px);
  margin-bottom: 30px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  color: var(--betway-text-main);
}

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

.page-blog__cta-buttons--center {
  margin-top: 30px;
}

.page-blog__btn-primary,
.page-blog__btn-secondary,
.page-blog a[class*="button"],
.page-blog a[class*="btn"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  border-radius: 8px;
  font-size: 18px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.3s ease;
  box-sizing: border-box;
  max-width: 100%;
  white-space: normal;
  word-wrap: break-word;
}

.page-blog__btn-primary {
  background: var(--betway-button-gradient);
  color: #1a1a1a; /* Màu chữ đậm cho nền vàng */
  border: 2px solid var(--betway-gold-color);
  box-shadow: 0 4px 15px rgba(255, 216, 106, 0.4);
}

.page-blog__btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 216, 106, 0.6);
}

.page-blog__btn-secondary {
  background: var(--betway-deep-red);
  color: var(--betway-text-main);
  border: 2px solid var(--betway-deep-red);
  box-shadow: 0 4px 10px rgba(122, 14, 14, 0.3);
}

.page-blog__btn-secondary:hover {
  background: var(--betway-primary-color);
  border-color: var(--betway-primary-color);
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(201, 31, 23, 0.4);
}

/* Latest Posts Section */
.page-blog__latest-posts-section {
  padding: 60px 0;
  background: #f9f9f9; /* Nền sáng */
}

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

.page-blog__post-card {
  background: #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;
  color: #333333;
  display: flex;
  flex-direction: column;
}

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

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

.page-blog__post-image {
  width: 100%;
  height: 220px;
  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: 22px;
  font-weight: 700;
  margin-top: 0;
  margin-bottom: 10px;
  color: var(--betway-primary-color);
  line-height: 1.3;
}

.page-blog__post-meta {
  font-size: 14px;
  color: #888888;
  margin-bottom: 15px;
}

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

.page-blog__read-more {
  color: var(--betway-primary-color);
  font-weight: 600;
  display: inline-block;
  margin-top: auto;
}

.page-blog__read-more:hover {
  text-decoration: underline;
}

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

/* Categories Section */
.page-blog__categories-section {
  padding: 60px 0;
  background: var(--betway-background);
  color: var(--betway-text-main);
}

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

.page-blog__category-card {
  background: var(--betway-card-bg);
  border-radius: 10px;
  padding: 30px 20px;
  text-align: center;
  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;
  align-items: center;
  justify-content: center;
}

.page-blog__category-card a {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
}

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

.page-blog__category-icon {
  width: 80px;
  height: 80px;
  object-fit: contain;
  margin-bottom: 15px;
}

.page-blog__category-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--betway-gold-color);
  margin-bottom: 10px;
}

.page-blog__category-description {
  font-size: 15px;
  color: var(--betway-text-main);
}

/* Featured Article Section */
.page-blog__featured-article-section {
  padding: 60px 0;
  background: #f0f0f0; /* Nền sáng */
}

.page-blog__featured-content {
  display: flex;
  gap: 40px;
  align-items: center;
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  padding: 30px;
}

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

.page-blog__featured-text {
  width: 50%;
  color: #333333;
}

.page-blog__featured-title {
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 700;
  color: var(--betway-primary-color);
  margin-top: 0;
  margin-bottom: 15px;
  line-height: 1.3;
}

.page-blog__featured-meta {
  font-size: 15px;
  color: #888888;
  margin-bottom: 20px;
}

.page-blog__featured-excerpt {
  font-size: 17px;
  color: #555555;
  margin-bottom: 30px;
}

/* Content Area */
.page-blog__content-area {
  padding: 60px 0;
  background: #ffffff; /* Nền sáng */
  color: #333333;
}

.page-blog__article-body {
  max-width: 900px;
  margin: 0 auto;
  font-size: 17px;
  line-height: 1.7;
}

.page-blog__article-body h2,
.page-blog__article-body h3 {
  color: var(--betway-primary-color);
  margin-top: 40px;
  margin-bottom: 20px;
  line-height: 1.3;
}

.page-blog__article-body h2 {
  font-size: clamp(26px, 3.5vw, 34px);
  font-weight: 700;
}

.page-blog__article-body h3 {
  font-size: clamp(22px, 3vw, 28px);
  font-weight: 600;
}

.page-blog__article-body p {
  margin-bottom: 15px;
}

.page-blog__article-figure {
  margin: 30px 0;
  text-align: center;
}

.page-blog__article-figure img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  display: block;
  margin: 0 auto;
}

.page-blog__article-figure figcaption {
  font-size: 15px;
  color: #777777;
  margin-top: 10px;
}

/* FAQ Section */
.page-blog__faq-section {
  padding: 60px 0;
  background: #f9f9f9; /* Nền sáng */
}

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

details.page-blog__faq-item {
  margin-bottom: 15px;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

details.page-blog__faq-item summary.page-blog__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px;
  cursor: pointer;
  user-select: none;
  list-style: none;
  transition: background-color 0.3s ease;
  color: var(--betway-primary-color);
}

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: 18px;
  font-weight: 600;
  line-height: 1.5;
  text-align: left;
}

.page-blog__faq-toggle {
  font-size: 28px;
  font-weight: bold;
  color: #666;
  flex-shrink: 0;
  margin-left: 15px;
  width: 30px;
  text-align: center;
}

details.page-blog__faq-item .page-blog__faq-answer {
  padding: 0 25px 20px;
  background: #fcfcfc;
  border-radius: 0 0 8px 8px;
  color: #555555;
  font-size: 16px;
}

/* Call to Action Section */
.page-blog__call-to-action-section {
  padding: 80px 0;
  background: var(--betway-background);
  text-align: center;
  color: var(--betway-text-main);
}

.page-blog__cta-content {
  max-width: 900px;
  margin: 0 auto;
}

.page-blog__cta-title {
  font-size: clamp(30px, 4vw, 42px);
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--betway-gold-color);
}

.page-blog__cta-description {
  font-size: clamp(18px, 2.5vw, 22px);
  margin-bottom: 40px;
  color: var(--betway-text-main);
}

/* Global image rules for content area */
.page-blog img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Responsive Styles */
@media (max-width: 1024px) {
  .page-blog__hero-image-wrapper {
    max-height: 500px;
  }

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

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

  .page-blog__featured-content {
    flex-direction: column;
    padding: 25px;
  }

  .page-blog__featured-image,
  .page-blog__featured-text {
    width: 100%;
  }
}

@media (max-width: 849px) {
  .page-blog__hero-image {
    object-fit: contain !important;
    aspect-ratio: unset !important;
  }
  .page-blog__hero-image-wrapper {
    max-height: none;
  }
}

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

  .page-blog__hero-section {
    padding-top: 10px; /* Vẫn giữ 10px để không bị trùng với body padding-top */
  }

  .page-blog__main-title {
    font-size: clamp(28px, 8vw, 40px);
  }

  .page-blog__description {
    font-size: clamp(16px, 4vw, 18px);
  }

  .page-blog__cta-buttons {
    flex-direction: column; /* Nút dọc trên di động */
    gap: 15px;
  }

  .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;
    padding: 12px 15px;
    font-size: 16px;
  }

  /* Latest Posts Section */
  .page-blog__latest-posts-section {
    padding: 40px 0;
  }

  .page-blog__posts-grid {
    grid-template-columns: 1fr;
  }

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

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

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

  /* Categories Section */
  .page-blog__categories-section {
    padding: 40px 0;
  }

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

  .page-blog__category-icon {
    width: 60px;
    height: 60px;
  }

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

  .page-blog__category-description {
    font-size: 14px;
  }

  /* Featured Article Section */
  .page-blog__featured-article-section {
    padding: 40px 0;
  }

  .page-blog__featured-content {
    padding: 20px;
  }

  .page-blog__featured-title {
    font-size: clamp(20px, 5vw, 26px);
  }

  .page-blog__featured-excerpt {
    font-size: 16px;
  }

  /* Content Area */
  .page-blog__content-area {
    padding: 40px 0;
  }

  .page-blog__article-body {
    font-size: 16px;
  }

  .page-blog__article-body h2 {
    font-size: clamp(24px, 6vw, 30px);
  }

  .page-blog__article-body h3 {
    font-size: clamp(20px, 5vw, 24px);
  }

  .page-blog__article-figure {
    margin: 20px 0;
  }

  /* FAQ Section */
  .page-blog__faq-section {
    padding: 40px 0;
  }

  details.page-blog__faq-item summary.page-blog__faq-question {
    padding: 15px 20px;
  }

  .page-blog__faq-qtext {
    font-size: 16px;
  }

  .page-blog__faq-toggle {
    font-size: 24px;
    width: 24px;
    height: 24px;
  }

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

  /* Call to Action Section */
  .page-blog__call-to-action-section {
    padding: 50px 0;
  }

  .page-blog__cta-title {
    font-size: clamp(26px, 7vw, 36px);
  }

  .page-blog__cta-description {
    font-size: clamp(16px, 4vw, 18px);
  }

  /* Generic image and container rules for mobile */
  .page-blog img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

  .page-blog__section,
  .page-blog__card,
  .page-blog__container,
  .page-blog__cta-buttons,
  .page-blog__button-group,
  .page-blog__btn-container,
  .page-blog__posts-grid,
  .page-blog__categories-grid,
  .page-blog__featured-content {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
  .page-blog__posts-grid, .page-blog__categories-grid {
    gap: 15px;
  }
  .page-blog__cta-buttons {
    flex-wrap: wrap !important;
    gap: 15px;
  }
}