/* style/news.css */

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

.page-news {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: var(--text-color-dark);
  background-color: var(--background-color);
}

.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: 80px 20px;
  background: var(--primary-color);
  color: var(--text-color-light);
  padding-top: var(--header-offset, 120px);
  overflow: hidden;
  min-height: 500px;
}

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

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

.page-news__hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(38, 169, 224, 0.7);
  z-index: 2;
}

.page-news__hero-content {
  position: relative;
  z-index: 3;
  max-width: 900px;
  margin: 0 auto;
}

.page-news__main-title {
  font-size: 48px;
  font-weight: bold;
  margin-bottom: 20px;
  line-height: 1.2;
  color: var(--text-color-light);
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.page-news__intro-text {
  font-size: 18px;
  margin-bottom: 30px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  color: var(--text-color-light);
}

.page-news__cta-button {
  display: inline-block;
  padding: 15px 40px;
  background: var(--login-button-color);
  color: var(--text-color-light);
  text-decoration: none;
  border-radius: 8px;
  font-size: 20px;
  font-weight: bold;
  transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.page-news__cta-button:hover {
  background: #c76706; /* Darken login color */
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

/* Articles Section */
.page-news__articles-section {
  padding: 60px 0;
  background-color: var(--background-color);
}

.page-news__section-title {
  font-size: 36px;
  font-weight: bold;
  text-align: center;
  margin-bottom: 40px;
  color: var(--text-color-dark);
}

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

.page-news__article-card {
  background: var(--secondary-color);
  border-radius: 10px;
  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 25px rgba(0, 0, 0, 0.15);
}

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

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

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

.page-news__article-title {
  font-size: 22px;
  font-weight: 700;
  margin-top: 0;
  margin-bottom: 10px;
  line-height: 1.3;
  color: var(--primary-color);
  cursor: pointer;
  transition: color 0.3s ease;
}

.page-news__article-title:hover {
  color: #1f8ec4; /* Darken primary color */
}

.page-news__article-meta {
  font-size: 14px;
  color: #777;
  margin-bottom: 15px;
}

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

.page-news__full-article-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease-out, opacity 0.4s ease-out;
  padding-top: 0;
  opacity: 0;
}

.page-news__article-item.active .page-news__full-article-content {
  max-height: 2000px; /* Sufficiently large to show full content */
  padding-top: 20px;
  opacity: 1;
}

.page-news__full-article-content p {
    margin-bottom: 1em;
    color: var(--text-color-dark);
}

.page-news__full-article-content h4 {
    font-size: 1.2em;
    margin-top: 1.5em;
    margin-bottom: 0.8em;
    color: var(--primary-color);
}

.page-news__full-article-content ul {
    list-style-type: disc;
    margin-left: 20px;
    margin-bottom: 1em;
}

.page-news__full-article-content li {
    margin-bottom: 0.5em;
    color: var(--text-color-dark);
}

.page-news__read-more {
  display: inline-block;
  color: var(--primary-color);
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease;
  margin-top: auto;
  cursor: pointer;
}

.page-news__read-more:hover {
  color: #1f8ec4;
  text-decoration: underline;
}

/* Pagination */
.page-news__pagination {
  display: flex;
  justify-content: center;
  margin-top: 50px;
  gap: 10px;
}

.page-news__pagination-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--secondary-color);
  border: 1px solid var(--primary-color);
  color: var(--primary-color);
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.page-news__pagination-link:hover:not(.page-news__pagination-link--active) {
  background: var(--primary-color);
  color: var(--text-color-light);
}

.page-news__pagination-link--active {
  background: var(--primary-color);
  color: var(--text-color-light);
  cursor: default;
}

.page-news__pagination-link:last-child {
  width: auto;
  border-radius: 20px;
  padding: 0 15px;
}

/* CTA Section */
.page-news__cta-section {
  padding: 80px 0;
  background: var(--primary-color);
  color: var(--text-color-light);
  text-align: center;
}

.page-news__cta-container {
  max-width: 800px;
  margin: 0 auto;
}

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

.page-news__cta-description {
  font-size: 18px;
  margin-bottom: 40px;
  color: var(--text-color-light);
}

.page-news__btn-primary {
  display: inline-block;
  padding: 15px 40px;
  background: var(--login-button-color);
  color: var(--text-color-light);
  text-decoration: none;
  border-radius: 8px;
  font-size: 20px;
  font-weight: bold;
  transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.page-news__btn-primary:hover {
  background: #c76706;
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-news__main-title {
    font-size: 40px;
  }

  .page-news__cta-title {
    font-size: 32px;
  }
}

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

  .page-news__hero-section {
    padding-top: var(--header-offset, 120px) !important;
    padding: 60px 15px;
    min-height: 400px;
  }

  .page-news__main-title {
    font-size: 32px;
    margin-bottom: 15px;
  }

  .page-news__intro-text {
    font-size: 16px;
    margin-bottom: 25px;
  }

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

  .page-news__articles-section {
    padding: 40px 0;
  }

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

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

  .page-news__article-card {
    margin: 0 15px;
  }

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

  .page-news__article-title {
    font-size: 20px;
  }

  .page-news__article-summary {
    font-size: 15px;
  }

  .page-news__pagination {
    margin-top: 40px;
  }

  .page-news__cta-section {
    padding: 50px 15px;
  }

  .page-news__cta-title {
    font-size: 28px;
  }

  .page-news__cta-description {
    font-size: 16px;
    margin-bottom: 30px;
  }

  /* Image responsive rules for content area */
  .page-news img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
  }

  .page-news__section,
  .page-news__card,
  .page-news__container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-news__hero-section .page-news__hero-image img {
    min-height: 250px !important;
  }
}