/* style/news.css */

/* Base styles for page-news content */
.page-news {
  font-family: Arial, sans-serif;
  color: #333333; /* Dark text for light body background */
  line-height: 1.6;
  font-size: 16px;
}

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

.page-news__hero-image-wrapper {
  width: 100%;
  height: auto;
  overflow: hidden;
  margin-bottom: 20px;
}

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

.page-news__hero-content {
  max-width: 900px;
  text-align: center;
  padding: 0 20px;
}

.page-news__hero-title {
  font-size: clamp(2em, 5vw, 3em); /* Responsive H1 font size */
  font-weight: 700;
  line-height: 1.2;
  color: #26A9E0; /* Brand color for H1 */
  margin-bottom: 20px;
}

.page-news__hero-description {
  font-size: 1.1em;
  margin-bottom: 30px;
  color: #555555;
}

/* Video Section */
.page-news__video-section {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 20px;
  background-color: #f0f0f0;
  box-sizing: border-box;
}

.page-news__video-container {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  box-sizing: border-box;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.page-news__video-link {
  display: block;
  cursor: pointer;
  line-height: 0; /* Remove extra space below video */
}

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

.page-news__video-caption {
  text-align: center;
  margin-top: 15px;
  font-size: 0.9em;
  color: #666666;
}

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

.page-news__section-title {
  font-size: 2.2em;
  font-weight: 700;
  color: #26A9E0;
  text-align: center;
  margin-bottom: 40px;
}

.page-news__section-title--light {
  color: #ffffff;
}

.page-news__section-paragraph {
  font-size: 1.05em;
  text-align: center;
  max-width: 800px;
  margin: 0 auto 40px auto;
  color: #555555;
}

.page-news__section-paragraph--light {
  color: #f0f0f0;
}

/* News Grid */
.page-news__news-grid,
.page-news__guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 30px;
}

.page-news__news-card,
.page-news__guide-card {
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-news__news-card:hover,
.page-news__guide-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

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

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

.page-news__card-title {
  font-size: 1.5em;
  font-weight: 600;
  margin-bottom: 15px;
  line-height: 1.3;
}

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

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

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

.page-news__card-link {
  display: inline-block;
  color: #26A9E0;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

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

/* Dark Background Section */
.page-news__dark-bg {
  background-color: #26A9E0;
  color: #ffffff;
}

.page-news__analysis-grid,
.page-news__community-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  margin-top: 30px;
}

.page-news__analysis-item,
.page-news__community-item {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 30px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.page-news__analysis-title,
.page-news__community-title {
  font-size: 1.6em;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 15px;
}

.page-news__analysis-text,
.page-news__community-text {
  font-size: 1em;
  color: #f0f0f0;
}

/* FAQ Section */
.page-news__faq-list {
  max-width: 900px;
  margin: 0 auto;
  margin-top: 30px;
}

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

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

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

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

.page-news__faq-question::marker {
  display: none;
}

.page-news__faq-toggle {
  font-size: 1.5em;
  line-height: 1;
  color: #EA7C07;
  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 25px;
  font-size: 1em;
  color: #555555;
  border-top: 1px solid #f0f0f0;
}

.page-news__faq-answer p {
  margin: 0;
}

/* CTA Section */
.page-news__cta-section {
  text-align: center;
  padding: 80px 20px;
  background-color: #26A9E0;
  color: #ffffff;
}

.page-news__cta-title {
  font-size: 2.5em;
  font-weight: 700;
  margin-bottom: 20px;
  color: #ffffff;
}

.page-news__cta-description {
  font-size: 1.2em;
  max-width: 800px;
  margin: 0 auto 40px auto;
  color: #f0f0f0;
}

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

.page-news__btn-primary,
.page-news__btn-secondary {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 50px;
  font-size: 1.1em;
  font-weight: 700;
  text-decoration: none;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
  box-sizing: border-box;
  max-width: 100%;
  white-space: normal;
  word-wrap: break-word;
}

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

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

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

.page-news__btn-secondary:hover {
  background: #f0f0f0;
  border-color: #f0f0f0;
}

/* Responsive styles */
@media (max-width: 1024px) {
  .page-news__hero-title {
    font-size: clamp(1.8em, 4vw, 2.8em);
  }
  .page-news__section-title {
    font-size: 2em;
  }
  .page-news__news-grid,
  .page-news__guide-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
  .page-news__analysis-grid,
  .page-news__community-grid {
    grid-template-columns: 1fr;
  }
  .page-news__cta-title {
    font-size: 2.2em;
  }
}

@media (max-width: 768px) {
  .page-news {
    font-size: 15px;
  }
  .page-news__hero-section {
    padding: 10px 15px 30px 15px;
  }
  .page-news__hero-title {
    font-size: clamp(1.6em, 6vw, 2.5em);
  }
  .page-news__hero-description {
    font-size: 1em;
  }
  .page-news__video-section {
    padding-top: 10px !important; /* body already has padding-top */
    padding-left: 15px;
    padding-right: 15px;
  }
  .page-news__video-container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }
  .page-news__video-link {
    width: 100% !important;
  }
  .page-news__video {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  .page-news__section {
    padding: 40px 15px;
  }
  .page-news__section-title {
    font-size: 1.8em;
    margin-bottom: 30px;
  }
  .page-news__section-paragraph {
    font-size: 0.95em;
    margin-bottom: 30px;
  }
  .page-news__news-grid,
  .page-news__guide-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .page-news__card-image {
    height: 180px;
  }
  .page-news__card-title {
    font-size: 1.3em;
  }
  .page-news__card-text {
    font-size: 0.9em;
  }
  .page-news__faq-question {
    font-size: 1em;
    padding: 15px 20px;
  }
  .page-news__faq-answer {
    padding: 15px 20px;
    font-size: 0.95em;
  }
  .page-news__cta-section {
    padding: 60px 15px;
  }
  .page-news__cta-title {
    font-size: 1.8em;
  }
  .page-news__cta-description {
    font-size: 1em;
  }
  .page-news__cta-buttons {
    flex-direction: column;
    gap: 15px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 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;
  }

  /* Ensure all images are responsive and do not overflow */
  .page-news img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  .page-news__section,
  .page-news__card,
  .page-news__container,
  .page-news__hero-section,
  .page-news__cta-section {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
}

@media (max-width: 480px) {
  .page-news__hero-title {
    font-size: clamp(1.4em, 7vw, 2.2em);
  }
  .page-news__section-title {
    font-size: 1.6em;
  }
  .page-news__card-title {
    font-size: 1.2em;
  }
  .page-news__card-image {
    height: 150px;
  }
  .page-news__cta-title {
    font-size: 1.6em;
  }
  .page-news__faq-question {
    font-size: 0.95em;
    padding: 12px 15px;
  }
  .page-news__faq-answer {
    padding: 12px 15px;
    font-size: 0.9em;
  }
}