/* style/news.css */

/* Base styles for the page, adapting to dark body background */
.page-news {
  color: #ffffff; /* Light text for dark body background */
  font-family: Arial, sans-serif;
  line-height: 1.6;
  background-color: transparent; /* Body background is handled by shared.css */
}

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

.page-news__section-title {
  font-size: clamp(2em, 5vw, 2.8em); /* Responsive font size */
  font-weight: bold;
  color: #26A9E0; /* Brand color for titles */
  text-align: center;
  margin-bottom: 30px;
  padding-top: 20px;
}

.page-news__section-description {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 40px auto;
  font-size: 1.1em;
  color: #f0f0f0; /* Slightly off-white for body text */
}

.page-news .highlight {
  color: #26A9E0;
  font-weight: bold;
}

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

.page-news__hero-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  max-height: 500px; /* Limit height for hero image */
}

.page-news__hero-content {
  text-align: center;
  padding: 40px 20px;
  max-width: 900px;
  margin-top: 20px; /* Content below image */
  background: rgba(0, 0, 0, 0.6); /* Semi-transparent dark background for text */
  border-radius: 10px;
}

.page-news__main-title {
  font-size: clamp(2.5em, 6vw, 3.5em); /* Responsive H1 font size */
  color: #ffffff;
  margin-bottom: 15px;
  line-height: 1.2;
  font-weight: 700;
}

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

/* CTA Button */
.page-news__cta-button {
  display: inline-block;
  background: #26A9E0; /* Brand primary color */
  color: #ffffff;
  padding: 15px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.1em;
  transition: background-color 0.3s ease, transform 0.3s ease;
  border: 2px solid transparent;
}

.page-news__cta-button:hover {
  background-color: #1a7bbd; /* Darker shade on hover */
  transform: translateY(-2px);
}

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

.page-news__cta-button--secondary:hover {
  background-color: #f0f0f0;
  color: #1a7bbd;
}

/* Latest News Section */
.page-news__latest-news {
  padding: 60px 0;
  background: rgba(255, 255, 255, 0.05); /* Light translucent background for contrast */
  margin-bottom: 40px;
}

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

.page-news__news-card {
  background: rgba(255, 255, 255, 0.1); /* Slightly lighter background for cards */
  border-radius: 10px;
  overflow: hidden;
  text-decoration: none;
  color: #ffffff;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  height: 100%; /* Ensure cards have equal height in a row */
}

.page-news__news-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

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

.page-news__card-content {
  padding: 20px;
  flex-grow: 1; /* Allow content to fill available space */
  display: flex;
  flex-direction: column;
}

.page-news__card-title {
  font-size: 1.4em;
  font-weight: bold;
  color: #26A9E0; /* Brand color for card titles */
  margin-bottom: 10px;
  line-height: 1.3;
}

.page-news__card-excerpt {
  font-size: 0.95em;
  color: #cccccc;
  margin-bottom: 15px;
  flex-grow: 1; /* Allow excerpt to take up space */
}

.page-news__card-date {
  font-size: 0.85em;
  color: #888888;
  text-align: right;
  margin-top: auto; /* Push date to bottom */
}

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

.page-news__view-all-button {
  display: inline-block;
  background: transparent;
  color: #26A9E0;
  padding: 12px 25px;
  border: 2px solid #26A9E0;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  font-size: 1em;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.page-news__view-all-button:hover {
  background-color: #26A9E0;
  color: #ffffff;
}

/* About PTWIN Section */
.page-news__about-ptwin {
  padding: 60px 0;
  margin-bottom: 40px;
}

.page-news__dark-bg {
  background: #26A9E0; /* Brand color for this section */
  color: #ffffff; /* White text for brand color background */
  padding: 40px;
  border-radius: 15px;
  text-align: center;
}

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

.page-news__dark-bg p {
  color: #f0f0f0;
  margin-bottom: 20px;
  font-size: 1.1em;
}

.page-news__about-image {
  width: 100%;
  max-width: 800px;
  height: auto;
  display: block;
  margin: 30px auto;
  border-radius: 10px;
}

/* FAQ Section */
.page-news__faq-section {
  padding: 60px 0;
  background: rgba(255, 255, 255, 0.05); /* Light translucent background */
}

.page-news__faq-list {
  margin-top: 40px;
}

.page-news__faq-item {
  background: rgba(255, 255, 255, 0.1); /* Card-like background for FAQ items */
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
}

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

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

.page-news__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  font-weight: bold;
  font-size: 1.15em;
  color: #26A9E0; /* Brand color for questions */
  cursor: pointer;
  background: rgba(255, 255, 255, 0.15); /* Slightly lighter background for question */
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.page-news__faq-question:hover {
  background: rgba(255, 255, 255, 0.2);
}

.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: 0 20px 20px 20px;
  color: #f0f0f0;
  font-size: 1em;
  line-height: 1.5;
}

/* --- Responsive Design --- */

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

  .page-news__container,
  .page-news__hero-content,
  .page-news__news-grid,
  .page-news__faq-list {
    padding-left: 15px !important;
    padding-right: 15px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important; /* Prevent horizontal scroll */
  }

  .page-news__hero-section {
    padding: 20px 0;
    padding-top: 10px !important; /* body handles header offset, small top padding */
  }

  .page-news__hero-image {
    max-height: 300px;
  }

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

  .page-news__hero-description {
    font-size: 1em;
  }

  .page-news__cta-button,
  .page-news__view-all-button {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
  }

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

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

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

  .page-news__about-ptwin,
  .page-news__latest-news,
  .page-news__faq-section {
    padding: 40px 0;
  }

  .page-news__dark-bg {
    padding: 30px 20px;
  }

  .page-news__about-image {
    max-width: 100%;
  }

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

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

  /* Ensure all images are responsive and do not overflow */
  .page-news img {
    max-width: 100% !important;
    height: auto !important;
    display: block !important;
  }

  .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: 10px !important; /* body already handles --header-offset */
  }

  /* Video specific mobile styles, though no video in this page */
  .page-news video,
  .page-news__video {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }

  .page-news__video-section,
  .page-news__video-container,
  .page-news__video-wrapper {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    overflow: hidden !important;
  }

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

  /* Button specific mobile styles */
  .page-news__cta-buttons,
  .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;
    flex-wrap: wrap !important;
    gap: 10px;
  }

  .page-news__cta-buttons {
    display: flex;
    flex-direction: column; 
  }
}