/* style/news.css */
/* Base styles and color variables */
.page-news {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-main-color); /* Default text color for the page */
  background-color: var(--background-color); /* From shared, assumed dark */
}

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

/* Ensure body padding-top is handled by shared.css, this page does not add it */
/* First section padding-top should be small, not var(--header-offset) */
.page-news__hero-section {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 20px;
  padding-top: 10px; /* Small top padding for the first section as per rule */
  text-align: center;
  overflow: hidden;
}

.page-news__hero-image-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  overflow: hidden;
}

.page-news__hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: none; /* Explicitly disallow any filter */
}

.page-news__hero-content {
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin: 0 auto;
  padding: 40px;
  background: rgba(0, 0, 0, 0.6); /* Semi-transparent dark background for text readability */
  border-radius: 10px;
}

.page-news__main-title {
  color: var(--text-main-color);
  font-size: clamp(2em, 4vw, 3.2em); /* Using clamp for H1 font size */
  font-weight: bold;
  margin-bottom: 20px;
  line-height: 1.2;
  letter-spacing: 0.05em;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

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

.page-news__cta-button {
  display: inline-block;
  background: var(--button-gradient);
  color: var(--text-main-color);
  padding: 15px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.1em;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  max-width: 100%; /* Ensure button responsiveness */
  box-sizing: border-box; /* Ensure padding/border included in width */
  white-space: normal; /* Allow text to wrap */
  word-wrap: break-word; /* Break long words */
}

.page-news__cta-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4);
  opacity: 0.9;
}

.page-news__cta-button--secondary {
  background: transparent;
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
  box-shadow: none;
}

.page-news__cta-button--secondary:hover {
  background: var(--primary-color);
  color: var(--text-main-color);
  transform: translateY(-3px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.page-news__cta-button--small {
  padding: 10px 20px;
  font-size: 1em;
}

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

.page-news__section-title {
  color: var(--gold-color);
  font-size: 2.5em;
  text-align: center;
  margin-bottom: 40px;
  position: relative;
  padding-bottom: 15px;
  text-shadow: 1px 1px 3px rgba(0,0,0,0.3);
}

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

.page-news__section-description,
.page-news__text-block {
  color: var(--text-secondary-color);
  text-align: center;
  font-size: 1.1em;
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

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

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

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

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

.page-news__article-image {
  width: 100%;
  height: 220px; /* Fixed height for consistency */
  object-fit: cover;
  display: block;
  filter: none; /* Explicitly disallow any filter */
  min-width: 200px; /* Enforce minimum image size */
  min-height: 200px;
}

.page-news__article-content {
  padding: 25px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

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

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

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

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

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

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

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

.page-news__cta-wrapper {
  text-align: center;
}

/* Why Important Section */
.page-news__why-important-section {
  background-color: var(--deep-green-color);
  padding: 60px 0;
}

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

.page-news__content-item {
  background-color: var(--card-bg-color);
  border-radius: 10px;
  padding: 30px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  text-align: center;
  display: flex;
  flex-direction: column;
}

.page-news__content-image {
  width: 100%;
  height: 250px; /* Consistent image height */
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 20px;
  display: block;
  filter: none; /* Explicitly disallow any filter */
  min-width: 200px; /* Enforce minimum image size */
  min-height: 200px;
}

.page-news__sub-title {
  color: var(--text-main-color);
  font-size: 1.6em;
  margin-bottom: 15px;
  line-height: 1.3;
}

/* How to Follow Section */
.page-news__how-to-follow-section {
  background-color: var(--background-color);
  padding: 60px 0;
}

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

.page-news__follow-item {
  background-color: var(--card-bg-color);
  border-radius: 10px;
  padding: 30px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  text-align: center;
  display: flex;
  flex-direction: column;
}

.page-news__follow-icon {
  width: 100%;
  height: 180px; /* Consistent image height */
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 20px;
  display: block;
  filter: none; /* Explicitly disallow any filter */
  min-width: 200px; /* Enforce minimum image size */
  min-height: 200px;
}

/* Popular Topics Section */
.page-news__popular-topics-section {
  background-color: var(--deep-green-color);
  padding: 60px 0;
}

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

.page-news__topic-card {
  background-color: var(--card-bg-color);
  border-radius: 10px;
  padding: 30px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
}

.page-news__topic-title {
  color: var(--text-main-color);
  font-size: 1.5em;
  margin-bottom: 15px;
  line-height: 1.3;
}

.page-news__topic-description {
  color: var(--text-secondary-color);
  font-size: 1em;
  margin-bottom: 20px;
  flex-grow: 1;
}

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

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

.page-news__faq-item {
  background-color: var(--card-bg-color);
  border-radius: 10px;
  margin-bottom: 15px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
  overflow: hidden;
  transition: all 0.3s ease;
}

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

.page-news__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  font-size: 1.2em;
  color: var(--text-main-color);
  cursor: pointer;
  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 Webkit */
}

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

.page-news__faq-qtext {
  flex-grow: 1;
  margin-right: 15px;
}

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

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

.page-news__faq-answer p {
  margin-bottom: 15px;
  color: var(--text-secondary-color); /* Ensure paragraph color in answer */
}

/* Conclusion Section */
.page-news__conclusion-section {
  background-color: var(--deep-green-color);
  padding: 60px 0 80px;
  text-align: center;
}

/* Image specific rules to ensure minimum size and no filter */
.page-news img {
  min-width: 200px;
  min-height: 200px;
  object-fit: cover; /* Ensure images cover their area without distortion */
  filter: none; /* Explicitly disallow any filter */
}

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

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

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

@media (max-width: 768px) {
  .page-news {
    font-size: 16px;
    line-height: 1.6;
  }

  /* Mobile specific image adaptation */
  .page-news img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
    min-width: 200px;
    min-height: 200px;
  }
  
  /* Mobile specific button adaptation */
  .page-news__cta-button,
  .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;
    padding-right: 15px;
  }
  
  /* Button containers */
  .page-news__cta-wrapper,
  .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;
    overflow: hidden !important;
    flex-wrap: wrap !important;
    gap: 10px;
    display: flex;
    flex-direction: column; /* Stack buttons vertically */
  }

  /* Content containers */
  .page-news__container,
  .page-news__section,
  .page-news__card,
  .page-news__latest-articles-section,
  .page-news__why-important-section,
  .page-news__how-to-follow-section,
  .page-news__popular-topics-section,
  .page-news__faq-section,
  .page-news__conclusion-section {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-news__hero-section {
    padding: 40px 15px;
    padding-top: 10px !important;
  }

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

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

  .page-news__description {
    font-size: 1em;
  }

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

  .page-news__section-description,
  .page-news__text-block {
    font-size: 1em;
  }

  .page-news__articles-grid,
  .page-news__content-grid,
  .page-news__follow-grid,
  .page-news__topics-grid {
    grid-template-columns: 1fr;
  }

  .page-news__article-card,
  .page-news__content-item,
  .page-news__follow-item,
  .page-news__topic-card {
    padding: 20px;
  }

  .page-news__article-image,
  .page-news__content-image,
  .page-news__follow-icon {
    height: auto;
    min-height: 200px;
  }

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

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