/* style/news.css */

/* Variables */
:root {
  --primary-color: #FFD700;
  --secondary-color: #000000;
  --text-color-dark: #333333;
  --text-color-light: #ffffff;
  --background-light: #f5f5f5;
  --background-dark: #1a1a1a;
  --border-color: #e0e0e0;
}

/* Base styles for the news page content */
.page-news {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: var(--text-color-dark);
  background-color: #ffffff; /* Default light background, text will be dark */
}

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

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

.page-news__section-title::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background-color: var(--primary-color);
  border-radius: 2px;
}

.page-news__section-description {
  font-size: 18px;
  color: #666666;
  text-align: center;
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

/* Hero Section */
.page-news__hero-section {
  position: relative;
  width: 100%;
  height: 600px; /* Fixed height for desktop */
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  padding-top: var(--header-offset, 120px); /* Ensure content is below fixed header */
}

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

.page-news__hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6); /* Dark overlay for text readability */
  z-index: 2;
}

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

.page-news__main-title {
  font-size: 52px;
  font-weight: 900;
  margin-bottom: 20px;
  line-height: 1.2;
  color: var(--primary-color);
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

.page-news__hero-description {
  font-size: 20px;
  margin-bottom: 40px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  color: #f0f0f0;
}

.page-news__hero-cta-button {
  display: inline-block;
  padding: 18px 45px;
  background: var(--primary-color);
  color: var(--secondary-color);
  text-decoration: none;
  border-radius: 50px;
  font-size: 20px;
  font-weight: bold;
  transition: all 0.3s ease;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  border: none;
  cursor: pointer;
}

.page-news__hero-cta-button:hover {
  background: #e6c200;
  transform: translateY(-3px);
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.4);
}

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

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

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

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

.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: 10px;
  line-height: 1.3;
}

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

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

.page-news__article-excerpt {
  font-size: 16px;
  color: #666666;
  margin-bottom: 15px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

.page-news__read-more-button {
  display: inline-block;
  padding: 10px 25px;
  background: var(--primary-color);
  color: var(--secondary-color);
  text-decoration: none;
  border-radius: 5px;
  font-weight: 600;
  font-size: 15px;
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.page-news__read-more-button:hover {
  background: #e6c200;
  transform: translateY(-2px);
}

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

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

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

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

.page-news__pagination-prev, .page-news__pagination-next {
  border-radius: 5px;
  width: auto;
  padding: 0 15px;
}

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

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

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

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

.page-news__cta-button {
  display: inline-block;
  padding: 15px 35px;
  background: var(--primary-color);
  color: var(--secondary-color);
  text-decoration: none;
  border-radius: 50px;
  font-size: 18px;
  font-weight: bold;
  transition: all 0.3s ease;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
  margin: 0 10px;
  border: none;
  cursor: pointer;
}

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

.page-news__cta-button--large {
  padding: 20px 50px;
  font-size: 22px;
}

.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(--secondary-color);
  box-shadow: 0 8px 20px rgba(255, 215, 0, 0.3);
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-news__hero-section {
    height: 500px;
  }

  .page-news__main-title {
    font-size: 42px;
  }

  .page-news__hero-description {
    font-size: 18px;
  }

  .page-news__hero-cta-button {
    padding: 15px 35px;
    font-size: 18px;
  }

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

  .page-news__section-description {
    font-size: 16px;
  }

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

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

@media (max-width: 768px) {
  .page-news__hero-section {
    height: 400px;
    padding-top: var(--header-offset, 120px) !important; /* Mobile offset */
  }

  .page-news__hero-content {
    padding: 15px;
  }

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

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

  .page-news__hero-cta-button {
    padding: 12px 30px;
    font-size: 16px;
  }

  .page-news__latest-articles-section,
  .page-news__cta-section {
    padding: 60px 0;
  }

  .page-news__container {
    padding: 0 15px;
  }

  .page-news__section-title {
    font-size: 26px;
    margin-bottom: 15px;
  }

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

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

  .page-news__article-card {
    margin-bottom: 20px;
  }

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

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

  .page-news__read-more-button {
    padding: 8px 20px;
    font-size: 14px;
  }

  .page-news__pagination-item {
    width: 40px;
    height: 40px;
    font-size: 15px;
  }

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

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

  .page-news__cta-button {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    margin: 10px 0 !important;
  }
  
  .page-news__cta-content {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .page-news__cta-button--large {
    padding: 15px 30px;
    font-size: 18px;
  }

  /* Image and video responsiveness */
  .page-news img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  
  .page-news__hero-image {
    max-width: 100% !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important; /* Ensure hero image covers */
  }

  .page-news__article-image {
    height: 180px !important;
    object-fit: cover !important;
  }

  .page-news__hero-section,
  .page-news__latest-articles-section .page-news__container,
  .page-news__cta-section .page-news__container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
  }
  
  .page-news__articles-grid {
    overflow-x: hidden !important;
  }
}