/* style/news.css */

/* Variables for consistency */
:root {
  --primary-color: #017439;
  --secondary-color: #FFFFFF;
  --dark-background: #121212; /* Body background from shared.css */
  --light-text-color: #ffffff;
  --dark-text-color: #333333;
  --register-login-color: #C30808;
  --register-login-font-color: #FFFF00;
}

/* Base styles for the news page content */
.page-news {
  color: var(--light-text-color); /* Default text color for dark body background */
  background-color: var(--dark-background);
  padding-top: var(--header-offset, 120px); /* Ensure content is not hidden by fixed header */
}

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

.page-news__section-title {
  font-size: 2.5em;
  color: var(--secondary-color);
  text-align: center;
  margin-bottom: 20px;
  font-weight: bold;
}

.page-news__section-description {
  font-size: 1.1em;
  color: var(--light-text-color);
  text-align: center;
  margin-bottom: 40px;
  line-height: 1.6;
}

/* Hero Section */
.page-news__hero-section {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 600px;
  overflow: hidden;
  text-align: center;
  padding: 80px 20px;
}

.page-news__hero-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
  opacity: 0.4;
}

.page-news__hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  color: var(--secondary-color);
}

.page-news__hero-title {
  font-size: 3.5em;
  margin-bottom: 20px;
  line-height: 1.2;
  font-weight: bold;
}

.page-news__hero-description {
  font-size: 1.3em;
  margin-bottom: 40px;
  line-height: 1.6;
}

/* Buttons */
.page-news__btn-primary,
.page-news__btn-secondary {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 8px;
  font-size: 1.1em;
  font-weight: bold;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
  text-align: center;
  box-sizing: border-box;
}

.page-news__btn-primary {
  background-color: var(--primary-color);
  color: var(--secondary-color);
  border: 2px solid var(--primary-color);
  margin: 0 10px;
}

.page-news__btn-primary:hover {
  background-color: darken(var(--primary-color), 10%);
  border-color: darken(var(--primary-color), 10%);
}

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

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

/* Latest Articles Section */
.page-news__latest-articles {
  padding: 60px 0;
  background-color: var(--dark-background);
}

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

.page-news__article-card {
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease;
  color: var(--light-text-color);
}

.page-news__article-card:hover {
  transform: translateY(-5px);
}

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

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

.page-news__article-title {
  font-size: 1.5em;
  margin-bottom: 10px;
  line-height: 1.4;
  font-weight: bold;
}

.page-news__article-link {
  color: var(--secondary-color);
  text-decoration: none;
}

.page-news__article-link:hover {
  text-decoration: underline;
  color: var(--primary-color);
}

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

.page-news__article-excerpt {
  font-size: 1em;
  line-height: 1.6;
  margin-bottom: 20px;
}

.page-news__read-more {
  display: inline-block;
  color: var(--primary-color);
  text-decoration: none;
  font-weight: bold;
}

.page-news__read-more:hover {
  text-decoration: underline;
}

/* All Articles Section */
.page-news__all-articles-section {
  padding: 60px 0;
  background-color: var(--light-text-color); /* Light background for readability */
  color: var(--dark-text-color); /* Dark text for light background */
}

.page-news__full-article {
  background-color: var(--secondary-color);
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  padding: 30px;
  margin-bottom: 40px;
  line-height: 1.7;
}

.page-news__full-article h3 {
  font-size: 2em;
  color: var(--primary-color);
  margin-bottom: 15px;
  font-weight: bold;
}

.page-news__full-article h4 {
  font-size: 1.5em;
  color: var(--primary-color);
  margin-top: 30px;
  margin-bottom: 10px;
  font-weight: bold;
}

.page-news__full-article p {
  margin-bottom: 15px;
  color: var(--dark-text-color);
}

.page-news__article-main-image {
  width: 100%;
  height: auto;
  border-radius: 8px;
  margin-bottom: 25px;
  object-fit: cover;
}

/* CTA Section */
.page-news__cta-section {
  padding: 80px 20px;
  text-align: center;
  background-color: var(--primary-color);
  color: var(--secondary-color);
  background-image: url('[GALLERY:cta_banner:1200x600:promotion,register,login,cockfighting,banner]');
  background-size: cover;
  background-position: center;
  background-blend-mode: multiply;
}

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

.page-news__cta-title {
  font-size: 2.8em;
  margin-bottom: 20px;
  line-height: 1.2;
  font-weight: bold;
}

.page-news__cta-description {
  font-size: 1.2em;
  margin-bottom: 40px;
  line-height: 1.6;
}

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

/* FAQ Section */
.page-news__faq-section {
  padding: 60px 0;
  background-color: var(--light-text-color);
  color: var(--dark-text-color);
}

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

.page-news__faq-item {
  background-color: var(--secondary-color);
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.page-news__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px;
  font-size: 1.2em;
  font-weight: bold;
  cursor: pointer;
  color: var(--dark-text-color);
  background-color: #f9f9f9;
  border-bottom: 1px solid #e0e0e0;
}

.page-news__faq-question:hover {
  background-color: #f0f0f0;
}

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

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

.page-news__faq-answer {
  max-height: 0;
  overflow: hidden;
  padding: 0 25px;
  transition: max-height 0.3s ease, padding 0.3s ease;
  color: var(--dark-text-color);
}

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

.page-news__faq-answer p {
  margin: 0;
  font-size: 1em;
  line-height: 1.6;
}

/* 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: 2em;
  }

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

@media (max-width: 768px) {
  .page-news {
    font-size: 16px;
    line-height: 1.6;
    padding-top: var(--header-offset, 120px) !important; /* Ensure mobile header offset */
  }

  .page-news__hero-section {
    min-height: 400px;
    padding: 60px 15px;
  }

  .page-news__hero-title {
    font-size: 2.5em;
  }

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

  .page-news__btn-primary,
  .page-news__btn-secondary {
    padding: 12px 20px;
    font-size: 1em;
    margin: 5px 0;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

  .page-news__cta-buttons {
    flex-direction: column;
    gap: 10px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 0 15px;
  }

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

  .page-news__article-card {
    margin: 0 15px;
  }

  .page-news__article-image {
    height: 200px;
  }

  .page-news__full-article {
    padding: 20px;
    margin: 0 15px 30px 15px;
  }

  .page-news__full-article h3 {
    font-size: 1.8em;
  }

  .page-news__full-article h4 {
    font-size: 1.3em;
  }

  .page-news__cta-section {
    padding: 60px 15px;
  }

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

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

  .page-news__faq-section {
    padding: 40px 0;
  }

  .page-news__faq-item {
    margin: 0 15px 15px 15px;
  }

  .page-news__faq-question {
    padding: 15px 20px;
    font-size: 1.1em;
  }

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

  .page-news__faq-item.active .page-news__faq-answer {
    padding: 15px 20px;
  }
  
  /* Mobile image responsiveness */
  .page-news img {
    max-width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  
  .page-news__container,
  .page-news__hero-section,
  .page-news__latest-articles,
  .page-news__all-articles-section,
  .page-news__cta-section,
  .page-news__faq-section,
  .page-news__article-card,
  .page-news__full-article,
  .page-news__faq-item {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important; /* Prevent horizontal scroll */
  }
}

@media (max-width: 480px) {
  .page-news__hero-title {
    font-size: 2em;
  }

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

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