/* style/news.css */

/* Global styles for the page-news scope */
.page-news {
  background-color: #140C0C; /* Background color from custom palette */
  color: #FFF1E8; /* Main text color for dark background */
  font-family: Arial, sans-serif;
  line-height: 1.6;
  padding-top: 0; /* body handles padding-top from shared.css */
}

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

.page-news__hero-image-wrapper {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

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

.page-news__hero-content {
  max-width: 900px;
  margin-top: 40px;
  padding: 0 20px;
  z-index: 1; /* Ensure content is above any potential background elements */
}

.page-news__main-title {
  font-size: clamp(2em, 4vw, 3.5em); /* Responsive font size */
  color: #F3C54D; /* Gold color for title */
  font-weight: bold;
  line-height: 1.2;
  margin-bottom: 20px;
}

.page-news__intro-text {
  font-size: 1.1em;
  color: #FFF1E8;
  margin-bottom: 30px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

/* CTA Buttons */
.page-news__cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 30px;
  flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
  width: 100%; /* Ensure container takes full width */
  max-width: 100%;
  box-sizing: border-box;
}

.page-news__btn-primary,
.page-news__btn-secondary,
.page-news__read-more-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 25px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  transition: all 0.3s ease;
  white-space: normal; /* Allow text to wrap */
  word-wrap: break-word; /* Break long words */
  box-sizing: border-box;
  max-width: 100%; /* Ensure buttons adapt to container width */
  text-align: center; /* Center text within button */
}

.page-news__btn-primary {
  background: linear-gradient(180deg, #FFB04A 0%, #D86A14 100%); /* Button gradient */
  color: #ffffff; /* White text for primary button */
  border: none;
}

.page-news__btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}

.page-news__btn-secondary {
  background-color: transparent;
  color: #F3C54D; /* Gold text for secondary button */
  border: 2px solid #F3C54D; /* Gold border */
}

.page-news__btn-secondary:hover {
  background-color: rgba(243, 197, 77, 0.1); /* Light gold background on hover */
  transform: translateY(-2px);
}

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

/* News List Section */
.page-news__news-list-section {
  padding: 60px 0;
  background-color: #140C0C; /* Background color from custom palette */
}

.page-news__section-title {
  font-size: clamp(1.8em, 3vw, 2.8em);
  color: #F3C54D; /* Gold color for section titles */
  text-align: center;
  margin-bottom: 40px;
  font-weight: bold;
}

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

.page-news__news-card {
  background-color: #2A1212; /* Card background color */
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid #6A1E1E; /* Border color */
  display: flex;
  flex-direction: column;
}

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

.page-news__card-link {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.page-news__card-image-wrapper {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  box-sizing: border-box;
}

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

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

.page-news__card-title {
  font-size: 1.4em;
  color: #FFF1E8; /* Text color for card title */
  margin-bottom: 10px;
  line-height: 1.3;
  flex-grow: 1; /* Allow title to take available space */
}

.page-news__card-meta {
  font-size: 0.9em;
  color: #E53030; /* Auxiliary color for meta info */
  margin-bottom: 15px;
}

.page-news__card-excerpt {
  font-size: 1em;
  color: #FFF1E8; /* Text color for excerpt */
  margin-bottom: 20px;
}

.page-news__read-more-btn {
  display: inline-block;
  background-color: #E53030; /* Auxiliary color for read more button */
  color: #ffffff;
  padding: 8px 15px;
  border-radius: 5px;
  font-size: 0.9em;
  align-self: flex-start; /* Align to the start within the flex column */
  white-space: nowrap;
}

.page-news__read-more-btn:hover {
  background-color: #C61F1F; /* Primary color on hover */
}

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

.page-news__btn-view-all {
  padding: 15px 40px;
  font-size: 1.1em;
}

/* Join Us CTA Section */
.page-news__join-us-cta {
  background-color: #2A1212; /* Card background for this section */
  padding: 80px 0;
  text-align: center;
}

.page-news__join-title {
  font-size: clamp(1.8em, 3vw, 2.5em);
  color: #F3C54D; /* Gold color for title */
  margin-bottom: 20px;
}

.page-news__join-description {
  font-size: 1.1em;
  color: #FFF1E8; /* Text color */
  max-width: 800px;
  margin: 0 auto 40px auto;
  padding: 0 20px;
}


/* Responsive styles */
@media (max-width: 768px) {
  .page-news__hero-section {
    padding: 10px 0 40px 0;
  }

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

  .page-news__intro-text {
    font-size: 1em;
  }

  .page-news__cta-buttons {
    flex-direction: column;
    gap: 15px;
    padding: 0 15px; /* Add padding for mobile */
  }

  .page-news__btn-primary,
  .page-news__btn-secondary,
  .page-news__read-more-btn {
    width: 100% !important; /* Force full width on mobile */
    max-width: 100% !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

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

  .page-news__news-grid {
    grid-template-columns: 1fr; /* Single column on mobile */
    gap: 20px;
  }

  .page-news__news-card {
    margin: 0 15px; /* Add horizontal margin for cards */
  }

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

  .page-news__join-us-cta {
    padding: 60px 0;
  }

  .page-news__join-title {
    font-size: 1.8em;
  }

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

  /* Image responsiveness for mobile */
  .page-news img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  
  /* All containers with images/videos */
  .page-news__hero-image-wrapper,
  .page-news__card-image-wrapper,
  .page-news__container,
  .page-news__news-list-section,
  .page-news__join-us-cta,
  .page-news__hero-section,
  .page-news__news-card {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important; /* Prevent horizontal scroll */
  }
  
  /* Specific padding for sections to prevent overflow and provide spacing */
  .page-news__news-list-section .page-news__container,
  .page-news__join-us-cta .page-news__container {
    padding-left: 15px !important;
    padding-right: 15px !important;
  }

  /* Ensure content area images are not tiny */
  .page-news__news-card .page-news__card-image {
    min-width: 200px !important;
    min-height: 200px !important;
  }
}