/* style/news.css */

/* Base styles for the page content */
.page-news {
  font-family: 'Arial', sans-serif;
  color: #333333; /* Default text color for light body background */
  background-color: #FFFFFF; /* Explicitly set for content area if body default is white */
  line-height: 1.6;
}

/* Section padding */
.page-news__section-padding {
  padding: 60px 0;
}
@media (max-width: 768px) {
  .page-news__section-padding {
    padding: 30px 0;
  }
}

/* Container for content width */
.page-news__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
}
@media (max-width: 768px) {
  .page-news__container {
    padding: 0 15px !important;
    width: 100% !important;
    max-width: 100% !important;
  }
  .page-news__container--center {
    text-align: center;
  }
}

/* Section Titles */
.page-news__section-title {
  font-size: clamp(28px, 4vw, 42px); /* Responsive font size */
  font-weight: 700;
  color: #017439; /* Brand primary color */
  text-align: center;
  margin-bottom: 40px;
  line-height: 1.2;
}
.page-news__section-title--light {
  color: #FFFFFF; /* White text for dark backgrounds */
}
@media (max-width: 768px) {
  .page-news__section-title {
    font-size: clamp(22px, 6vw, 28px);
    margin-bottom: 25px;
  }
}

/* Text blocks */
.page-news__text-block {
  font-size: 16px;
  margin-bottom: 20px;
  text-align: justify;
}
.page-news__text-block--light {
  color: #f0f0f0; /* Lighter text for dark backgrounds */
}
@media (max-width: 768px) {
  .page-news__text-block {
    font-size: 15px;
    margin-bottom: 15px;
    text-align: left; /* Align left on mobile for better readability */
  }
}

/* Buttons */
.page-news__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 25px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: normal; /* Allow text to wrap */
  word-wrap: break-word; /* Ensure word wrapping */
  box-sizing: border-box;
  max-width: 100%; /* Ensure button doesn't overflow */
}

.page-news__btn-primary {
  background-color: #017439; /* Primary brand color */
  color: #FFFFFF;
  border: 2px solid #017439;
}
.page-news__btn-primary:hover {
  background-color: #005a2e;
  border-color: #005a2e;
}
.page-news__btn-primary--yellow-text {
  color: #FFFF00; /* Custom yellow text for dark background */
}

.page-news__btn-secondary {
  background-color: #FFFFFF;
  color: #017439;
  border: 2px solid #017439;
}
.page-news__btn-secondary:hover {
  background-color: #f0f0f0;
  color: #005a2e;
}
.page-news__btn-secondary--light {
  background-color: #FFFFFF;
  color: #017439;
  border-color: #FFFFFF;
}
.page-news__btn-secondary--light:hover {
  background-color: #f0f0f0;
  color: #005a2e;
  border-color: #f0f0f0;
}

.page-news__btn-register {
  background-color: #C30808; /* Custom register button color */
  color: #FFFF00; /* Custom register font color */
  border: 2px solid #C30808;
}
.page-news__btn-register:hover {
  background-color: #9e0606;
  border-color: #9e0606;
}

.page-news__btn-login {
  background-color: #C30808; /* Custom login button color */
  color: #FFFF00; /* Custom login font color */
  border: 2px solid #C30808;
}
.page-news__btn-login:hover {
  background-color: #9e0606;
  border-color: #9e0606;
}

.page-news__btn-download {
  background-color: #017439; /* Default download button color */
  color: #FFFFFF;
  border: 2px solid #017439;
}
.page-news__btn-download:hover {
  background-color: #005a2e;
  border-color: #005a2e;
}

/* Button group */
.page-news__cta-group {
  display: flex;
  flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
  gap: 15px;
  margin-top: 30px;
  justify-content: center;
}
.page-news__cta-group--center {
  justify-content: center;
}

