/* style/news.css */

/* Variables */
:root {
  --primary-color: #26A9E0;
  --secondary-color: #FFFFFF;
  --dark-background: #0a0a0a; /* Body background from shared.css */
  --light-text: #ffffff;
  --dark-text: #333333;
  --login-color: #EA7C07;
  --black-color: #000000;
}

/* Page-specific styling for .page-news */
.page-news {
  color: var(--light-text); /* Default text color for dark body background */
  background-color: var(--dark-background); /* Ensure consistency if section backgrounds are not full width */
}

/* Hero Section */
.page-news__hero-section {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px 0 60px 0; /* Small top padding, larger bottom padding */
  text-align: center;
  overflow: hidden;
  box-sizing: border-box;
}

.page-news__hero-image-wrapper {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  position: relative;
  margin-bottom: 30px; /* Space between image and content */
}

.page-news__hero-image {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
  min-height: 200px; /* Minimum size requirement */
}

.page-news__hero-content {
  max-width: 900px;
  padding: 0 20px;
  box-sizing: border-box;
  z-index: 1;
  color: var(--light-text); /* Ensure light text on dark body background */
}

.page-news__main-title {
  font-size: clamp(2.2rem, 4vw, 3.5rem); /* Responsive font size */
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 20px;
  color: var(--secondary-color); /* White for main title */
}

.page-news__description {
  font-size: 1.1rem;
  line-height: 1.6;
  margin-bottom: 30px;
  color: var(--secondary-color); /* White for description */
}

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

/* Section Titles */
.page-news__section-title {
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-weight: 700;
  text-align: center;
  margin-bottom: 15px;
  line-height: 1.3;
}

.page-news__section-subtitle {
  font-size: 1.1rem;
  text-align: center;
  margin-bottom: 40px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.8);
}

/* Backgrounds for contrast */
.page-news__dark-bg {
  background-color: var(--dark-background);
  color: var(--light-text);
}

.page-news__light-bg {
  background-color: var(--secondary-color); /* White background */
  color: var(--dark-text); /* Dark text for light background */
}

.page-news__light-bg .page-news__section-title,
.page-news__light-bg .page-news__section-subtitle {
  color: var(--dark-text); /* Ensure dark text on light background */
}

/* Buttons */
.page-news__btn-primary,
.page-news__btn-secondary {
  display: inline-block;
  padding: 12px 25px;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
  white-space: normal; /* Allow text wrapping */
  word-wrap: break-word; /* Allow long words to break */
  box-sizing: border-box;
  max-width: 100%;
}

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

.page-news__btn-primary:hover {
  background-color: #208ac2; /* Darker shade of primary-color */
  border-color: #208ac2;
}

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

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

.page-news__cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 40px;
  flex-wrap: wrap; /* Allow wrapping on smaller screens */
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

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

.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-color: rgba(255, 255, 255, 0.05); /* Slightly transparent white on dark background */
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  color: var(--light-text); /* Ensure light text */
}

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

.page-news__card-image-wrapper {
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  position: relative;
  overflow: hidden;
}

.page-news__card-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  min-height: 200px; /* Minimum size requirement */
}

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

.page-news__card-date {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 10px;
}

.page-news__card-title {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 10px;
  line-height: 1.4;
}

.page-news__card-title a {
  color: var(--secondary-color); /* White for link text */
  text-decoration: none;
  transition: color 0.3s ease;
}

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

.page-news__card-excerpt {
  font-size: 1rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 15px;
  flex-grow: 1;
}

.page-news__read-more {
  display: inline-block;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--primary-color);
  text-decoration: none;
  border-bottom: 1px solid var(--primary-color);
  padding-bottom: 2px;
  transition: color 0.3s ease, border-color 0.3s ease;
}

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

/* Industry Insights Section */
.page-news__industry-insights-section {
  padding: 60px 0;
}

.page-news__industry-insights-section .page-news__section-subtitle,
.page-news__industry-insights-section p {
  color: var(--dark-text); /* Ensure dark text on light background */
}

.page-news__content-wrapper {
  margin-top: 30px;
  line-height: 1.7;
  font-size: 1.05rem;
}

.page-news__content-wrapper p {
  margin-bottom: 20px;
  color: var(--dark-text); /* Ensure dark text on light background */
}

.page-news__content-wrapper strong {
  color: var(--primary-color);
}

/* Moto88 Updates Section */
.page-news__moto88-updates-section {
  padding: 60px 0;
}

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

.page-news__faq-section .page-news__section-subtitle {
  color: var(--dark-text);
}

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

.page-news__faq-item {
  background-color: rgba(0, 0, 0, 0.03); /* Very light transparent background on white */
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.page-news__faq-item summary {
  list-style: none; /* Hide default marker */
  cursor: pointer;
  padding: 20px 25px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--dark-text); /* Dark text on light background */
  transition: background-color 0.3s ease;
}

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

.page-news__faq-item summary:hover {
  background-color: rgba(0, 0, 0, 0.06);
}

.page-news__faq-toggle {
  font-size: 1.5rem;
  line-height: 1;
  margin-left: 15px;
  color: var(--primary-color);
}

.page-news__faq-answer {
  padding: 0 25px 20px 25px;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--dark-text); /* Dark text on light background */
}

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

/* CTA Section */
.page-news__cta-section {
  padding: 80px 0;
  text-align: center;
}

/* Responsive design */
@media (max-width: 1024px) {
  .page-news__news-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }
}

@media (max-width: 768px) {
  .page-news__hero-section {
    padding-top: 10px !important; /* Small top padding for mobile, body handles main offset */
    padding-bottom: 40px;
  }

  .page-news__main-title {
    font-size: clamp(1.8rem, 7vw, 2.5rem);
  }

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

  .page-news__container {
    padding: 30px 15px;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .page-news__section-title {
    font-size: clamp(1.5rem, 6vw, 2.2rem);
    margin-bottom: 10px;
  }

  .page-news__section-subtitle {
    font-size: 0.95rem;
    margin-bottom: 30px;
  }

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

  .page-news__news-card {
    margin-left: 0;
    margin-right: 0;
  }

  .page-news__card-title {
    font-size: 1.1rem;
  }

  .page-news__card-excerpt {
    font-size: 0.9rem;
  }

  /* Images responsive */
  .page-news img {
    max-width: 100% !important;
    width: 100% !important; /* Ensure width 100% for images */
    height: auto !important;
    display: block !important;
  }
  
  /* Video responsive (if any, though not in this specific HTML yet) */
  .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;
  }
  
  /* Buttons responsive */
  .page-news__cta-buttons {
    flex-direction: column; /* Stack buttons vertically */
    gap: 15px;
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-news__btn-primary,
  .page-news__btn-secondary {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    padding-left: 15px; /* Add padding to text inside button */
    padding-right: 15px;
  }

  .page-news__faq-item summary {
    padding: 15px 20px;
    font-size: 1rem;
  }

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

  .page-news__content-wrapper {
    padding: 0 15px;
  }
}