/* ============================================================
   JP MACHINERY — News Page Styles
   Extends base site design language
   ============================================================ */

/* ===================== PAGE HERO ===================== */
.news-hero {
  padding: 10rem 8vw 0;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.news-hero::before {
  content: '';
  position: absolute;
  top: -80px;
  right: -80px;
  width: 480px;
  height: 480px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(27,79,216,0.05) 0%, transparent 70%);
  pointer-events: none;
}

.news-hero::after {
  content: '';
  position: absolute;
  bottom: 40px;
  left: -40px;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(232,166,0,0.04) 0%, transparent 70%);
  pointer-events: none;
}

.news-hero-inner {
  max-width: 1350px;
  margin: 0 auto;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 3rem;
  flex-wrap: wrap;
  padding-bottom: 4rem;
}

.news-hero-left { max-width: 700px; }

.news-hero-label {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: var(--accent-blue);
  text-transform: uppercase;
  margin-bottom: 1.4rem;
}

.news-hero-heading {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 5vw, 5rem);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 1.6rem;
}

.news-hero-heading .accent-line { color: var(--accent-blue); }

.news-hero-body {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--text-secondary);
  max-width: 520px;
}

.news-hero-meta {
  display: flex;
  align-items: flex-start;
  gap: 2.5rem;
  flex-shrink: 0;
}

.news-meta-stat {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.2rem;
}

.news-meta-num {
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.5vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  line-height: 1;
}

.news-meta-label {
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  text-transform: uppercase;
  text-align: right;
}

/* ── Filter bar ── */
.news-filter-bar {
  border-top: 1px solid var(--border);
  background: var(--bg);
  position: sticky;
  top: 64px;
  z-index: 90;
}

.news-filter-inner {
  max-width: 1350px;
  margin: 0 auto;
  padding: 0 8vw;
  display: flex;
  gap: 0;
  align-items: stretch;
}

.news-filter-btn {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 1rem 1.5rem 1rem 0;
  margin-right: 2rem;
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
  white-space: nowrap;
}

.news-filter-btn:hover {
  color: var(--text-primary);
}

.news-filter-btn.active {
  color: var(--accent-blue);
  border-bottom-color: var(--accent-blue);
}

/* ===================== MAIN CONTENT AREA ===================== */
.news-main {
  padding: 5rem 8vw 6rem;
  background: var(--bg);
}

.news-main-inner {
  max-width: 1350px;
  margin: 0 auto;
}

