/* style/news.css */
:root {
  --primary-color: #FFD700;
  --secondary-color: #000080;
  --text-color-dark: #333333;
  --text-color-light: #ffffff;
  --background-light: #f5f5f5;
  --background-dark: #000080;
  --border-color: #e0e0e0;
  --shadow-color: rgba(0, 0, 0, 0.1);
}

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

/* Fixed Header Spacing */
.page-news__hero-section {
  padding-top: var(--header-offset, 120px);
}

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

/* Hero Section */
.page-news__hero-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-bottom: 60px;
  background: linear-gradient(135deg, var(--secondary-color) 0%, #000050 100%);
  color: var(--text-color-light);
  position: relative;
  overflow: hidden;
}

.page-news__hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('[GALLERY:bg:1920x1080:xx88,abstract_pattern,geometric_shapes,subtle_gold]') no-repeat center center/cover;
  opacity: 0.1;
  z-index: 0;
}

.page-news__hero-content {
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin-bottom: 40px;
}

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

.page-news__hero-description {
  font-size: 18px;
  margin-bottom: 30px;
  color: #e0e0e0;
}

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

.page-news__cta-button {
  display: inline-block;
  padding: 15px 35px;
  border-radius: 8px;
  font-size: 18px;
  font-weight: bold;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px var(--shadow-color);
  white-space: nowrap; /* Keep button text on one line for desktop */
}

.page-news__cta-button {
  background: var(--primary-color);
  color: var(--background-dark);
  border: 2px solid var(--primary-color);
}

.page-news__cta-button:hover {
  background: #e6c200;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

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

.page-news__cta-button--secondary:hover {
  background: var(--primary-color);
  color: var(--background-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.page-news__hero-image-wrapper {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1000px;
  margin-top: 40px;
}

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

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

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

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

.page-news__article-card {
  background: #ffffff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.page-news__article-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

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

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

.page-news__article-title {
  font-size: 22px;
  font-weight: bold;
  margin-bottom: 15px;
  color: var(--secondary-color);
  line-height: 1.3;
}

.page-news__article-excerpt {
  font-size: 15px;
  color: #666666;
  margin-bottom: 20px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3; /* Limit excerpt to 3 lines */
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.page-news__article-date {
  font-size: 13px;
  color: #999999;
  display: block;
  margin-bottom: 10px;
}

.page-news__read-more {
  display: inline-flex;
  align-items: center;
  color: var(--primary-color);
  font-weight: bold;
  font-size: 15px;
}

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

.page-news__arrow {
  margin-left: 8px;
  transition: transform 0.3s ease;
}

.page-news__article-link:hover .page-news__arrow {
  transform: translateX(5px);
}

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

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

.page-news__pagination-item:hover {
  background-color: var(--primary-color);
  color: var(--background-dark);
  border-color: var(--primary-color);
}

.page-news__pagination-item--active {
  background-color: var(--primary-color);
  color: var(--background-dark);
  border-color: var(--primary-color);
  cursor: default;
}

.page-news__pagination-item--active:hover {
  background-color: var(--primary-color);
  color: var(--background-dark);
}

.page-news__pagination-item--next {
  width: auto;
  border-radius: 20px;
  padding: 0 20px;
}

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

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

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

.page-news__cta-description {
  font-size: 18px;
  margin-bottom: 40px;
  color: #e0e0e0;
}

.page-news__cta-button--large {
  padding: 18px 45px;
  font-size: 20px;
  border-radius: 10px;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-news__main-title {
    font-size: 42px;
  }
  .page-news__hero-description {
    font-size: 16px;
  }
  .page-news__section-title {
    font-size: 32px;
  }
  .page-news__article-title {
    font-size: 20px;
  }
  .page-news__cta-title {
    font-size: 34px;
  }
}

@media (max-width: 768px) {
  .page-news {
    font-size: 16px;
    line-height: 1.6;
  }
  
  /* Fixed Header Spacing for mobile */
  .page-news__hero-section {
    padding-top: var(--header-offset, 120px) !important;
    padding-bottom: 40px;
    padding-left: 15px;
    padding-right: 15px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }
  
  .page-news__container {
    padding: 0 15px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }
  
  .page-news__hero-content {
    margin-bottom: 30px;
  }
  
  .page-news__main-title {
    font-size: 32px;
    margin-bottom: 15px;
  }
  
  .page-news__hero-description {
    font-size: 15px;
    margin-bottom: 25px;
  }
  
  .page-news__cta-buttons {
    flex-direction: column;
    gap: 15px;
    width: 100%;
  }
  
  .page-news__cta-button {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    padding: 12px 25px;
    font-size: 16px;
    white-space: normal !important;
    word-wrap: break-word !important;
  }
  
  .page-news__hero-image-wrapper {
    margin-top: 30px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    overflow: hidden !important;
  }
  
  .page-news__hero-image {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    border-radius: 8px;
  }
  
  .page-news__latest-articles-section {
    padding: 60px 0;
  }
  
  .page-news__section-title {
    font-size: 28px;
    margin-bottom: 40px;
  }
  
  .page-news__article-grid {
    grid-template-columns: 1fr;
    gap: 25px;
  }
  
  .page-news__article-card {
    border-radius: 8px;
  }
  
  .page-news__article-image {
    height: 180px;
  }
  
  .page-news__article-content {
    padding: 20px;
  }
  
  .page-news__article-title {
    font-size: 18px;
    margin-bottom: 10px;
  }
  
  .page-news__article-excerpt {
    font-size: 14px;
    margin-bottom: 15px;
  }
  
  .page-news__pagination {
    margin-top: 40px;
    gap: 8px;
  }
  
  .page-news__pagination-item {
    width: 36px;
    height: 36px;
    font-size: 14px;
  }
  
  .page-news__pagination-item--next {
    padding: 0 15px;
  }
  
  .page-news__cta-section {
    padding: 60px 0;
  }
  
  .page-news__cta-title {
    font-size: 28px;
  }
  
  .page-news__cta-description {
    font-size: 15px;
    margin-bottom: 30px;
  }
  
  .page-news__cta-button--large {
    padding: 15px 30px;
    font-size: 18px;
    border-radius: 8px;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }
  
  /* Ensure all images are responsive and do not overflow */
  .page-news img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  
  .page-news__hero-image {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  
  .page-news__article-image {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
}

@media (max-width: 480px) {
  .page-news__main-title {
    font-size: 28px;
  }
  .page-news__section-title {
    font-size: 24px;
  }
  .page-news__cta-title {
    font-size: 24px;
  }
}