/* style/news.css */

:root {
  --n66-primary-color: #26A9E0;
  --n66-secondary-color: #FFFFFF;
  --n66-login-color: #EA7C07;
  --n66-dark-bg: #0a0a0a; /* From body background */
  --n66-light-text: #ffffff;
  --n66-dark-text: #333333;
}

/* Base styles for the page content */
.page-news {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: var(--n66-light-text); /* Default light text on dark body background */
  background-color: var(--n66-dark-bg); /* Inherit from body for consistency */
}

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

.page-news__dark-bg {
  background-color: var(--n66-dark-bg);
  color: var(--n66-light-text);
}

.page-news__light-bg {
  background-color: var(--n66-secondary-color);
  color: var(--n66-dark-text);
}

.page-news__section-title {
  font-size: 2.5em;
  font-weight: bold;
  text-align: center;
  margin-bottom: 40px;
  color: inherit; /* Inherit color from parent section */
}

.page-news__sub-title {
  font-size: 1.8em;
  font-weight: bold;
  margin-top: 30px;
  margin-bottom: 15px;
  color: inherit;
}

.page-news__description {
  font-size: 1.1em;
  text-align: center;
  margin-bottom: 30px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  color: inherit;
}

.page-news__btn-primary,
.page-news__btn-secondary {
  display: inline-block;
  padding: 12px 25px;
  border-radius: 8px;
  font-weight: bold;
  text-decoration: none;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
  cursor: pointer;
  text-align: center;
  box-sizing: border-box;
  max-width: 100%;
  white-space: normal;
  word-wrap: break-word;
}

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

.page-news__btn-primary:hover {
  background-color: #1f8ec4; /* Darken primary color */
  border-color: #1f8ec4;
}

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

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

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

.page-news__hero-image-wrapper {
  width: 100%;
  position: relative;
  z-index: 0;
}

.page-news__hero-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

.page-news__hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding-top: 40px; /* Space below image */
}

.page-news__main-title {
  font-size: clamp(2.2em, 4vw, 3.5em); /* Responsive H1 font size */
  font-weight: bold;
  margin-bottom: 20px;
  line-height: 1.2;
  color: var(--n66-light-text);
}

.page-news__hero-content .page-news__btn-primary {
  margin-top: 30px;
}

/* Latest News Section */
.page-news__latest-news-section {
  padding: 60px 0;
}

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

.page-news__news-card {
  background-color: var(--n66-secondary-color);
  color: var(--n66-dark-text);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.page-news__news-card-image {
  width: 100%;
  height: 225px; /* Fixed height for consistency */
  object-fit: cover;
  display: block;
}

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

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

.page-news__news-card-title a {
  color: var(--n66-dark-text);
  text-decoration: none;
}

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

.page-news__news-card-meta {
  font-size: 0.9em;
  color: #666;
  margin-bottom: 15px;
}

.page-news__news-card-text {
  font-size: 1em;
  color: #555;
  margin-bottom: 20px;
  flex-grow: 1;
}

.page-news__read-more-link {
  color: var(--n66-primary-color);
  text-decoration: none;
  font-weight: bold;
  align-self: flex-start;
}

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

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

/* Platform Updates & Security Section */
.page-news__platform-updates {
  padding: 60px 0;
}

.page-news__content-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
}

.page-news__text-block p {
  margin-bottom: 20px;
  color: var(--n66-light-text);
}

.page-news__image-block {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.page-news__responsive-image {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
}

/* Tips & Strategies Section */
.page-news__tips-strategies-section {
  padding: 60px 0;
}

.page-news__tips-strategies-section .page-news__text-block p {
  color: var(--n66-dark-text);
}

/* FAQ Section */
.page-news__faq-section {
  padding: 60px 0;
}

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

.page-news__faq-item {
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
  color: var(--n66-light-text);
}

.page-news__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  font-size: 1.2em;
  font-weight: bold;
  cursor: pointer;
  user-select: none;
  background-color: rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

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

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

.page-news__faq-toggle {
  font-size: 1.5em;
  line-height: 1;
  margin-left: 15px;
}

.page-news__faq-answer {
  padding: 15px 25px 20px;
  font-size: 1em;
  color: rgba(255, 255, 255, 0.8);
}

.page-news__faq-item[open] .page-news__faq-question {
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

/* Call to Action Section */
.page-news__cta-section {
  padding: 60px 0;
  text-align: center;
}

.page-news__cta-section .page-news__btn-primary {
  margin-top: 30px;
}

/* Responsive Design */
@media (min-width: 769px) {
  .page-news__hero-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    max-width: 800px;
    padding: 20px;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 10px;
  }
  .page-news__hero-image-wrapper {
    height: 600px;
  }
  .page-news__hero-image {
    height: 100%;
  }
  .page-news__content-grid {
    grid-template-columns: 2fr 1fr; /* Text on left, images on right */
  }
  .page-news__image-block {
    flex-direction: column;
  }
}

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

  .page-news__container {
    padding-left: 15px;
    padding-right: 15px;
  }

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

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

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

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

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

  .page-news__hero-image-wrapper {
    height: auto;
  }

  .page-news__hero-image {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

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

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

  .page-news__news-card-image {
    height: 180px; /* Adjust height for mobile cards */
  }

  .page-news__news-card-title {
    font-size: 1.2em;
  }

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

  .page-news__image-block {
    flex-direction: column;
  }

  .page-news__responsive-image {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

  /* Buttons responsive */
  .page-news__btn-primary,
  .page-news__btn-secondary,
  .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;
    margin-left: auto;
    margin-right: auto;
  }

  .page-news__hero-content .page-news__btn-primary {
    width: auto; /* Allow button to shrink if content is short */
    max-width: 80%; /* But not too wide */
  }

  .page-news__view-all-button-container .page-news__btn-secondary {
    width: auto; /* Allow button to shrink */
    max-width: 80%; /* But not too wide */
  }

  .page-news__cta-section .page-news__btn-primary {
    width: auto; /* Allow button to shrink */
    max-width: 80%; /* But not too wide */
  }

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

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

/* Specific contrast adjustments */
.page-news__hero-content .page-news__description {
  color: rgba(255, 255, 255, 0.9); /* Slightly less bright white for better contrast on image overlay */
}