/* ===================== FEATURED ARTICLE ===================== */
.news-featured {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 4rem;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.news-featured:hover {
  box-shadow: 0 16px 48px rgba(0,0,0,0.07);
  transform: translateY(-2px);
}

/* Featured image side */
.news-featured-image {
  position: relative;
  min-height: 420px;
  overflow: hidden;
}

/* Standard card image */
.news-card-image {
  position: relative;
  height: 200px;
  overflow: hidden;
}

/* Placeholder image backgrounds */
.news-img-bg {
  position: absolute;
  inset: 0;
  transition: transform 0.5s ease;
}

.news-featured:hover .news-img-bg,
.news-card:hover .news-img-bg {
  transform: scale(1.03);
}

.news-img-bg--blue     { background: linear-gradient(135deg, #0f2d6e 0%, #1B4FD8 100%); }
.news-img-bg--dark     { background: linear-gradient(135deg, #0d0d0d 0%, #2a2a2a 100%); }
.news-img-bg--slate    { background: linear-gradient(135deg, #1a2535 0%, #2d3f57 100%); }
.news-img-bg--blue-dim { background: linear-gradient(135deg, #1a2f5e 0%, #243d7a 100%); }
.news-img-bg--amber    { background: linear-gradient(135deg, #2a1f08 0%, #5c3d0a 100%); }

/* Subtle geometric pattern overlay */
.news-img-pattern {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 32px 32px;
  opacity: 0.6;
}

.news-img-label {
  position: absolute;
  bottom: 1.2rem;
  left: 1.5rem;
  font-family: var(--font-display);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.35);
}

/* Category badge */
.news-category-badge {
  position: absolute;
  top: 1.2rem;
  left: 1.2rem;
  font-family: var(--font-body);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 0.3rem 0.75rem;
  border-radius: 2px;
  z-index: 2;
}

.news-category-badge--exhibitions { background: rgba(27,79,216,0.18);  color: #7fa4f5; border: 1px solid rgba(27,79,216,0.25); }
.news-category-badge--industry    { background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.55); border: 1px solid rgba(255,255,255,0.1); }
.news-category-badge--products    { background: rgba(232,166,0,0.15);   color: #d4990a; border: 1px solid rgba(232,166,0,0.2); }
.news-category-badge--company     { background: rgba(255,255,255,0.06); color: rgba(255,255,255,0.4); border: 1px solid rgba(255,255,255,0.08); }

/* Featured article body */
.news-featured-body {
  padding: 3rem 3rem 3rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--bg);
  border-left: 1px solid var(--border);
}

.news-featured-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.2rem;
}

.news-date {
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  text-transform: uppercase;
}

.news-read-time {
  font-size: 0.65rem;
  font-weight: 400;
  color: var(--text-muted);
  opacity: 0.7;
}

.news-read-time::before {
  content: '·';
  margin-right: 0.5rem;
}

.news-featured-title {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.2vw, 2rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 1.2rem;
}

.news-featured-excerpt {
  font-size: 0.88rem;
  line-height: 1.8;
  color: var(--text-secondary);
  font-weight: 300;
  margin-bottom: 1.8rem;
}

.news-featured-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.news-tag {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.3rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: 2px;
  color: var(--text-muted);
  background: var(--bg-subtle);
}

.news-read-more {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-blue);
  text-decoration: none;
  transition: gap 0.2s ease;
  align-self: flex-start;
}

.news-read-more svg {
  width: 16px;
  height: 16px;
  transition: transform 0.2s ease;
}

.news-read-more:hover { gap: 0.8rem; }
.news-read-more:hover svg { transform: translateX(3px); }

/* ===================== ARTICLE GRID ===================== */
.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.news-card {
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  background: var(--bg);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
  display: flex;
  flex-direction: column;
}

.news-card:hover {
  box-shadow: 0 12px 36px rgba(0,0,0,0.06);
  transform: translateY(-3px);
}

.news-card-body {
  padding: 1.75rem 1.75rem 2rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.news-card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.news-card-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  margin-bottom: 0.85rem;
}

.news-card-excerpt {
  font-size: 0.82rem;
  line-height: 1.75;
  color: var(--text-secondary);
  font-weight: 300;
  flex: 1;
  margin-bottom: 1.5rem;
}

.news-card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-blue);
  text-decoration: none;
  transition: gap 0.2s ease;
  align-self: flex-start;
  margin-top: auto;
}

.news-card-link svg {
  width: 14px;
  height: 14px;
  transition: transform 0.2s ease;
}

.news-card-link:hover { gap: 0.7rem; }
.news-card-link:hover svg { transform: translateX(3px); }

/* ===================== EMPTY STATE ===================== */
.news-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.2rem;
  padding: 5rem 2rem;
  text-align: center;
  color: var(--text-muted);
}

.news-empty svg {
  width: 48px;
  height: 48px;
  opacity: 0.25;
}

.news-empty p {
  font-size: 0.85rem;
  font-weight: 400;
  letter-spacing: 0.05em;
  opacity: 0.5;
}

/* ===================== ANIMATIONS ===================== */
.animate-in {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.animate-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.anim-delay-1 { transition-delay: 0.1s; }
.anim-delay-2 { transition-delay: 0.2s; }
.anim-delay-3 { transition-delay: 0.3s; }

/* ===================== CONTACT / GET IN TOUCH SECTION ===================== */
.products-contact-section {
  background:
    radial-gradient(ellipse 80% 60% at 10% 30%,  rgba(27, 79, 216, 0.35) 0%, transparent 60%),
    radial-gradient(ellipse 60% 70% at 90% 80%,  rgba(15, 40, 120, 0.45) 0%, transparent 65%),
    radial-gradient(ellipse 50% 50% at 55% 10%,  rgba(60, 100, 200, 0.18) 0%, transparent 55%),
    #0b1630 !important;
}

.cta-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.85rem 2rem;
  text-decoration: none;
  border-radius: 2px;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.cta-button.cta-contact-quote {
  background: #ffffff;
  color: #0d0d0d;
  border: 1.5px solid #ffffff;
  border-radius: 10px;
}

.cta-button.cta-contact-quote:hover {
  background: var(--accent-blue);
  color: #ffffff;
  border-color: var(--accent-blue);
}

/* ===================== RESPONSIVE ===================== */
@media (max-width: 1100px) {
  .news-featured {
    grid-template-columns: 1fr;
  }

  .news-featured-image {
    min-height: 280px;
  }

  .news-featured-body {
    border-left: none;
    border-top: 1px solid var(--border);
    padding: 2.5rem 2rem;
  }

  .news-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .news-hero {
    padding: 8rem 6vw 0;
  }

  .news-hero-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 2rem;
    padding-bottom: 3rem;
  }

  .news-hero-meta {
    flex-direction: row;
    gap: 2rem;
  }

  .news-meta-stat {
    align-items: flex-start;
  }

  .news-filter-inner {
    padding: 0 6vw;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .news-filter-inner::-webkit-scrollbar { display: none; }

  .news-main {
    padding: 3rem 6vw 4rem;
  }

  .news-featured {
    margin-bottom: 2.5rem;
  }

  .news-featured-body {
    padding: 2rem 1.5rem;
  }

  .news-featured-title {
    font-size: 1.3rem;
  }

  .news-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

@media (max-width: 480px) {
  .news-filter-btn {
    padding-right: 1rem;
    margin-right: 1rem;
  }

  .news-hero-heading {
    font-size: 2.4rem;
  }
}
