/* style/news.css */
.page-news {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: #ffffff; /* Body background is dark #0d1117, so use light text */
  background-color: #0d1117;
}

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

.page-news__hero-section {
  position: relative;
  padding: 80px 0;
  padding-top: var(--header-offset, 120px);
  background: linear-gradient(135deg, #007bff, #0056b3);
  color: #ffffff;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 400px;
}

.page-news__main-title {
  font-size: 3.2em;
  margin-bottom: 20px;
  color: #ffc107;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.page-news__hero-description {
  font-size: 1.2em;
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.page-news__cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
}

.page-news__btn-primary,
.page-news__btn-secondary {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.1em;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-news__btn-primary {
  background-color: #ffc107;
  color: #0d1117;
  border: 2px solid #ffc107;
}

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

.page-news__btn-secondary {
  background-color: transparent;
  color: #ffc107;
  border: 2px solid #ffc107;
}

.page-news__btn-secondary:hover {
  background-color: #ffc107;
  color: #0d1117;
}

.page-news__section {
  padding: 60px 0;
}

.page-news__section-title {
  font-size: 2.5em;
  color: #ffc107;
  text-align: center;
  margin-bottom: 50px;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.page-news__featured-news {
  background-color: #1a1e24;
}

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

.page-news__news-card {
  background-color: #2a2e35;
  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;
  color: #ffffff;
}

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

.page-news__card-image {
  width: 100%;
  height: 250px;
  object-fit: cover;
  display: block;
}

.page-news__card-content {
  padding: 25px;
}

.page-news__card-title {
  font-size: 1.5em;
  margin-bottom: 15px;
  min-height: 60px; /* Ensure consistent height for titles */
}

.page-news__card-title a {
  color: #ffc107;
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-news__card-title a:hover {
  color: #ffffff;
}

.page-news__card-text {
  font-size: 0.95em;
  color: #cccccc;
  margin-bottom: 20px;
}

.page-news__read-more {
  display: inline-block;
  color: #007bff;
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease;
}

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

.page-news__in-depth-analysis {
  background-color: #0d1117;
}

.page-news__content-wrapper {
  display: flex;
  gap: 40px;
  align-items: center;
}

.page-news__content-wrapper--reverse {
  flex-direction: row-reverse;
}

.page-news__text-block {
  flex: 1;
}

.page-news__image-block {
  flex: 1;
  min-width: 200px; /* Minimum size for images */
}

.page-news__content-image {
  width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
  display: block;
}

.page-news__sub-title {
  font-size: 1.8em;
  color: #007bff;
  margin-top: 30px;
  margin-bottom: 15px;
}

.page-news__sub-title:first-of-type {
  margin-top: 0;
}

.page-news__paragraph {
  font-size: 1.05em;
  color: #e0e0e0;
  margin-bottom: 15px;
}

.page-news__guides-tips {
  background-color: #1a1e24;
}

.page-news__faq {
  background-color: #0d1117;
}

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

.page-news__faq-item {
  background-color: #1a1e24;
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.page-news__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  font-size: 1.2em;
  font-weight: bold;
  color: #ffffff;
  cursor: pointer;
  background-color: #007bff;
  border-bottom: 1px solid #0056b3;
  transition: background-color 0.3s ease;
}

.page-news__faq-question:hover {
  background-color: #0056b3;
}

.page-news__faq-toggle {
  font-size: 1.5em;
  line-height: 1;
  transition: transform 0.3s ease;
}

.page-news__faq-item.active .page-news__faq-toggle {
  transform: rotate(45deg);
}

.page-news__faq-answer {
  max-height: 0;
  overflow: hidden;
  padding: 0 25px;
  color: #e0e0e0;
  background-color: #2a2e35;
  transition: max-height 0.3s ease-out, padding 0.3s ease-out;
}

.page-news__faq-item.active .page-news__faq-answer {
  max-height: 1000px !important; /* Use !important to ensure it overrides */
  padding: 20px 25px;
}

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

.page-news__cta-bottom {
  background-color: #007bff;
  color: #ffffff;
  text-align: center;
}

.page-news__cta-bottom .page-news__section-title {
  color: #ffc107;
}

.page-news__btn-large {
  padding: 18px 40px;
  font-size: 1.2em;
}

.page-news__text-center {
  text-align: center;
}

/* Responsive Design */
@media (max-width: 992px) {
  .page-news__main-title {
    font-size: 2.5em;
  }
  .page-news__section-title {
    font-size: 2em;
  }
  .page-news__content-wrapper {
    flex-direction: column;
  }
  .page-news__content-wrapper--reverse {
    flex-direction: column;
  }
}

@media (max-width: 768px) {
  .page-news__hero-section {
    padding: 60px 0;
    padding-top: var(--header-offset, 120px) !important;
  }
  .page-news__main-title {
    font-size: 2em;
  }
  .page-news__hero-description {
    font-size: 1em;
  }
  .page-news__cta-buttons {
    flex-direction: column;
    gap: 15px;
  }
  .page-news__btn-primary,
  .page-news__btn-secondary {
    width: 100% !important;
    padding: 12px 20px;
    font-size: 1em;
  }
  .page-news__section {
    padding: 40px 0;
  }
  .page-news__section-title {
    font-size: 1.8em;
    margin-bottom: 30px;
  }
  .page-news__card-image {
    height: 200px;
  }
  .page-news__card-title {
    font-size: 1.3em;
    min-height: unset;
  }
  .page-news__sub-title {
    font-size: 1.5em;
  }
  .page-news__paragraph {
    font-size: 0.95em;
  }
  .page-news__faq-question {
    font-size: 1.1em;
    padding: 15px 20px;
  }

  /* Mobile image responsive adaptation */
  .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__content-wrapper,
  .page-news__news-card,
  .page-news__faq-item,
  .page-news__cta-buttons {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    overflow-x: hidden;
  }

  /* Specific for content images to ensure minimum size is not violated by padding */
  .page-news__content-image {
    min-width: 200px !important;
    min-height: 200px !important;
  }
  
  /* Ensure text blocks within flex containers are full width */
  .page-news__text-block {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }
  
  /* For multiple buttons in a row, allow wrapping */
  .page-news__cta-buttons {
    flex-wrap: wrap !important;
    gap: 10px;
  }
}

@media (max-width: 480px) {
  .page-news__main-title {
    font-size: 1.8em;
  }
  .page-news__hero-description {
    font-size: 0.9em;
  }
  .page-news__section-title {
    font-size: 1.5em;
  }
  .page-news__card-title {
    font-size: 1.2em;
  }
  .page-news__sub-title {
    font-size: 1.3em;
  }
}