/* style/news.css */

:root {
  --primary-color: #26A9E0;
  --secondary-color: #FFFFFF;
  --text-color-dark: #333333;
  --text-color-light: #ffffff;
  --login-button-color: #EA7C07;
}

.page-news {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: var(--text-color-dark);
  background-color: var(--secondary-color); /* Default light background */
}

.page-news__hero-section {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 60px 20px;
  padding-top: 10px; /* Small top padding, body handles --header-offset */
  background-color: var(--secondary-color);
  color: var(--text-color-dark);
  text-align: center;
}

.page-news__hero-image-wrapper {
  width: 100%;
  max-width: 1200px;
  margin-bottom: 30px;
}

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

.page-news__hero-content {
  max-width: 900px;
  margin: 0 auto;
}

.page-news__main-title {
  font-size: clamp(2em, 4vw, 3em);
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 20px;
  line-height: 1.2;
}

.page-news__intro-description {
  font-size: 1.1em;
  margin-bottom: 30px;
  color: var(--text-color-dark);
}

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

.page-news__section-title {
  font-size: 2.5em;
  color: var(--primary-color);
  text-align: center;
  margin-bottom: 40px;
  font-weight: 700;
}

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

.page-news__news-card {
  background-color: var(--secondary-color);
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  color: var(--text-color-dark);
}

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

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

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

.page-news__news-title {
  font-size: 1.5em;
  margin-bottom: 10px;
  line-height: 1.3;
}

.page-news__news-title a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-news__news-title a:hover {
  color: #007bb6; /* Slightly darker primary color on hover */
}

.page-news__news-meta {
  font-size: 0.9em;
  color: #666;
  margin-bottom: 15px;
}

.page-news__news-excerpt {
  font-size: 1em;
  color: var(--text-color-dark);
  margin-bottom: 20px;
  flex-grow: 1;
}

.page-news__read-more {
  display: inline-block;
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

.page-news__read-more:hover {
  color: #007bb6;
}

.page-news__button-container {
  text-align: center;
  margin-top: 20px;
}

.page-news__cta-button {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.1em;
  transition: all 0.3s ease;
  white-space: normal; /* Allow text wrapping */
  word-wrap: break-word; /* Allow text wrapping */
  box-sizing: border-box;
}

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

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

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

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

.page-news__faq-section {
  background-color: #f8f8f8;
  padding: 60px 20px;
  color: var(--text-color-dark);
}

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

.page-news__faq-item {
  background-color: var(--secondary-color);
  border-radius: 8px;
  margin-bottom: 15px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  color: var(--text-color-dark);
}

.page-news__faq-item summary {
  list-style: none;
  outline: none;
}

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

.page-news__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  font-size: 1.2em;
  font-weight: 600;
  color: var(--primary-color);
  cursor: pointer;
  background-color: var(--secondary-color);
  border-bottom: 1px solid #eee;
}

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

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

.page-news__faq-answer {
  padding: 15px 25px 25px;
  font-size: 1em;
  color: var(--text-color-dark);
}

.page-news__cta-section {
  background-color: var(--primary-color);
  color: var(--text-color-light);
  padding: 80px 20px;
  text-align: center;
}

.page-news__cta-title {
  font-size: 2.8em;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--text-color-light);
}

.page-news__cta-description {
  font-size: 1.2em;
  max-width: 800px;
  margin: 0 auto 40px;
  color: var(--text-color-light);
}

/* --- Responsive Styles --- */

/* Desktop */
@media (min-width: 1024px) {
  .page-news__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Tablet */
@media (max-width: 768px) {
  .page-news__main-title {
    font-size: clamp(1.8em, 6vw, 2.5em);
  }

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

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

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

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

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

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

  .page-news__cta-button {
    padding: 12px 25px;
    font-size: 1em;
  }
}

/* Mobile */
@media (max-width: 768px) {
  .page-news__hero-section,
  .page-news__section,
  .page-news__cta-section {
    padding: 30px 15px;
  }

  .page-news__main-title {
    font-size: clamp(1.5em, 7vw, 2em);
  }

  .page-news__intro-description {
    font-size: 0.95em;
  }

  .page-news__section-title {
    font-size: 1.8em;
    margin-bottom: 30px;
  }

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

  .page-news__news-image {
    height: 180px;
  }

  .page-news__news-title {
    font-size: 1.3em;
  }

  .page-news__news-meta,
  .page-news__news-excerpt {
    font-size: 0.9em;
  }

  .page-news__read-more {
    font-size: 0.95em;
  }

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

  .page-news__faq-answer {
    padding: 10px 20px 20px;
    font-size: 0.95em;
  }

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

  .page-news__cta-description {
    font-size: 0.95em;
  }

  /* Mobile responsive overrides with !important */
  .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__faq-section,
  .page-news__cta-section {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
    overflow: hidden !important;
  }

  .page-news__hero-section {
    padding-top: 10px !important;
  }

  .page-news__cta-button,
  .page-news__btn-primary,
  .page-news__btn-secondary,
  .page-news a[class*="button"],
  .page-news a[class*="btn"] {
    max-width: 100% !important;
    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;
    margin-bottom: 10px; /* Space between stacked buttons */
  }

  .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 !important;
    padding-right: 15px !important;
    overflow: hidden !important;
    display: flex;
    flex-direction: column; /* Stack buttons vertically on mobile */
    gap: 10px; /* Space between stacked buttons */
  }
}