/* style/news.css */
:root {
  --primary-color: #26A9E0;
  --secondary-color: #FFFFFF;
  --text-dark: #333333;
  --text-light: #ffffff;
  --background-light: #f5f5f5;
  --button-login: #EA7C07;
}

/* Body background is handled by shared.css, assuming it's dark. Text colors are set accordingly. */
.page-news {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-light); /* Default to light text for potentially dark body background */
  background-color: transparent; /* Body handles actual background */
}

.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;
  min-height: 500px;
  padding: 60px 0;
  padding-top: 10px; /* Small top padding, body handles header offset */
  overflow: hidden;
  background-color: var(--primary-color);
}

.page-news__hero-image-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  overflow: hidden;
}

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

.page-news__hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: var(--text-light);
  max-width: 900px;
  padding: 20px;
}

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

.page-news__description {
  font-size: 1.15rem;
  margin-bottom: 30px;
}

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

.page-news__btn-primary,
.page-news__btn-secondary {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  box-sizing: border-box;
}

.page-news__btn-primary {
  background-color: var(--button-login); /* Using login color for primary CTA */
  color: var(--text-light);
  border: 2px solid var(--button-login);
}

.page-news__btn-primary:hover {
  background-color: darken(var(--button-login), 10%);
  border-color: darken(var(--button-login), 10%);
}

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

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

/* Section Titles and Descriptions */
.page-news__section-title {
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  font-weight: 700;
  text-align: center;
  margin-bottom: 20px;
  color: var(--primary-color);
}

.page-news__section-description {
  font-size: 1.1rem;
  text-align: center;
  max-width: 800px;
  margin: 0 auto 40px;
  color: var(--text-dark);
}

/* Featured News Section */
.page-news__featured-news {
  padding: 80px 0;
  background-color: var(--background-light);
  color: var(--text-dark);
}

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

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

.page-news__news-card:hover {
  transform: translateY(-5px);
}

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

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

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

.page-news__card-title a {
  color: var(--primary-color);
  text-decoration: none;
}

.page-news__card-title a:hover {
  text-decoration: underline;
}

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

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

.page-news__read-more {
  display: inline-block;
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
  margin-top: auto; /* Pushes button to bottom */
}

.page-news__read-more:hover {
  text-decoration: underline;
}

/* Latest News List Section */
.page-news__latest-news-list {
  padding: 60px 0;
  background-color: var(--secondary-color);
  color: var(--text-dark);
}

.page-news__list-items {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.page-news__list-item {
  display: flex;
  background-color: var(--secondary-color);
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  transition: transform 0.3s ease;
}

.page-news__list-item:hover {
  transform: translateY(-3px);
}

.page-news__list-image {
  width: 250px;
  height: 180px;
  object-fit: cover;
  flex-shrink: 0;
  display: block;
}

.page-news__list-content {
  padding: 20px;
  flex-grow: 1;
}

.page-news__item-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 8px;
  line-height: 1.3;
}

.page-news__item-title a {
  color: var(--primary-color);
  text-decoration: none;
}

.page-news__item-title a:hover {
  text-decoration: underline;
}

.page-news__item-meta {
  font-size: 0.85rem;
  color: #777;
  margin-bottom: 10px;
}

.page-news__item-text {
  font-size: 0.95rem;
  color: var(--text-dark);
}

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

/* Categories Section */
.page-news__categories {
  padding: 80px 0;
  background-color: var(--primary-color);
  color: var(--text-light);
}

.page-news__categories .page-news__section-title,
.page-news__categories .page-news__section-description {
  color: var(--text-light);
}

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

.page-news__category-card {
  background-color: rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 30px;
  text-align: center;
  transition: background-color 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.page-news__category-card:hover {
  background-color: rgba(255, 255, 255, 0.25);
}

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

.page-news__category-title a {
  color: var(--text-light);
  text-decoration: none;
}

.page-news__category-title a:hover {
  text-decoration: underline;
}

.page-news__category-text {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 20px;
  flex-grow: 1;
}

/* Why Choose Section */
.page-news__why-choose {
  padding: 80px 0;
  background-color: var(--background-light);
  color: var(--text-dark);
}

.page-news__advantages-list {
  list-style: none;
  padding: 0;
  margin: 40px auto;
  max-width: 800px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 15px;
}

.page-news__advantages-list li {
  font-size: 1.1rem;
  background-color: var(--secondary-color);
  padding: 15px 20px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  border-left: 4px solid var(--primary-color);
}

.page-news__cta-banner {
  position: relative;
  width: 100%;
  max-width: 1000px;
  margin: 60px auto 0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 250px; /* Ensure visibility even without image */
}

.page-news__cta-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
}

.page-news__cta-content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: var(--text-light);
  padding: 30px;
  background-color: rgba(0, 0, 0, 0.5); /* Overlay for readability */
  border-radius: 12px;
  max-width: 700px;
}

.page-news__cta-title {
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  font-weight: 700;
  margin-bottom: 15px;
}

.page-news__cta-text {
  font-size: 1.1rem;
  margin-bottom: 25px;
}

/* FAQ Section */
.page-news__faq-section {
  padding: 80px 0;
  background-color: var(--secondary-color);
  color: var(--text-dark);
}

.page-news__faq-list {
  max-width: 800px;
  margin: 40px auto 0;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.page-news__faq-item {
  background-color: var(--background-light);
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  overflow: hidden;
}

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

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

.page-news__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

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

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

/* Responsive Design */
@media (max-width: 992px) {
  .page-news__hero-section {
    min-height: 400px;
    padding: 40px 0;
  }

  .page-news__main-title {
    font-size: clamp(2rem, 5vw, 3rem);
  }

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

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

  .page-news__list-item {
    flex-direction: column;
  }

  .page-news__list-image {
    width: 100%;
    height: 200px;
  }

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

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

  .page-news__cta-title {
    font-size: clamp(1.3rem, 4vw, 2rem);
  }

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

@media (max-width: 768px) {
  .page-news__hero-section {
    min-height: 350px;
    padding-top: 10px !important;
  }

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

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

  .page-news__cta-buttons {
    flex-direction: column;
    gap: 15px;
    padding: 0 15px;
  }

  .page-news__btn-primary,
  .page-news__btn-secondary {
    width: 100% !important;
    max-width: 100% !important;
    padding: 12px 20px;
    font-size: 1rem;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

  .page-news__section-title {
    font-size: clamp(1.5rem, 5vw, 2.2rem);
  }

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

  .page-news__featured-news, .page-news__latest-news-list, .page-news__categories, .page-news__why-choose, .page-news__faq-section {
    padding: 40px 0;
  }

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

  .page-news img {
    max-width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  
  .page-news__news-card, .page-news__list-item, .page-news__category-card, .page-news__cta-banner {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

  .page-news__card-title, .page-news__item-title {
    font-size: 1.15rem;
  }

  .page-news__card-text, .page-news__item-text, .page-news__category-text {
    font-size: 0.9rem;
  }

  .page-news__cta-title {
    font-size: clamp(1.2rem, 5vw, 1.8rem);
  }

  .page-news__cta-text {
    font-size: 0.9rem;
  }

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

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

@media (max-width: 480px) {
  .page-news__news-grid {
    grid-template-columns: 1fr;
  }
}