/* style/news.css */

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

/* Base styles for the news page, assuming a dark body background from shared.css */
.page-news {
  background-color: var(--qh87win-bg);
  color: var(--qh87win-text-main);
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
}

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

/* Hero Section */
.page-news__hero-section {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column; /* Image on top, content below */
  align-items: center;
  justify-content: center;
  background-color: var(--qh87win-deep-green);
  padding-bottom: 40px; /* Space below image */
  padding-top: 10px; /* Small top padding, body handles --header-offset */
}

.page-news__hero-image {
  width: 100%;
  max-width: 1920px;
  height: auto;
  display: block;
  object-fit: cover;
  margin-bottom: 20px; /* Space between image and text */
}

.page-news__hero-content {
  text-align: center;
  padding: 0 20px;
  max-width: 900px;
}

.page-news__hero-title {
  color: var(--qh87win-gold);
  margin-bottom: 15px;
  font-weight: bold;
  line-height: 1.2;
  letter-spacing: 0.5px;
  font-size: clamp(2.2rem, 4vw, 3rem); /* Example clamp for h1 */
}

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

/* Section Titles and Descriptions */
.page-news__section-title {
  color: var(--qh87win-text-main);
  text-align: center;
  margin-bottom: 15px;
  font-size: 2.2em;
  font-weight: bold;
}

.page-news__section-description {
  color: var(--qh87win-text-secondary);
  text-align: center;
  margin-bottom: 40px;
  font-size: 1.05em;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

/* 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: all 0.3s ease;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
  text-align: center;
}

.page-news__btn-primary {
  background: var(--qh87win-button-gradient);
  color: var(--qh87win-text-main);
  border: none;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.page-news__btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.page-news__btn-secondary {
  background: transparent;
  color: var(--qh87win-primary);
  border: 2px solid var(--qh87win-primary);
}

.page-news__btn-secondary:hover {
  background: var(--qh87win-primary);
  color: var(--qh87win-text-main);
}

/* Latest News Section */
.page-news__latest-news-section {
  padding: 60px 0;
  background-color: var(--qh87win-bg);
}

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

.page-news__news-card {
  background-color: var(--qh87win-card-bg);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid var(--qh87win-border);
}

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

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

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

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

.page-news__card-title a {
  color: var(--qh87win-text-main);
  text-decoration: none;
  transition: color 0.3s ease;
}

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

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

.page-news__card-excerpt {
  color: var(--qh87win-text-secondary);
  font-size: 1em;
  margin-bottom: 20px;
}

.page-news__card-link {
  color: var(--qh87win-primary);
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease;
}

.page-news__card-link:hover {
  color: var(--qh87win-gold);
}

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

/* Categories Section */
.page-news__categories-section {
  padding: 60px 0;
  background-color: var(--qh87win-deep-green);
}

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

.page-news__category-card {
  background-color: var(--qh87win-card-bg);
  border-radius: 8px;
  padding: 25px;
  text-align: center;
  text-decoration: none;
  color: var(--qh87win-text-main);
  transition: transform 0.3s ease, background-color 0.3s ease;
  border: 1px solid var(--qh87win-border);
}

.page-news__category-card:hover {
  transform: translateY(-5px);
  background-color: var(--qh87win-primary);
  color: var(--qh87win-text-main);
}

.page-news__category-title {
  font-size: 1.2em;
  margin-bottom: 8px;
  color: inherit; /* Inherits from parent a tag */
}

.page-news__category-count {
  font-size: 0.9em;
  color: var(--qh87win-text-secondary);
}

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

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

.page-news__featured-card {
  background-color: var(--qh87win-card-bg);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid var(--qh87win-border);
}

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

/* FAQ Section */
.page-news__faq-section {
  padding: 60px 0;
  background-color: var(--qh87win-deep-green);
}

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

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

.page-news__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  font-size: 1.15em;
  font-weight: bold;
  color: var(--qh87win-text-main);
  cursor: pointer;
  background-color: var(--qh87win-card-bg);
  transition: background-color 0.3s ease;
}

.page-news__faq-question:hover {
  background-color: rgba(var(--qh87win-primary), 0.1); /* Slight hover effect */
}

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

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

/* For details tag, hide default marker */
.page-news__faq-item summary {
  list-style: none;
}
.page-news__faq-item summary::-webkit-details-marker {
  display: none;
}

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

/* Responsive styles */
@media (max-width: 1024px) {
  .page-news__hero-title {
    font-size: clamp(2rem, 5vw, 2.8rem);
  }
}

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

  .page-news__hero-section {
    padding-bottom: 30px;
    padding-top: 10px !important; /* Body handles header offset */
  }

  .page-news__hero-content {
    padding: 0 15px;
  }

  .page-news__hero-title {
    font-size: clamp(1.8rem, 6vw, 2.5rem);
  }

  .page-news__hero-description {
    font-size: 1em;
  }

  .page-news__section-title {
    font-size: 1.8em;
  }

  .page-news__section-description {
    font-size: 0.95em;
  }

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

  .page-news__latest-news-section,
  .page-news__categories-section,
  .page-news__featured-articles-section,
  .page-news__faq-section {
    padding: 40px 0;
  }

  /* Images responsive */
  .page-news img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }

  /* All containers with images/videos/buttons */
  .page-news__section,
  .page-news__card,
  .page-news__container,
  .page-news__hero-section,
  .page-news__latest-news-section,
  .page-news__categories-section,
  .page-news__featured-articles-section,
  .page-news__faq-section,
  .page-news__view-all-button-container,
  .page-news__news-grid,
  .page-news__category-grid,
  .page-news__featured-grid,
  .page-news__faq-list {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    overflow-x: hidden !important; /* Prevent horizontal scroll */
  }

  /* Videos responsive (if any, though none on this page) */
  .page-news video,
  .page-news__video {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }

  .page-news__video-section,
  .page-news__video-container,
  .page-news__video-wrapper {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    overflow: hidden !important;
  }

  /* Buttons responsive */
  .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; /* Ensure full width on mobile */
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    padding-left: 15px; /* Adjust padding for full width */
    padding-right: 15px;
    margin-bottom: 10px; /* Space between stacked buttons */
  }

  .page-news__hero-content .page-news__btn-primary {
    margin-left: auto;
    margin-right: auto;
    display: block !important; /* Make primary button block level */
  }

  .page-news__view-all-button-container .page-news__btn-secondary {
    margin-left: auto;
    margin-right: auto;
    display: block !important; /* Make secondary button block level */
  }

  /* If multiple buttons were in a flex row, ensure they wrap or stack */
  .page-news__button-group {
    display: flex;
    flex-direction: column !important; /* Stack buttons vertically */
    gap: 10px;
  }
}

/* No CSS filter for images */
.page-news img {
  filter: none;
}