/* style/news.css */

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

/* Base styles for the page */
.page-news {
  background-color: var(--cb88-background); /* Dark background */
  color: var(--cb88-text-main); /* Light text for dark background */
  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;
}

.page-news__section {
  padding: 60px 0;
  text-align: center;
}

.page-news__section-title {
  font-size: clamp(2em, 4vw, 2.8em);
  color: var(--cb88-text-main);
  margin-bottom: 20px;
  font-weight: 700;
  line-height: 1.2;
}

.page-news__section-description {
  font-size: 1.1em;
  color: var(--cb88-text-secondary);
  max-width: 800px;
  margin: 0 auto 40px auto;
}

/* Hero Section */
.page-news__hero-section {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 10px 0 60px 0; /* body handles padding-top, this is minimal top padding */
}

.page-news__hero-image {
  width: 100%;
  height: 600px;
  object-fit: cover;
  display: block;
  position: relative;
  z-index: 1;
}

.page-news__hero-content {
  position: relative;
  z-index: 2;
  max-width: 900px;
  margin-top: -150px; /* Adjust to pull content up without overlaying text on image directly */
  padding: 40px;
  background: rgba(8, 22, 15, 0.9); /* Semi-transparent dark background for readability */
  border-radius: 10px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
  text-align: center;
  box-sizing: border-box;
}

.page-news__main-title {
  font-size: clamp(2.5em, 5vw, 3.5em);
  color: var(--cb88-text-main);
  margin-bottom: 20px;
  font-weight: 800;
  line-height: 1.1;
  text-shadow: 0 0 15px rgba(87, 227, 141, 0.5);
}

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

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

/* Buttons */
.page-news__btn-primary,
.page-news__btn-secondary {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.1em;
  transition: all 0.3s ease;
  box-sizing: border-box;
  max-width: 100%; /* For mobile responsiveness */
  white-space: normal; /* Allow text wrapping */
  word-wrap: break-word;
}

.page-news__btn-primary {
  background: var(--cb88-button-gradient);
  color: var(--cb88-text-main);
  border: 2px solid transparent;
  box-shadow: 0 5px 15px rgba(17, 168, 78, 0.4);
}

.page-news__btn-primary:hover {
  background: linear-gradient(180deg, #13994A 0%, #2AD16F 100%);
  box-shadow: 0 8px 20px rgba(17, 168, 78, 0.6);
  transform: translateY(-2px);
}

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

.page-news__btn-secondary:hover {
  background: var(--cb88-secondary-color);
  color: var(--cb88-background);
  transform: translateY(-2px);
}

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

.page-news__news-card {
  background: var(--cb88-card-bg);
  border-radius: 10px;
  overflow: hidden;
  text-align: left;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid var(--cb88-border);
}

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

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

.page-news__news-card-content {
  padding: 25px;
}

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

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

.page-news__news-card-title a:hover {
  color: var(--cb88-glow);
}

.page-news__news-card-date {
  font-size: 0.9em;
  color: var(--cb88-text-secondary);
  margin-bottom: 15px;
  display: block;
}

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

.page-news__news-card-link {
  color: var(--cb88-secondary-color);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
  display: inline-block;
  position: relative;
}

.page-news__news-card-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 100%;
  height: 2px;
  background-color: var(--cb88-secondary-color);
  transform: scaleX(0);
  transform-origin: bottom right;
  transition: transform 0.3s ease;
}

.page-news__news-card-link:hover::after {
  transform: scaleX(1);
  transform-origin: bottom left;
}

.page-news__view-all-button-container {
  margin-top: 50px;
}

/* FAQ Section */
.page-news__faq-list {
  max-width: 900px;
  margin: 40px auto 0 auto;
  text-align: left;
}

.page-news__faq-item {
  background: var(--cb88-card-bg);
  border: 1px solid var(--cb88-border);
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
  transition: all 0.3s ease;
}

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

.page-news__faq-item summary::-webkit-details-marker {
  display: none;
}

