/* style/news.css */

/* General Page Styles */
.page-news {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: #f0f0f0; /* Light text for dark body background */
  background-color: transparent; /* Body background is handled by shared.css */
}

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

.page-news__section-title {
  font-size: 2.8em;
  color: #26A9E0;
  text-align: center;
  margin-bottom: 15px;
  font-weight: bold;
}

.page-news__section-subtitle {
  font-size: 1.2em;
  color: #ffffff;
  text-align: center;
  margin-bottom: 40px;
  opacity: 0.8;
}

/* Buttons */
.page-news__btn-primary,
.page-news__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;
  text-align: center;
  cursor: pointer;
  box-sizing: border-box;
  max-width: 100%;
  white-space: normal;
  word-wrap: break-word;
}

.page-news__btn-primary {
  background-color: #26A9E0;
  color: #FFFFFF;
  border: 2px solid #26A9E0;
}

.page-news__btn-primary:hover {
  background-color: #1a7fb3;
  border-color: #1a7fb3;
}

.page-news__btn-secondary {
  background-color: #FFFFFF;
  color: #26A9E0;
  border: 2px solid #26A9E0;
}

.page-news__btn-secondary:hover {
  background-color: #e0e0e0;
  color: #1a7fb3;
  border-color: #1a7fb3;
}

/* Hero Section */
.page-news__hero-section {
  position: relative;
  padding: 120px 0 80px; /* Uses var(--header-offset) for top padding on desktop */
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  min-height: 500px;
  background-image: url('[GALLERY:hero:1920x1080:vn88_news_hero,betting_platform,dynamic_background]');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

.page-news__hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 1;
}

.page-news__hero-section .page-news__container {
  position: relative;
  z-index: 2;
  color: #FFFFFF;
}

.page-news__hero-title {
  font-size: 3.8em;
  margin-bottom: 20px;
  line-height: 1.2;
  color: #FFFFFF;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.page-news__hero-description {
  font-size: 1.3em;
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  opacity: 0.9;
}

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

/* Latest News Section */
.page-news__latest-news-section {
  padding: 80px 0;
  background-color: #0d0d0d; /* Slightly lighter dark background for contrast */
  color: #ffffff;
}

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

.page-news__news-card {
  background-color: rgba(255, 255, 255, 0.1); /* Semi-transparent white for dark background */
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

.page-news__news-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.4);
}

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

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

.page-news__card-title {
  font-size: 1.6em;
  margin-bottom: 10px;
  line-height: 1.3;
}

