/* style/news.css */

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

/* Base styles for the page content, ensuring contrast with dark body background */
.page-news {
  background-color: var(--gh88-background); /* Explicitly set page background for consistency */
  color: var(--gh88-text-main);
  font-family: Arial, sans-serif;
  line-height: 1.6;
}

/* Hero Section */
.page-news__hero-section {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 60px 20px; /* General padding */
  padding-top: 10px; /* Small top padding, body handles header offset */
  background-color: var(--gh88-deep-green); /* Example background, can be adjusted */
  overflow: hidden; /* Ensure no overflow from hero image */
}

.page-news__hero-image {
  width: 100%;
  max-width: 1200px; /* Max width for the image */
  height: auto;
  display: block;
  object-fit: cover;
  border-radius: 10px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
  margin-bottom: 30px; /* Space between image and content */
}

.page-news__hero-content {
  text-align: center;
  max-width: 900px;
  margin: 0 auto;
  padding: 20px;
  z-index: 1; /* Ensure content is above any potential background layers */
}

.page-news__main-title {
  font-size: clamp(2em, 4vw, 3.2em); /* Responsive font size for H1 */
  font-weight: 700;
  color: var(--gh88-text-main);
  margin-bottom: 15px;
  line-height: 1.2;
}

.page-news__description {
  font-size: 1.1em;
  color: var(--gh88-text-secondary);
  margin-bottom: 30px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

/* Call to Action Button */
.page-news__cta-button,
.page-news__read-more {
  display: inline-block;
  padding: 12px 25px;
  background: var(--gh88-button-gradient);
  color: #ffffff; /* White text for buttons */
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.page-news__cta-button:hover,
.page-news__read-more:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* General Container */
.page-news__container {
  width: 100%; /* Ensure width 100% for flex/grid to work correctly */
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
}

/* Section Titles */
.page-news__section-title {
  font-size: 2.5em;
  color: var(--gh88-text-main);
  text-align: center;
  margin-bottom: 40px;
  font-weight: 700;
  position: relative;
  padding-bottom: 10px;
}

.page-news__section-title::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background-color: var(--gh88-primary);
  border-radius: 2px;
}

/* Latest News Section */
.page-news__latest-news {
  padding: 80px 0;
  background-color: var(--gh88-background);
}

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

.page-news__news-card {
  background-color: var(--gh88-card-bg);
  border: 1px solid var(--gh88-border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

.page-news__news-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
}

.page-news__card-image {
  width: 100%;
  height: 225px; /* Fixed height for consistent card image size */
  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.4em;
  font-weight: 600;
  margin-bottom: 10px;
  line-height: 1.3;
}

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

.page-news__card-title a:hover {
  color: var(--gh88-primary);
}

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

.page-news__card-excerpt {
  font-size: 1em;
  color: var(--gh88-text-secondary);
  margin-bottom: 20px;
  flex-grow: 1; /* Allow excerpt to take available space */
}

.page-news__read-more {
  align-self: flex-start; /* Align button to the start */
  font-size: 0.9em;
  padding: 8px 18px;
}

.page-news__view-all {
  text-align: center;
}

/* CTA Banner Section */
.page-news__cta-banner {
  padding: 80px 20px;
  text-align: center;
  background: var(--gh88-deep-green);
  box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.5);
}

.page-news__cta-content {
  max-width: 800px;
  margin: 0 auto;
}

.page-news__cta-banner .page-news__section-title {
  color: var(--gh88-text-main);
  margin-bottom: 20px;
}

.page-news__cta-banner .page-news__section-title::after {
  background-color: var(--gh88-gold);
}

.page-news__cta-banner .page-news__description {
  color: var(--gh88-text-secondary);
  margin-bottom: 40px;
}

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

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

.page-news__faq-item {
  background-color: var(--gh88-card-bg);
  border: 1px solid var(--gh88-border);
  border-radius: 10px;
  margin-bottom: 15px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

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

.page-news__faq-item summary::-webkit-details-marker {
  display: none; /* Hide default marker for webkit */
}

.page-news__faq-item summary:hover {
  background-color: rgba(255, 255, 255, 0.05);
}

.page-news__faq-toggle {
  font-size: 1.5em;
  line-height: 1;
  color: var(--gh88-primary);
  transition: transform 0.3s ease;
}

.page-news__faq-item[open] .page-news__faq-toggle {
  transform: rotate(45deg); /* Rotate '+' to 'x' or just to '-' */
}

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

/* Responsive Styles */
@media (max-width: 1024px) {
  .page-news__hero-section {
    padding: 40px 15px;
  }

  .page-news__hero-image {
    max-width: 90%;
  }

  .page-news__main-title {
    font-size: clamp(1.8em, 5vw, 2.8em);
  }

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

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

  .page-news__card-title {
    font-size: 1.2em;
  }
}

@media (max-width: 768px) {
  /* Mobile general padding */
  .page-news__container,
  .page-news__hero-section,
  .page-news__latest-news,
  .page-news__cta-banner,
  .page-news__faq-section {
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-news__hero-section {
    padding-top: 10px !important; /* Ensure small top padding, body handles header offset */
    padding-bottom: 40px;
  }

  .page-news__hero-image {
    max-width: 100% !important;
    height: auto !important;
    margin-bottom: 20px;
  }

  .page-news__main-title {
    font-size: clamp(1.5em, 6vw, 2.5em);
  }

  .page-news__description {
    font-size: 1em;
    margin-bottom: 20px;
  }

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

  .page-news__news-grid {
    grid-template-columns: 1fr; /* Single column for mobile */
    gap: 20px;
  }

  .page-news__card-image {
    max-width: 100% !important;
    height: auto !important; /* Ensure images are responsive */
  }

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

  .page-news__card-title {
    font-size: 1.1em;
  }

  .page-news__card-meta,
  .page-news__card-excerpt {
    font-size: 0.9em;
  }

  /* Images responsive */
  .page-news img {
    max-width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  
  /* Image containers responsive */
  .page-news__section,
  .page-news__card,
  .page-news__container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  /* Video responsive - not used in this page, but good to have */
  .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;
  }
  .page-news__video-section {
    padding-top: 10px !important;
  }
  .page-news__video-wrapper {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  /* Buttons responsive */
  .page-news__cta-button,
  .page-news__read-more,
  .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; /* Add padding for text inside button */
    padding-right: 15px; /* Add padding for text inside button */
  }
  
  .page-news__cta-buttons,
  .page-news__button-group,
  .page-news__btn-container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    flex-wrap: wrap !important;
    gap: 10px;
    display: flex; /* Ensure flex behavior for button groups */
    flex-direction: column; /* Stack buttons vertically on mobile */
  }

  .page-news__faq-item summary {
    font-size: 1em;
    padding: 15px 20px;
  }
  .page-news__faq-answer {
    padding: 0 20px 15px;
  }
}