@media (max-width: 768px) {
  .page-news__btn,
  .page-news a[class*="button"],
  .page-news a[class*="btn"] {
    max-width: 100% !important;
    width: 100% !important;
    padding: 10px 15px !important;
    font-size: 15px !important;
  }
  .page-news__cta-group {
    flex-direction: column !important; /* Stack buttons vertically on mobile */
    gap: 10px;
    margin-top: 20px;
    max-width: 100% !important;
    width: 100% !important;
    padding-left: 15px;
    padding-right: 15px;
    box-sizing: border-box !important;
  }
  .page-news__hero-cta,
  .page-news__view-all-cta {
    max-width: 100% !important;
    width: 100% !important;
    padding-left: 15px;
    padding-right: 15px;
    box-sizing: border-box !important;
  }
}

/* Image responsive rules for all images within .page-news */
.page-news img {
  max-width: 100%;
  height: auto;
  display: block;
  object-fit: cover; /* Default object-fit for most images */
}
@media (max-width: 768px) {
  .page-news img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  .page-news__section,
  .page-news__card,
  .page-news__container,
  .page-news__news-grid {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
}


/* HERO Section */
.page-news__hero-section {
  position: relative;
  padding-top: 10px; /* Approx 10px top padding, not var(--header-offset) */
  margin-bottom: 40px;
  background-color: #f5f5f5; /* Light background for hero section */
  display: flex;
  flex-direction: column; /* Image above text */
  align-items: center;
  text-align: center;
}

.page-news__hero-image {
  width: 100%;
  max-height: 500px; /* Limit height of hero image */
  overflow: hidden;
  margin-bottom: 20px;
}
.page-news__hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Maintain aspect ratio and cover container */
}

.page-news__hero-content {
  max-width: 900px;
  padding: 0 20px;
  margin-bottom: 30px;
}

.page-news__hero-title {
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 800;
  color: #017439;
  margin-bottom: 20px;
  line-height: 1.2;
}

.page-news__hero-description {
  font-size: 18px;
  color: #555;
  margin-bottom: 30px;
}

.page-news__hero-cta {
  margin-top: 20px;
}

@media (max-width: 849px) {
  .page-news__hero-image img {
    object-fit: contain !important; /* Ensure image is fully visible, not cropped */
    aspect-ratio: unset !important;
    width: 100% !important;
    height: auto !important;
  }
}
@media (max-width: 768px) {
  .page-news__hero-section {
    padding-top: 10px;
    margin-bottom: 20px;
  }
  .page-news__hero-image {
    max-height: 300px;
    margin-bottom: 15px;
  }
  .page-news__hero-content {
    padding: 0 15px;
    margin-bottom: 20px;
  }
  .page-news__hero-title {
    font-size: clamp(28px, 8vw, 36px);
    margin-bottom: 15px;
  }
  .page-news__hero-description {
    font-size: 16px;
    margin-bottom: 20px;
  }
}

/* Intro Section */
.page-news__intro-section {
  background-color: #FFFFFF;
}

/* Latest News Section */
.page-news__latest-news-section {
  background-color: #f9f9f9; /* Light background */
}

.page-news__news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
}
@media (max-width: 768px) {
  .page-news__news-grid {
    grid-template-columns: 1fr; /* Single column on mobile */
    gap: 20px;
    margin-top: 25px;
  }
}

.page-news__news-card {
  background-color: #FFFFFF;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.page-news__news-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.page-news__news-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.page-news__news-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
}
@media (max-width: 768px) {
  .page-news__news-image {
    height: 180px;
  }
}

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

.page-news__card-title {
  font-size: 20px;
  font-weight: 700;
  color: #017439;
  margin-bottom: 10px;
  line-height: 1.4;
}
@media (max-width: 768px) {
  .page-news__card-title {
    font-size: 18px;
  }
}

.page-news__card-date {
  font-size: 14px;
  color: #888;
  margin-bottom: 10px;
}