.page-news__card-link {
  color: #26A9E0; /* Brand color for links */
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-news__card-link:hover {
  color: #FFFFFF;
}

.page-news__card-date {
  font-size: 0.9em;
  color: #bbb;
  margin-bottom: 15px;
}

.page-news__card-description {
  font-size: 1em;
  color: #f0f0f0;
  margin-bottom: 20px;
  flex-grow: 1;
}

.page-news__read-more {
  display: inline-block;
  color: #26A9E0;
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease;
  margin-top: auto; /* Pushes to bottom */
}

.page-news__read-more:hover {
  color: #FFFFFF;
}

.page-news__cta-button-container {
    text-align: center;
    margin-top: 60px;
}

/* Video Section */
.page-news__video-section {
  padding: 80px 0;
  background-color: #0a0a0a; /* Dark background */
  color: #FFFFFF;
  text-align: center;
}

.page-news__video-wrapper {
  position: relative;
  width: 100%;
  max-width: 1280px;
  margin: 40px auto 0;
  padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
  height: 0;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.page-news__video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

.page-news__video-overlay-cta {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 10;
  pointer-events: none; /* Allow clicks to pass through by default */
}

.page-news__video-wrapper:hover .page-news__video-overlay-cta {
  opacity: 1;
  pointer-events: auto;
}

.page-news__video-overlay-cta p {
  font-size: 2em;
  margin-bottom: 20px;
  color: #FFFFFF;
  font-weight: bold;
}

/* Categories Section */
.page-news__categories-section {
  padding: 80px 0;
  background-color: #1a1a1a;
  color: #ffffff;
}

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

.page-news__category-card {
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 25px;
  text-align: center;
  text-decoration: none;
  color: #FFFFFF;
  transition: transform 0.3s ease, background-color 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.page-news__category-card:hover {
  transform: translateY(-8px);
  background-color: rgba(38, 169, 224, 0.2); /* Lighter brand color on hover */
}

.page-news__category-icon {
  width: 80px;
  height: 80px;
  object-fit: contain;
  margin-bottom: 15px;
  filter: brightness(1.2); /* Slightly brighten icons for visibility on dark bg */
}

.page-news__category-title {
  font-size: 1.3em;
  font-weight: bold;
  color: #FFFFFF;
}

/* FAQ Section */
.page-news__faq-section {
  padding: 80px 0;
  background-color: #0a0a0a;
  color: #FFFFFF;
}

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

.page-news__faq-item {
  background-color: rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.page-news__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  cursor: pointer;
  background-color: rgba(255, 255, 255, 0.1);
  transition: background-color 0.3s ease;
}

.page-news__faq-question:hover {
  background-color: rgba(255, 255, 255, 0.15);
}

.page-news__faq-question-title {
  font-size: 1.2em;
  font-weight: bold;
  color: #FFFFFF;
  margin: 0;
}

.page-news__faq-toggle {
  font-size: 1.8em;
  font-weight: bold;
  color: #26A9E0;
  transition: transform 0.3s ease;
}

.page-news__faq-item.active .page-news__faq-toggle {
  transform: rotate(0deg); /* Explicitly reset if needed, JS handles text */
}

.page-news__faq-answer {
  max-height: 0;
  overflow: hidden;
  padding: 0 25px;
  transition: max-height 0.3s ease, padding 0.3s ease;
  color: #f0f0f0;
}

.page-news__faq-item.active .page-news__faq-answer {
  max-height: 1000px !important; /* Sufficiently large for content */
  padding: 15px 25px 25px;
}

/* Global image reset to ensure no small icons */
.page-news img {
  min-width: 200px;
  min-height: 200px;
  object-fit: cover;
}

/* Responsive Styles */
@media (max-width: 1024px) {
  .page-news__hero-title {
    font-size: 3em;
  }
  .page-news__hero-description {
    font-size: 1.1em;
  }
  .page-news__section-title {
    font-size: 2.2em;
  }
  .page-news__section-subtitle {
    font-size: 1em;
  }
  .page-news__news-card {
    margin-bottom: 20px;
  }
  .page-news__categories-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  }
}

@media (max-width: 768px) {
  .page-news {
    font-size: 16px;
    line-height: 1.6;
  }

  /* Fixed header offset for main content */
  .page-news__hero-section {
    padding-top: var(--header-offset, 120px) !important;
    padding-bottom: 60px;
    min-height: 400px;
  }

  .page-news__hero-title {
    font-size: 2.5em;
  }
  .page-news__hero-description {
    font-size: 1em;
  }
  .page-news__hero-cta-buttons {
    flex-direction: column;
    gap: 15px;
  }
  .page-news__btn-primary, .page-news__btn-secondary {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-news__section-title {
    font-size: 2em;
  }
  .page-news__section-subtitle {
    font-size: 0.9em;
  }

  .page-news__latest-news-section, 
  .page-news__video-section, 
  .page-news__categories-section, 
  .page-news__faq-section {
    padding: 60px 0;
  }
  
  .page-news__container {
    padding-left: 15px;
    padding-right: 15px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .page-news__news-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .page-news__news-card {
    margin-bottom: 15px;
  }
  .page-news__card-image {
    height: 180px;
  }

  .page-news__video-wrapper {
    max-width: 100% !important;
    width: 100% !important;
    padding-bottom: 56.25% !important; /* Ensure aspect ratio */
    box-sizing: border-box !important;
  }
  .page-news__video {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

  .page-news__categories-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }
  .page-news__category-icon {
    width: 60px;
    height: 60px;
  }
  .page-news__category-title {
    font-size: 1.1em;
  }

  .page-news__faq-question {
    padding: 15px 20px;
  }
  .page-news__faq-question-title {
    font-size: 1.1em;
  }
  .page-news__faq-answer {
    padding: 0 20px;
  }
  .page-news__faq-item.active .page-news__faq-answer {
    padding: 15px 20px 20px;
  }

  /* Image responsiveness for content area */
  .page-news img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
    min-width: 200px; /* Still enforce minimum size, but allow scaling down */
    min-height: 200px;
  }
  .page-news__card-image {
    min-width: unset; /* Override general img min-width for specific card images if needed */
    min-height: unset;
  }
  .page-news__category-icon {
    min-width: 60px;
    min-height: 60px;
  }
}

@media (max-width: 480px) {
  .page-news__hero-title {
    font-size: 2em;
  }
  .page-news__hero-description {
    font-size: 0.9em;
  }
  .page-news__section-title {
    font-size: 1.8em;
  }
  .page-news__categories-grid {
    grid-template-columns: 1fr;
  }
  .page-news__category-card {
    padding: 20px;
  }
  .page-news__category-icon {
    width: 50px;
    height: 50px;
  }
  .page-news__card-title {
    font-size: 1.4em;
  }
}