/* style/news.css */

:root {
  --primary-color: #E53935;
  --secondary-color: #FF5A4F;
  --text-main-color: #333333;
  --card-bg-color: #FFFFFF;
  --background-color: #F5F7FA;
  --border-color: #E0E0E0;
}

.page-news {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: var(--text-main-color);
  background-color: var(--background-color);
  padding-bottom: 50px;
}

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

/* Hero Section */
.page-news__hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 20px;
  padding-top: 10px; /* Small top padding, body handles header offset */
  background: linear-gradient(180deg, #FF5A4F 0%, #E53935 100%);
  color: #ffffff;
}

.page-news__hero-container {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

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

.page-news__hero-image img {
  width: 100%;
  height: auto;
  max-width: 100%;
  display: block;
  border-radius: 8px;
  object-fit: cover;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.page-news__hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  width: 100%;
}

.page-news__main-title {
  font-size: clamp(2.2rem, 3.5vw, 3.2rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 20px;
  color: #ffffff;
}

.page-news__intro-text {
  font-size: 1.1rem;
  max-width: 800px;
  margin: 0 auto 30px auto;
  color: #f0f0f0;
}

.page-news__intro-text strong {
  color: #ffffff;
}

.page-news__cta-button {
  display: inline-block;
  padding: 15px 40px;
  background: linear-gradient(180deg, #FF5A4F 0%, #E53935 100%);
  color: #ffffff;
  text-decoration: none;
  border-radius: 5px;
  font-size: 18px;
  font-weight: bold;
  margin-top: 20px;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-news__cta-button:hover {
  opacity: 0.9;
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

/* Latest Articles Section */
.page-news__latest-articles {
  padding: 80px 0;
  background-color: var(--background-color);
}

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

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

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

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

.page-news__article-image-wrapper {
  width: 100%;
  height: 220px;
  overflow: hidden;
}

.page-news__article-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
  min-width: 200px; /* Ensure minimum size */
  min-height: 200px; /* Ensure minimum size */
}

.page-news__article-card:hover .page-news__article-image-wrapper img {
  transform: scale(1.05);
}

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

.page-news__article-date {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 10px;
}

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

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

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

.page-news__article-summary {
  font-size: 1rem;
  color: #555;
  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: var(--secondary-color);
}

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

.page-news__btn-secondary {
  background: var(--card-bg-color);
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
  padding: 15px 40px;
  border-radius: 5px;
  font-size: 18px;
  font-weight: bold;
  text-decoration: none;
  transition: all 0.3s ease;
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-news__btn-secondary:hover {
  background: var(--primary-color);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* FAQ Section */
.page-news__faq-section {
  padding: 80px 0;
  background-color: var(--primary-color);
  color: #ffffff;
}

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

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

details.page-news__faq-item {
  margin-bottom: 15px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.1);
}

details.page-news__faq-item summary.page-news__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px;
  cursor: pointer;
  user-select: none;
  list-style: none;
  transition: background-color 0.3s ease;
  color: #ffffff;
  font-weight: 600;
}

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

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

.page-news__faq-qtext {
  flex: 1;
  font-size: 1.1rem;
  line-height: 1.5;
  text-align: left;
}

.page-news__faq-toggle {
  font-size: 28px;
  font-weight: bold;
  color: #ffffff;
  flex-shrink: 0;
  margin-left: 15px;
  width: 30px;
  text-align: center;
  transition: transform 0.3s ease;
}

details.page-news__faq-item[open] .page-news__faq-toggle {
  transform: rotate(45deg);
}

details.page-news__faq-item .page-news__faq-answer {
  padding: 0 25px 20px;
  background: rgba(0, 0, 0, 0.1);
  border-radius: 0 0 8px 8px;
  color: #f0f0f0;
}

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

/* Call to Action Section */
.page-news__call-to-action {
  padding: 80px 0;
  background-color: var(--background-color);
}

.page-news__cta-container {
  display: flex;
  align-items: center;
  gap: 50px;
  background-color: var(--card-bg-color);
  border-radius: 12px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  padding: 40px;
}

.page-news__cta-content {
  flex: 1;
}

.page-news__cta-title {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 20px;
  line-height: 1.3;
}

.page-news__cta-description {
  font-size: 1.1rem;
  color: var(--text-main-color);
  margin-bottom: 30px;
}

.page-news__cta-image {
  flex-shrink: 0;
  width: 400px;
  height: 300px;
  overflow: hidden;
  border-radius: 8px;
}

.page-news__cta-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  min-width: 200px; /* Ensure minimum size */
  min-height: 200px; /* Ensure minimum size */
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-news__main-title {
    font-size: clamp(2rem, 4vw, 2.8rem);
  }
  .page-news__section-title {
    font-size: 2rem;
  }
  .page-news__cta-title {
    font-size: 1.8rem;
  }
  .page-news__cta-image {
    width: 300px;
    height: 225px;
  }
}

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

  .page-news__hero-section {
    padding-top: 10px !important;
    padding-bottom: 40px;
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-news__hero-image {
    margin-bottom: 20px;
  }

  .page-news__hero-image img {
    border-radius: 4px;
  }

  .page-news__main-title {
    font-size: clamp(1.8rem, 6vw, 2.5rem);
    margin-bottom: 15px;
  }

  .page-news__intro-text {
    font-size: 1rem;
    margin-bottom: 20px;
  }

  .page-news__cta-button {
    padding: 12px 30px;
    font-size: 16px;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

  .page-news__latest-articles, .page-news__faq-section, .page-news__call-to-action {
    padding: 50px 0;
  }

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

  .page-news__articles-grid {
    grid-template-columns: 1fr;
    gap: 25px;
  }

  .page-news__article-card {
    box-sizing: border-box;
    width: 100% !important;
    max-width: 100% !important;
  }
  
  .page-news__article-image-wrapper {
    height: 180px;
  }

  .page-news__article-content {
    padding: 20px;
  }

  .page-news__article-title {
    font-size: 1.2rem;
  }

  .page-news__article-summary {
    font-size: 0.95rem;
  }

  .page-news__btn-secondary {
    padding: 12px 30px;
    font-size: 16px;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

  details.page-news__faq-item summary.page-news__faq-question {
    padding: 15px;
  }
  .page-news__faq-qtext {
    font-size: 1rem;
  }
  .page-news__faq-toggle {
    font-size: 24px;
    width: 25px;
  }
  details.page-news__faq-item .page-news__faq-answer {
    padding: 0 15px 15px;
  }

  .page-news__call-to-action .page-news__cta-container {
    flex-direction: column;
    text-align: center;
    padding: 30px 20px;
  }

  .page-news__cta-title {
    font-size: 1.6rem;
  }

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

  .page-news__cta-image {
    width: 100%;
    height: 200px;
    margin-top: 30px;
  }

  /* Ensure all images are responsive and do not overflow */
  .page-news img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    box-sizing: border-box !important;
  }
  
  .page-news__container, .page-news__cta-container {
    padding-left: 15px;
    padding-right: 15px;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

  .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;
  }
}