.page-news__card-excerpt {
  font-size: 15px;
  color: #555;
  margin-bottom: 15px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.page-news__read-more {
  display: inline-block;
  color: #017439;
  font-weight: 600;
  text-decoration: none;
}
.page-news__read-more:hover {
  text-decoration: underline;
}

.page-news__view-all-cta {
  text-align: center;
  margin-top: 50px;
}
@media (max-width: 768px) {
  .page-news__view-all-cta {
    margin-top: 30px;
  }
}

/* Game Updates Section */
.page-news__game-updates-section {
  background-color: #FFFFFF;
}

/* Promotions Section */
.page-news__promotions-section {
  background-color: #f9f9f9;
}

.page-news__promo-list {
  list-style: none;
  padding: 0;
  margin: 30px 0;
}

.page-news__promo-item {
  background-color: #FFFFFF;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 15px 20px;
  margin-bottom: 10px;
  font-size: 16px;
  color: #333333;
  display: flex;
  align-items: center;
}
.page-news__promo-item::before {
  content: '✅'; /* Checkmark icon */
  margin-right: 10px;
  font-size: 18px;
  line-height: 1;
  flex-shrink: 0;
}
@media (max-width: 768px) {
  .page-news__promo-list {
    margin: 20px 0;
  }
  .page-news__promo-item {
    font-size: 15px;
    padding: 12px 15px;
  }
}

/* Guides Section */
.page-news__guides-section {
  background-color: #FFFFFF;
}

.page-news__guide-content {
  display: flex;
  gap: 30px;
  align-items: flex-start;
  margin-top: 40px;
}
@media (max-width: 768px) {
  .page-news__guide-content {
    flex-direction: column;
    margin-top: 25px;
  }
}

.page-news__guide-image {
  flex: 0 0 500px; /* Fixed width for desktop */
  width: 500px;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}
@media (max-width: 768px) {
  .page-news__guide-image {
    flex: none;
    width: 100%;
    max-width: 100%;
  }
}

.page-news__guide-text {
  flex: 1;
}

.page-news__guide-list {
  list-style: none;
  padding: 0;
  margin: 20px 0;
}

.page-news__guide-item {
  margin-bottom: 10px;
  font-size: 16px;
  color: #333333;
}
.page-news__guide-item a {
  color: #017439;
  text-decoration: none;
}
.page-news__guide-item a:hover {
  text-decoration: underline;
}
.page-news__guide-item::before {
  content: '➡️'; /* Arrow icon */
  margin-right: 10px;
  font-size: 16px;
  line-height: 1;
  flex-shrink: 0;
}
@media (max-width: 768px) {
  .page-news__guide-list {
    margin: 15px 0;
  }
  .page-news__guide-item {
    font-size: 15px;
  }
}

/* Community Section (Dark background) */
.page-news__community-section {
  background-color: #017439; /* Brand primary color */
  color: #FFFFFF; /* White text */
}

/* About Section */
.page-news__about-section {
  background-color: #FFFFFF;
}

/* FAQ Section */
.page-news__faq-section {
  background-color: #f9f9f9;
}

.page-news__faq-list {
  margin-top: 40px;
}
@media (max-width: 768px) {
  .page-news__faq-list {
    margin-top: 25px;
  }
}

details.page-news__faq-item {
  margin-bottom: 15px;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}
details.page-news__faq-item summary.page-news__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  cursor: pointer;
  user-select: none;
  list-style: none; /* Hide default marker */
  transition: background-color 0.3s ease;
}
details.page-news__faq-item summary.page-news__faq-question::-webkit-details-marker {
  display: none; /* Hide default marker for webkit browsers */
}
details.page-news__faq-item summary.page-news__faq-question:hover {
  background: #f5f5f5;
}
.page-news__faq-qtext {
  flex: 1;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.5;
  text-align: left;
  color: #017439; /* Question text color */
}
.page-news__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  color: #666;
  flex-shrink: 0;
  margin-left: 15px;
  width: 28px;
  text-align: center;
}
details.page-news__faq-item .page-news__faq-answer {
  padding: 0 20px 20px;
  background: #fefefe;
  border-radius: 0 0 8px 8px;
}
details.page-news__faq-item .page-news__faq-answer p {
  margin-top: 0;
  font-size: 16px;
  color: #555;
}

@media (max-width: 768px) {
  details.page-news__faq-item summary.page-news__faq-question { padding: 15px; }
  .page-news__faq-qtext { font-size: 16px; }
  .page-news__faq-toggle { font-size: 20px; width: 24px; }
  details.page-news__faq-item .page-news__faq-answer { padding: 0 15px 15px; }
  details.page-news__faq-item .page-news__faq-answer p { font-size: 15px; }
}