/* ==========================================================================
   NEWS PAGE SPECIFIC STYLES (news.css)
   ========================================================================== */

/* --- Light Header Override (page starts with blue banner) --- */
.news-page .site-header {
  background-color: rgba(255, 255, 255, 0.97);
  border-bottom: 1px solid #e6edf7;
}

.news-page .nav-link {
  color: #123563;
}

.news-page .nav-link:hover,
.news-page .nav-link.active {
  color: var(--accent);
}

.news-page .btn-search,
.news-page .mobile-toggle {
  color: #1a202c;
}

.news-page .btn-quote {
  background-color: var(--accent);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ==========================================================================
   1. BANNER SECTION
   ========================================================================== */

.news-banner-section {
  position: relative;
  padding: 170px 0 150px 0;
  overflow: hidden;
  background-color: var(--primary-dark);
}

.news-banner-bg {
  position: absolute;
  inset: 0;
  background-image: url("../images/factory_exterior.jpg");
  background-size: cover;
  background-position: right center;
}

/* Blue fade from left so the text stays readable */
.news-banner-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 34, 92, 0.97) 20%, rgba(0, 47, 125, 0.85) 45%, rgba(0, 59, 149, 0.35) 72%, rgba(0, 59, 149, 0.1) 100%);
}

.news-banner-text {
  position: relative;
  z-index: 2;
  max-width: 560px;
}

.news-breadcrumb {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 18px;
}

.news-breadcrumb a {
  color: rgba(255, 255, 255, 0.7);
  transition: color 0.3s ease;
}

.news-breadcrumb a:hover {
  color: #ffffff;
}

.news-breadcrumb .breadcrumb-sep {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.5);
}

.news-breadcrumb .breadcrumb-current {
  color: #ffffff;
  font-weight: 600;
}

.news-banner-title {
  font-size: clamp(40px, 5vw, 64px);
  font-weight: 800;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 0;
}

.news-title-bar {
  display: block;
  width: 44px;
  height: 4px;
  border-radius: 2px;
  background-color: #ffffff;
  margin: 14px 0 22px 0;
}

.news-banner-subtitle {
  font-size: 17px;
  color: rgba(255, 255, 255, 0.85);
  max-width: 480px;
  margin-bottom: 0;
}


/* ==========================================================================
   3. NEWS GRID SECTION
   ========================================================================== */

.news-grid-section {
  padding: 70px 0 100px 0;
  background-color: var(--soft);
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
}

.news-card {
  background-color: #ffffff;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.news-card:hover {
  box-shadow: 0 18px 40px rgba(15, 34, 74, 0.12);
  transform: translateY(-4px);
}

.news-card-image {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.news-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.news-card-date {
  position: absolute;
  left: 14px;
  bottom: 14px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background-color: var(--accent);
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
  padding: 7px 12px;
  border-radius: 4px;
}

.news-card-body {
  padding: 22px 22px 24px 22px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.news-card-title {
  font-size: 16.5px;
  font-weight: 700;
  line-height: 1.45;
  color: #123563;
  margin-bottom: 12px;
}

.news-card-title a {
  color: inherit;
  transition: color 0.3s ease;
}

.news-card-title a:hover {
  color: var(--accent);
}

.news-card-excerpt {
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--muted);
  margin-bottom: 18px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-card-link {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--accent);
  transition: color 0.3s ease, gap 0.3s ease;
}

.news-card-link:hover {
  color: var(--accent-hover);
  gap: 12px;
}

/* --- Pagination --- */

.news-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 60px;
}

.page-num,
.page-next {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 42px;
  padding: 0 8px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 600;
  color: #123563;
  transition: all 0.3s ease;
}

.page-num:hover,
.page-next:hover {
  background-color: #e6edf7;
  color: var(--accent);
}

.page-num.active {
  background-color: var(--accent);
  color: #ffffff;
}

.page-dots {
  color: var(--muted);
  letter-spacing: 2px;
  padding: 0 4px;
}

/* ==========================================================================
   RESPONSIVE ADJUSTMENTS
   ========================================================================== */

@media (max-width: 1199px) {
  .news-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 991px) {
  .news-banner-section {
    padding: 130px 0 110px 0;
  }
  .news-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .news-filter-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }
}

@media (max-width: 575px) {
  .news-banner-section {
    padding: 110px 0 90px 0;
  }
  .news-grid {
    grid-template-columns: 1fr;
  }
  .news-tabs {
    gap: 8px;
  }
  .news-tab {
    padding: 8px 14px;
  }
  .news-grid-section {
    padding: 50px 0 70px 0;
  }
}
