/* Base styles for the news page */
.page-news {
  background: #0D0E12;
  color: #FFF3E6;
  font-family: Arial, sans-serif;
  line-height: 1.6;
}

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

.page-news__section-title {
  font-size: 36px;
  font-weight: bold;
  color: #FF8C1A;
  text-align: center;
  margin-bottom: 40px;
  padding-top: 20px;
}

/* Hero Section */
.page-news__hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-top: 10px; /* Small top padding, body handles --header-offset */
  padding-bottom: 60px;
  overflow: hidden;
}

.page-news__hero-image {
  width: 100%;
  height: 600px;
  position: relative;
  overflow: hidden;
  margin-bottom: 30px;
}

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

.page-news__hero-content {
  max-width: 900px;
  padding: 0 20px;
  box-sizing: border-box;
}

.page-news__main-title {
  font-size: 48px;
  font-weight: 700;
  color: #FFF3E6;
  margin-bottom: 20px;
  line-height: 1.2;
}

.page-news__description {
  font-size: 18px;
  color: #FFF3E6;
  margin-bottom: 30px;
}

.page-news__cta-button {
  display: inline-block;
  padding: 15px 30px;
  background: linear-gradient(180deg, #FFA53A 0%, #D96800 100%);
  color: #ffffff;
  text-decoration: none;
  border-radius: 8px;
  font-weight: bold;
  font-size: 18px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: none;
  cursor: pointer;
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-news__cta-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 15px rgba(255, 140, 26, 0.4);
}

/* Latest Articles Section */
.page-news__latest-articles-section {
  padding: 60px 0;
  background: #17191F;
}

.page-news__articles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin-bottom: 40px;
}

.page-news__article-card {
  background: #0D0E12;
  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;
  border: 1px solid #A84F0C;
}

.page-news__article-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(255, 140, 26, 0.3);
}

.page-news__article-thumbnail {
  height: 220px;
  overflow: hidden;
}

.page-news__article-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

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

.page-news__article-title {
  font-size: 22px;
  font-weight: bold;
  margin-bottom: 10px;
  line-height: 1.3;
}

.page-news__article-title a {
  color: #FFF3E6;
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-news__article-title a:hover {
  color: #FF8C1A;
}

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

.page-news__article-excerpt {
  font-size: 16px;
  color: #FFF3E6;
  margin-bottom: 20px;
}

.page-news__read-more-button {
  display: inline-block;
  padding: 10px 20px;
  background: #FF8C1A;
  color: #ffffff;
  text-decoration: none;
  border-radius: 5px;
  font-size: 16px;
  transition: background-color 0.3s ease;
}

.page-news__read-more-button:hover {
  background: #D96800;
}

.page-news__view-all-button-container {
  text-align: center;
  margin-top: 40px;
}

.page-news__cta-button--secondary {
  background: none;
  border: 2px solid #FF8C1A;
  color: #FF8C1A;
  padding: 13px 28px;
  font-size: 16px;
  font-weight: normal;
}

.page-news__cta-button--secondary:hover {
  background: #FF8C1A;
  color: #ffffff;
  box-shadow: 0 8px 15px rgba(255, 140, 26, 0.4);
}

/* About w88bet Section */
.page-news__about-w88bet-section {
  padding: 60px 0;
  background: #0D0E12;
}

.page-news__content-wrapper {
  display: flex;
  gap: 40px;
  align-items: center;
}

.page-news__text-block {
  flex: 1;
}

.page-news__text-block p {
  font-size: 17px;
  color: #FFF3E6;
  margin-bottom: 20px;
}

.page-news__text-block p a {
  color: #FFA53A;
  text-decoration: none;
  font-weight: bold;
}

.page-news__text-block p a:hover {
  text-decoration: underline;
}

.page-news__image-block {
  flex: 1;
  text-align: center;
}

.page-news__image-block img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  display: block; /* Ensure it respects max-width */
}

.page-news__cta-button--register {
  margin-top: 20px;
}

/* FAQ Section */
.page-news__faq-section {
  padding: 60px 0;
  background: #17191F;
}

details.page-news__faq-item {
  margin-bottom: 15px;
  border-radius: 10px;
  border: 1px solid #A84F0C;
  overflow: hidden;
  background: #0D0E12;
}

details.page-news__faq-item summary.page-news__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-news__faq-item summary.page-news__faq-question::-webkit-details-marker {
  display: none;
}