.page-news__faq-item summary:hover {
  background-color: var(--cb88-deep-green);
}

.page-news__faq-item[open] summary {
  background-color: var(--cb88-deep-green);
}

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

.page-news__faq-toggle {
  font-size: 1.5em;
  line-height: 1;
  margin-left: 20px;
  transition: transform 0.3s ease;
}

.page-news__faq-item[open] .page-news__faq-toggle {
  transform: rotate(45deg);
}

.page-news__faq-answer {
  padding: 0 25px 20px 25px;
  color: var(--cb88-text-secondary);
  font-size: 1em;
  line-height: 1.6;
  opacity: 0.9;
}

.page-news__faq-answer p {
  margin: 0;
}

/* Final CTA Section */
.page-news__cta-final-section {
  background: var(--cb88-deep-green);
  padding: 80px 0;
}

.page-news__cta-final-content {
  max-width: 900px;
}

.page-news__cta-final-content .page-news__section-title {
  color: var(--cb88-text-main);
  margin-bottom: 25px;
}

.page-news__cta-final-content .page-news__section-description {
  color: var(--cb88-text-secondary);
  margin-bottom: 40px;
}

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

/* Responsive Design */
@media (max-width: 1024px) {
  .page-news__hero-image {
    height: 500px;
  }
  .page-news__hero-content {
    margin-top: -120px;
    padding: 30px;
  }
  .page-news__main-title {
    font-size: clamp(2em, 4.5vw, 3em);
  }
  .page-news__section-title {
    font-size: clamp(1.8em, 3.5vw, 2.5em);
  }
}

@media (max-width: 768px) {
  .page-news__hero-section {
    padding: 10px 0 40px 0;
  }
  .page-news__hero-image {
    height: 400px;
  }
  .page-news__hero-content {
    margin-top: -80px;
    padding: 20px;
    width: 100%; /* Ensure content respects mobile width */
    border-radius: 0;
  }
  .page-news__main-title {
    font-size: clamp(1.8em, 6vw, 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; /* Mobile buttons full width */
    max-width: 100% !important;
    padding: 12px 20px;
    font-size: 1em;
  }

  .page-news__container {
    padding: 0 15px;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }
  .page-news__section {
    padding: 40px 0;
  }
  .page-news__section-description {
    margin-bottom: 30px;
  }
  .page-news__news-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .page-news__news-card-image {
    height: 180px;
  }
  .page-news__news-card-content {
    padding: 20px;
  }
  .page-news__news-card-title {
    font-size: 1.2em;
  }
  .page-news__faq-item summary {
    padding: 15px 20px;
    font-size: 1em;
  }
  .page-news__faq-answer {
    padding: 0 20px 15px 20px;
  }
  .page-news__cta-final-section {
    padding: 60px 0;
  }

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

  /* Ensure all containers holding images are responsive */
  .page-news__section,
  .page-news__card,
  .page-news__container,
  .page-news__hero-content,
  .page-news__hero-cta-buttons,
  .page-news__cta-final-content,
  .page-news__cta-buttons {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    /* Add padding for content inside containers to prevent edge-to-edge content */
    padding-left: 15px;
    padding-right: 15px;
    overflow: hidden !important;
  }

  /* Specific overrides for sections that already have padding */
  .page-news__hero-section,
  .page-news__section {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
  .page-news__hero-content,
  .page-news__cta-final-content {
    padding-left: 20px !important;
    padding-right: 20px !important;
  }

  /* Video section top padding for mobile */
  .page-news__video-section {
    padding-top: 10px !important;
  }
}

@media (max-width: 480px) {
  .page-news__hero-image {
    height: 300px;
  }
  .page-news__hero-content {
    margin-top: -60px;
  }
  .page-news__main-title {
    font-size: clamp(1.5em, 7vw, 2em);
  }
  .page-news__hero-description {
    font-size: 0.9em;
  }
  .page-news__btn-primary,
  .page-news__btn-secondary {
    font-size: 0.95em;
  }
}