/* style/news.css */
.page-news {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: #333333; /* Default text color for light background */
}

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

/* Hero Section */
.page-news__hero-section {
  position: relative;
  padding: 80px 0 40px;
  padding-top: var(--header-offset, 120px);
  background-color: #26A9E0;
  color: #ffffff;
  text-align: center;
  overflow: hidden;
}

.page-news__main-title {
  font-size: 3.2em;
  margin-bottom: 20px;
  font-weight: bold;
  color: #ffffff;
}

.page-news__description {
  font-size: 1.2em;
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  color: #f0f0f0;
}

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

.page-news__hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.7);
}

/* Buttons */
.page-news__cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 30px;
  flex-wrap: wrap;
}

.page-news__btn-primary,
.page-news__btn-secondary {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  transition: all 0.3s ease;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-news__btn-primary {
  background-color: #EA7C07; /* Custom color for Login/Register */
  color: #ffffff;
  border: 2px solid #EA7C07;
}

.page-news__btn-primary:hover {
  background-color: #d16b00;
  border-color: #d16b00;
}

.page-news__btn-secondary {
  background-color: #ffffff;
  color: #26A9E0;
  border: 2px solid #26A9E0;
}

.page-news__btn-secondary:hover {
  background-color: #26A9E0;
  color: #ffffff;
}

/* Section Titles and Descriptions */
.page-news__section-title {
  font-size: 2.5em;
  color: #26A9E0;
  text-align: center;
  margin-bottom: 20px;
  font-weight: bold;
}

.page-news__section-description {
  font-size: 1.1em;
  text-align: center;
  max-width: 900px;
  margin: 0 auto 50px;
  color: #555555;
}

/* Featured News Section */
.page-news__featured-news {
  padding: 60px 0;
  background-color: #f8f8f8;
}

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

.page-news__news-card {
  background-color: #ffffff;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.page-news__news-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

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

.page-news__card-title {
  font-size: 1.4em;
  font-weight: bold;
  margin: 20px 20px 10px;
  color: #26A9E0;
}

.page-news__card-title a {
  color: #26A9E0;
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-news__card-title a:hover {
  color: #1a7fb3;
}

.page-news__card-text {
  font-size: 0.95em;
  color: #555555;
  margin: 0 20px 20px;
  flex-grow: 1;
}

.page-news__card-link {
  display: inline-block;
  margin: 0 20px 20px;
  color: #EA7C07;
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease;
}

.page-news__card-link:hover {
  color: #d16b00;
}

/* Analysis Section */
.page-news__analysis-section {
  padding: 60px 0;
  background-color: #26A9E0;
  color: #ffffff;
}

.page-news__analysis-section .page-news__section-title,
.page-news__analysis-section .page-news__section-description {
  color: #ffffff;
}

.page-news__analysis-content {
  display: flex;
  gap: 40px;
  align-items: flex-start;
}

.page-news__analysis-text {
  flex: 2;
}

.page-news__analysis-image {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: center;
}

.page-news__analysis-subtitle {
  font-size: 1.8em;
  color: #ffffff;
  margin-top: 30px;
  margin-bottom: 15px;
  font-weight: bold;
}

.page-news__analysis-text p {
  margin-bottom: 20px;
  color: #f0f0f0;
}

.page-news__image-full {
  width: 100%;
  height: auto;
  border-radius: 12px;
  object-fit: cover;
}

.page-news__btn-full-width {
  width: 100%;
  text-align: center;
}

/* Community Section */
.page-news__community-section {
  padding: 60px 0;
  background-color: #f8f8f8;
}

.page-news__community-content {
  display: flex;
  gap: 40px;
  align-items: flex-start;
}

.page-news__community-text {
  flex: 2;
}

.page-news__community-image {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

.page-news__community-subtitle {
  font-size: 1.8em;
  color: #26A9E0;
  margin-top: 30px;
  margin-bottom: 15px;
  font-weight: bold;
}

.page-news__community-text p {
  margin-bottom: 20px;
  color: #555555;
}

/* Video Section */
.page-news__video-section {
  padding: 60px 0;
  background-color: #000000;
  color: #ffffff;
  text-align: center;
}

.page-news__video-wrapper {
  position: relative;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
}

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

.page-news__video-overlay-link {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10;
  cursor: pointer;
}

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

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

.page-news__faq-item {
  background-color: #f8f8f8;
  border-radius: 8px;
  margin-bottom: 15px;
  border: 1px solid #e0e0e0;
  overflow: hidden;
}

.page-news__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  font-size: 1.15em;
  font-weight: bold;
  color: #333333;
  cursor: pointer;
  background-color: #f0f0f0;
  border-bottom: 1px solid #e0e0e0;
}

.page-news__faq-item[open] .page-news__faq-question {
  background-color: #e6e6e6;
  border-bottom: none;
}

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

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

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

.page-news__faq-answer {
  padding: 20px;
  font-size: 1em;
  color: #555555;
  background-color: #ffffff;
}

/* Remove default details marker */
.page-news__faq-item summary {
  list-style: none;
}

.page-news__faq-item summary::-webkit-details-marker {
  display: none;
}

/* CTA Bottom Section */
.page-news__cta-bottom {
  padding: 60px 0;
  background-color: #26A9E0;
  color: #ffffff;
  text-align: center;
}

.page-news__cta-bottom .page-news__section-title,
.page-news__cta-bottom .page-news__section-description {
  color: #ffffff;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-news__main-title {
    font-size: 2.8em;
  }

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

  .page-news__analysis-content,
  .page-news__community-content {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .page-news__analysis-image,
  .page-news__community-image {
    width: 80%;
    margin-top: 30px;
  }

  .page-news__btn-full-width {
    max-width: 80%;
  }
}

@media (max-width: 768px) {
  .page-news__hero-section {
    padding: 60px 0 30px;
    padding-top: var(--header-offset, 120px) !important; /* Ensure mobile header offset */
  }

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

  .page-news__description {
    font-size: 1em;
    padding: 0 15px;
  }

  .page-news__section-title {
    font-size: 1.8em;
    padding: 0 15px;
  }

  .page-news__section-description {
    font-size: 0.95em;
    padding: 0 15px;
    margin-bottom: 30px;
  }

  .page-news__cta-buttons {
    flex-direction: column;
    gap: 15px;
    padding: 0 15px;
  }

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

  .page-news__news-grid {
    grid-template-columns: 1fr;
    padding: 0 15px;
  }

  .page-news__news-card {
    margin-bottom: 20px;
  }

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

  .page-news__card-text {
    font-size: 0.9em;
  }

  .page-news__analysis-section,
  .page-news__community-section,
  .page-news__video-section,
  .page-news__faq-section,
  .page-news__cta-bottom {
    padding: 40px 0;
  }

  .page-news__container {
    padding: 0 15px;
  }

  .page-news__analysis-image,
  .page-news__community-image {
    width: 100%;
    padding: 0 15px;
    box-sizing: border-box !important;
  }

  .page-news__image-full {
    max-width: 100% !important;
    height: auto !important;
    display: block !important;
  }

  .page-news__video-wrapper {
    padding: 0 15px;
    box-sizing: border-box !important;
    max-width: 100% !important;
    width: 100% !important;
    overflow: hidden !important;
  }

  .page-news__video {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }

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

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

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

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

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

  .page-news__btn-primary,
  .page-news__btn-secondary {
    font-size: 0.9em;
    padding: 10px 15px;
  }
}

/* Ensure all images in content area are responsive and not smaller than 200px */
.page-news img {
  max-width: 100%;
  height: auto;
  display: block;
  min-width: 200px; /* Minimum width for content images */
  min-height: 200px; /* Minimum height for content images */
}

.page-news__news-card .page-news__card-image {
  min-width: 200px;
  min-height: 200px;
  height: 200px; /* Override to maintain aspect ratio for cards if needed */
}

.page-news__image-full {
  min-width: 200px;
  min-height: 200px;
}

/* Global image rules for mobile */
@media (max-width: 768px) {
  .page-news img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    min-width: unset !important; /* Remove min-width on mobile to allow shrinking */
    min-height: unset !important; /* Remove min-height on mobile to allow shrinking */
  }

  .page-news__section,
  .page-news__card,
  .page-news__container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-news__video-section {
    padding-top: var(--header-offset, 120px) !important; /* With shared.css, this ensures proper spacing */
  }

  .page-news__video-wrapper {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }
}