/* style/news.css */

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

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

.page-news a {
  color: var(--k9bet-green-secondary);
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-news a:hover {
  color: var(--k9bet-glow);
  text-decoration: underline;
}

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

/* Hero Section */
.page-news__hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 0;
  padding-top: 10px; /* Small top padding, body handles header offset */
  background-color: var(--k9bet-bg-dark);
  overflow: hidden;
}

.page-news__hero-image-wrapper {
  width: 100%;
  max-height: 500px;
  overflow: hidden;
  position: relative;
  z-index: 0;
}

.page-news__hero-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  filter: brightness(0.7); /* Darken image slightly for text contrast */
}

.page-news__hero-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
  max-width: 800px;
  padding: 20px;
  background: rgba(0, 0, 0, 0.4); /* Semi-transparent background for text */
  border-radius: 8px;
}

.page-news__main-title {
  font-size: clamp(2em, 4vw, 3.5em);
  color: var(--k9bet-text-main);
  margin-bottom: 15px;
  font-weight: bold;
  line-height: 1.2;
}

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

.page-news__hero-button {
  display: inline-block;
  padding: 12px 30px;
  background: var(--k9bet-button-gradient);
  color: var(--k9bet-text-main);
  border-radius: 5px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  border: none;
  cursor: pointer;
}

.page-news__hero-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
  text-decoration: none;
}

/* Section Titles */
.page-news__section-title {
  font-size: 2.5em;
  color: var(--k9bet-gold);
  text-align: center;
  margin-top: 50px;
  margin-bottom: 40px;
  position: relative;
  padding-bottom: 15px;
}

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

/* Articles Grid */
.page-news__articles-section {
  padding: 50px 0;
  background-color: var(--k9bet-bg-dark);
}

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

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

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

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

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

.page-news__article-title {
  font-size: 1.4em;
  color: var(--k9bet-text-main);
  margin-bottom: 10px;
  min-height: 70px;
}

.page-news__article-title a {
  color: var(--k9bet-text-main);
  text-decoration: none;
}

.page-news__article-title a:hover {
  color: var(--k9bet-green-secondary);
  text-decoration: underline;
}

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

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

.page-news__read-more {
  display: inline-block;
  color: var(--k9bet-green-secondary);
  font-weight: bold;
  text-transform: uppercase;
  font-size: 0.9em;
}

.page-news__read-more:hover {
  color: var(--k9bet-glow);
}

/* Pagination */
.page-news__pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 50px;
  gap: 10px;
}

.page-news__pagination-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--k9bet-card-bg);
  color: var(--k9bet-text-main);
  font-weight: bold;
  transition: background-color 0.3s ease, color 0.3s ease;
  border: 1px solid var(--k9bet-border-color);
}

.page-news__pagination-link:hover {
  background-color: var(--k9bet-green-primary);
  color: #fff;
}

.page-news__pagination-link--active {
  background-color: var(--k9bet-green-primary);
  color: #fff;
  border-color: var(--k9bet-green-primary);
}

/* Featured Section */
.page-news__featured-section {
  padding: 50px 0;
  background-color: var(--k9bet-deep-green);
}

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

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

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

.page-news__featured-image {
  width: 100%;
  height: 281px; /* 1000x563 aspect ratio */
  object-fit: cover;
  display: block;
}

.page-news__featured-content {
  padding: 25px;
}

.page-news__featured-title {
  font-size: 1.5em;
  color: var(--k9bet-text-main);
  margin-bottom: 10px;
  min-height: 70px;
}

.page-news__featured-title a {
  color: var(--k9bet-text-main);
  text-decoration: none;
}

.page-news__featured-title a:hover {
  color: var(--k9bet-green-secondary);
  text-decoration: underline;
}

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

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

/* Call to Action Section */
.page-news__cta-section {
  padding: 80px 0;
  text-align: center;
  background-color: var(--k9bet-deep-green);
  border-top: 1px solid var(--k9bet-divider);
  border-bottom: 1px solid var(--k9bet-divider);
}

.page-news__cta-title {
  font-size: 2.8em;
  color: var(--k9bet-gold);
  margin-bottom: 20px;
}

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

.page-news__cta-button {
  display: inline-block;
  padding: 15px 40px;
  background: var(--k9bet-button-gradient);
  color: var(--k9bet-text-main);
  border-radius: 8px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
  border: none;
  cursor: pointer;
}

.page-news__cta-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
  text-decoration: none;
}

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

.page-news__faq-list {
  margin-top: 40px;
}

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

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

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

.page-news__faq-question:hover {
  background-color: rgba(var(--k9bet-green-primary), 0.1);
}

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

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

.page-news__faq-answer {
  padding: 0 25px 20px 25px;
  font-size: 1em;
  color: var(--k9bet-text-secondary);
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out, padding 0.3s ease-out;
}

.page-news__faq-item[open] .page-news__faq-answer {
  max-height: 500px; /* Adjust as needed */
  padding-top: 15px;
}

/* Responsive Styles */
@media (max-width: 1024px) {
  .page-news__hero-content {
    max-width: 90%;
  }

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

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

@media (max-width: 768px) {
  .page-news__hero-section {
    padding: 40px 0;
    padding-top: 10px !important; /* body handles header offset */
  }

  .page-news__hero-content {
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    padding: 20px;
    background: none; /* Remove background overlay on mobile */
  }

  .page-news__hero-image-wrapper {
    order: -1; /* Image appears above text on mobile */
    max-height: 300px;
  }

  .page-news__hero-image {
    filter: brightness(0.8); /* Less darkening for mobile */
  }

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

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

  .page-news__hero-button,
  .page-news__cta-button {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    padding: 15px 20px !important;
    font-size: 0.9em !important;
  }

  .page-news__articles-grid,
  .page-news__featured-grid {
    grid-template-columns: 1fr;
  }

  .page-news__article-card,
  .page-news__featured-item {
    margin-left: 15px;
    margin-right: 15px;
  }

  .page-news__article-title,
  .page-news__featured-title {
    font-size: 1.2em;
    min-height: auto;
  }

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

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

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

  .page-news__pagination {
    flex-wrap: wrap;
    gap: 8px;
  }

  .page-news__pagination-link {
    width: 35px;
    height: 35px;
    font-size: 0.9em;
  }

  /* Image responsiveness for all images */
  .page-news img {
    max-width: 100% !important;
    height: auto !important;
    display: block !important;
  }

  /* Video responsiveness (if any) */
  .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__faq-question {
    font-size: 1em;
    padding: 15px 20px;
  }

  .page-news__faq-answer {
    padding: 0 20px 15px 20px;
  }

  .page-news__container,
  .page-news__articles-section,
  .page-news__featured-section,
  .page-news__cta-section,
  .page-news__faq-section {
    padding-left: 0;
    padding-right: 0;
  }
}

@media (max-width: 480px) {
  .page-news__hero-content {
    padding: 15px;
  }

  .page-news__main-title {
    font-size: clamp(1.2em, 8vw, 2em);
  }

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

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

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

  .page-news__cta-description {
    font-size: 0.9em;
  }
}