details.page-news__faq-item summary.page-news__faq-question:hover {
  background: #1e2027;
}

.page-news__faq-qtext {
  flex: 1;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.5;
  text-align: left;
  color: #FFF3E6;
}

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

details.page-news__faq-item .page-news__faq-answer {
  padding: 0 20px 20px;
  background: #0D0E12;
  border-radius: 0 0 10px 10px;
  color: #FFF3E6;
}

.page-news__faq-answer p {
  margin-bottom: 0;
  font-size: 16px;
}

/* CTA Banner Section */
.page-news__cta-banner-section {
  background: url('[GALLERY:bg:1920x400:w88bet,cta,banner,orange]') no-repeat center center;
  background-size: cover;
  padding: 80px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-news__cta-banner-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 1;
}

.page-news__cta-banner-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
}

.page-news__cta-text {
  max-width: 800px;
}

.page-news__cta-title {
  font-size: 40px;
  color: #FFF3E6;
  margin-bottom: 15px;
  line-height: 1.2;
}

.page-news__cta-description {
  font-size: 18px;
  color: #FFF3E6;
  margin-bottom: 30px;
}

.page-news__cta-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  width: 100%; /* Ensure container takes full width for responsive */
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

/* Responsive Styles */
@media (max-width: 1024px) {
  .page-news__articles-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .page-news__main-title {
    font-size: 42px;
  }
  .page-news__hero-image {
    height: 500px;
  }
  .page-news__cta-title {
    font-size: 36px;
  }
}

@media (max-width: 849px) {
  .page-news__hero-image img {
    object-fit: contain !important; /* Prevent cropping on smaller screens */
    aspect-ratio: unset !important;
    height: auto !important;
  }
  .page-news__hero-image {
    height: auto; /* Allow height to adjust */
  }
  .page-news__main-title {
    font-size: clamp(32px, 8vw, 42px);
  }
}

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

  .page-news__section-title {
    font-size: 28px;
    margin-bottom: 30px;
  }

  /* HERO Section */
  .page-news__hero-section {
    padding-top: 10px; /* Small top padding, body handles --header-offset */
    padding-bottom: 40px;
  }
  .page-news__hero-image {
    height: auto !important;
    margin-bottom: 20px;
  }
  .page-news__hero-image img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    object-fit: contain !important;
    aspect-ratio: unset !important;
  }
  .page-news__main-title {
    font-size: clamp(28px, 8vw, 36px);
  }
  .page-news__description {
    font-size: 16px;
  }

  /* Latest Articles Section */
  .page-news__articles-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .page-news__article-thumbnail {
    height: 180px;
  }
  .page-news__article-title {
    font-size: 20px;
  }
  .page-news__article-excerpt {
    font-size: 15px;
  }

  /* About w88bet Section */
  .page-news__content-wrapper {
    flex-direction: column;
    gap: 30px;
  }
  .page-news__text-block p {
    font-size: 16px;
  }
  .page-news__image-block img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

  /* FAQ Section */
  details.page-news__faq-item summary.page-news__faq-question {
    padding: 15px;
  }
  .page-news__faq-qtext {
    font-size: 16px;
  }
  .page-news__faq-toggle {
    font-size: 20px;
    width: 24px;
    height: 24px;
  }
  details.page-news__faq-item .page-news__faq-answer {
    padding: 0 15px 15px;
  }

  /* CTA Banner Section */
  .page-news__cta-banner-section {
    padding: 60px 0;
  }
  .page-news__cta-title {
    font-size: 28px;
  }
  .page-news__cta-description {
    font-size: 16px;
  }
  .page-news__cta-buttons {
    flex-direction: column; /* Stack buttons vertically */
    gap: 15px;
    padding-left: 15px;
    padding-right: 15px;
  }

  /* Universal Image and Button Responsive Rules for Mobile */
  .page-news img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }

  .page-news__section,
  .page-news__card,
  .page-news__container,
  .page-news__content-wrapper,
  .page-news__hero-content,
  .page-news__cta-banner-content,
  .page-news__cta-text {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-news__cta-button,
  .page-news__btn-primary,
  .page-news__btn-secondary,
  .page-news a[class*="button"],
  .page-news 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;
  }
  .page-news__button-group {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    flex-wrap: wrap !important;
    gap: 10px;
  }
}