/* ===== PORTAL NEWS STYLES (MOBILE-FIRST & NO-CROP IMAGES) ===== */

:root {
  --news-primary: #e53935;
  --news-primary-hover: #c62828;
  --news-dark: #0f172a;
  --news-gray: #64748b;
  --news-light: #f8fafc;
  --news-border: #e2e8f0;
  --news-card-radius: 16px;
}

/* Container */
.news-container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header / Hero Section */
.news-hero-section {
  padding: 32px 0 16px;
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
  border-bottom: 1px solid var(--news-border);
}

.news-hero-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 24px;
}

.news-brand-eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--news-primary);
  margin-bottom: 6px;
}

.news-main-title {
  font-size: 2.1rem;
  font-weight: 800;
  color: var(--news-dark);
  line-height: 1.25;
  margin: 0;
  letter-spacing: -0.02em;
}

.news-main-desc {
  font-size: 0.98rem;
  color: var(--news-gray);
  margin-top: 8px;
  max-width: 620px;
  line-height: 1.5;
}

/* Search Bar */
.news-search-form {
  position: relative;
  width: 100%;
  max-width: 360px;
}

.news-search-input {
  width: 100%;
  padding: 12px 18px 12px 42px;
  border-radius: 999px;
  border: 1px solid var(--news-border);
  background: #ffffff;
  font-size: 0.92rem;
  outline: none;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.news-search-input:focus {
  border-color: var(--news-primary);
  box-shadow: 0 0 0 3px rgba(229, 57, 53, 0.15);
}

.news-search-icon {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  pointer-events: none;
}

/* Category Filter Pills (Native App Style Horizontal Swipe) */
.news-categories-wrap {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 8px 0 16px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.news-categories-wrap::-webkit-scrollbar {
  display: none;
}

.news-cat-pill {
  display: inline-flex;
  align-items: center;
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 600;
  white-space: nowrap;
  text-decoration: none;
  color: #475569;
  background: #f1f5f9;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.news-cat-pill:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.news-cat-pill.is-active {
  background: var(--news-primary);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(229, 57, 53, 0.25);
}

/* ===== BREAKING / FEATURED NEWS CARD ===== */
.breaking-card-section {
  padding: 24px 0 16px;
}

.breaking-news-card {
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
  border: 1px solid var(--news-border);
  text-decoration: none;
  color: inherit;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.breaking-news-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.1);
}

/* Media Box with Smart Blur Backdrop (Never Crops Subject) */
.breaking-img-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 460px;
  background: #0f172a;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.media-blur-bg {
  position: absolute;
  inset: -15px;
  background-size: cover;
  background-position: center;
  filter: blur(20px);
  opacity: 0.45;
  transform: scale(1.1);
}

.breaking-img {
  position: relative;
  z-index: 1;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  transition: transform 0.35s ease;
}

.breaking-news-card:hover .breaking-img {
  transform: scale(1.02);
}

.breaking-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 2;
  background: var(--news-primary);
  color: #ffffff;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 6px 14px;
  border-radius: 999px;
  box-shadow: 0 4px 12px rgba(229, 57, 53, 0.45);
}

.breaking-content {
  padding: 28px 32px;
}

.breaking-top-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.breaking-cat {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--news-primary);
}

.breaking-time {
  font-size: 0.82rem;
  color: #94a3b8;
}

.breaking-title {
  font-size: 1.65rem;
  font-weight: 800;
  line-height: 1.35;
  color: var(--news-dark);
  margin: 0 0 12px;
  letter-spacing: -0.01em;
}

.breaking-excerpt {
  font-size: 0.98rem;
  line-height: 1.6;
  color: #475569;
  margin: 0 0 20px;
}

.breaking-footer-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid #f1f5f9;
  font-size: 0.85rem;
  color: #64748b;
}

.breaking-author-tag {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--news-dark);
}

.author-mini-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #e2e8f0;
  color: #334155;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
}

.breaking-meta-info {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #94a3b8;
}

/* ===== SECTION HEADINGS ===== */
.news-section-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 36px 0 20px;
}

.news-section-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--news-dark);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
}

.news-section-title::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 20px;
  background: var(--news-primary);
  border-radius: 4px;
}

/* ===== TRENDING NEWS GRID ===== */
.trending-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-bottom: 36px;
}

.trending-card {
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border-radius: var(--news-card-radius);
  border: 1px solid var(--news-border);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: all 0.25s ease;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.02);
}

.trending-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
}

.trending-thumb-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  background: #0f172a;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.trending-thumb {
  position: relative;
  z-index: 1;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.trending-card:hover .trending-thumb {
  transform: scale(1.03);
}

.trending-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.trending-badge {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--news-primary);
  text-transform: uppercase;
  margin-bottom: 6px;
}

.trending-title {
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--news-dark);
  line-height: 1.4;
  margin: 0 0 12px;
  flex-grow: 1;
}

.trending-meta {
  font-size: 0.78rem;
  color: #94a3b8;
  display: flex;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid #f1f5f9;
}

/* ===== ARTICLES GRID ===== */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
  margin-bottom: 45px;
}

.article-card {
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border-radius: var(--news-card-radius);
  border: 1px solid var(--news-border);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: all 0.25s ease;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.02);
}

.article-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
}

.article-thumb-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  background: #0f172a;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.article-thumb {
  position: relative;
  z-index: 1;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.article-card:hover .article-thumb {
  transform: scale(1.03);
}

.article-card-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.article-cat {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--news-primary);
  margin-bottom: 8px;
  text-transform: uppercase;
}

.article-title {
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.4;
  color: var(--news-dark);
  margin: 0 0 10px;
}

.article-snippet {
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--news-gray);
  margin: 0 0 16px;
  flex-grow: 1;
}

.article-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: #94a3b8;
  border-top: 1px solid #f1f5f9;
  padding-top: 12px;
}

/* Empty State */
.news-empty-state {
  text-align: center;
  padding: 50px 20px;
  background: #ffffff;
  border-radius: var(--news-card-radius);
  border: 1px dashed var(--news-border);
  margin: 30px 0;
}

.news-empty-icon {
  font-size: 2.8rem;
  color: #cbd5e1;
  margin-bottom: 10px;
}

/* ===== ARTICLE DETAIL PAGE ===== */
.article-detail-wrap {
  padding: 30px 0 60px;
}

.article-back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--news-primary);
  text-decoration: none;
  margin-bottom: 22px;
  transition: gap 0.2s ease;
}

.article-back-link:hover {
  gap: 12px;
  color: var(--news-primary-hover);
}

.article-header {
  max-width: 840px;
  margin: 0 auto 24px;
}

.article-header-cat {
  display: inline-block;
  background: rgba(229, 57, 53, 0.1);
  color: var(--news-primary);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 999px;
  margin-bottom: 14px;
}

.article-header-title {
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1.28;
  color: var(--news-dark);
  margin: 0 0 18px;
  letter-spacing: -0.01em;
}

.article-author-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  border-top: 1px solid var(--news-border);
  border-bottom: 1px solid var(--news-border);
}

.author-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--news-primary), #ff8a80);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
}

.author-details {
  display: flex;
  flex-direction: column;
}

.author-name {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--news-dark);
}

.article-published-time {
  font-size: 0.8rem;
  color: #94a3b8;
}

.article-hero-media {
  position: relative;
  max-width: 960px;
  margin: 0 auto 30px;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.08);
  aspect-ratio: 16 / 9;
  background: #0f172a;
  display: flex;
  align-items: center;
  justify-content: center;
}

.article-hero-media img {
  position: relative;
  z-index: 1;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

.article-body-content {
  max-width: 820px;
  margin: 0 auto;
  font-size: 1.05rem;
  line-height: 1.8;
  color: #334155;
}

.article-lead-excerpt {
  font-size: 1.15rem;
  font-weight: 500;
  color: #1e293b;
  line-height: 1.75;
  margin-bottom: 26px;
  padding-bottom: 20px;
  border-bottom: 1px solid #f1f5f9;
}

.article-body-content p {
  margin-bottom: 20px;
}

.article-body-content h2,
.article-body-content h3 {
  color: var(--news-dark);
  margin: 32px 0 14px;
  font-weight: 700;
}

.article-body-content ul,
.article-body-content ol {
  margin: 0 0 22px 20px;
}

.article-body-content li {
  margin-bottom: 8px;
}

.article-body-content blockquote {
  border-left: 4px solid var(--news-primary);
  background: #f8fafc;
  padding: 16px 20px;
  margin: 24px 0;
  border-radius: 0 10px 10px 0;
  font-style: italic;
  color: #475569;
}

/* Related News */
.related-news-section {
  max-width: 960px;
  margin: 50px auto 0;
  padding-top: 35px;
  border-top: 1px solid var(--news-border);
}

/* ===== MOBILE & RESPONSIVE DESIGN (DEVICE HP) ===== */
@media (max-width: 768px) {
  .news-container {
    padding: 0 20px;
  }

  .news-hero-section {
    padding: 24px 0 12px;
  }

  .news-hero-top {
    margin-bottom: 16px;
    gap: 16px;
  }

  .news-main-title {
    font-size: 1.6rem;
  }

  .news-main-desc {
    font-size: 0.9rem;
  }

  .news-search-form {
    max-width: 100%;
  }

  .breaking-card-section {
    padding: 16px 0 12px;
  }

  .breaking-img-wrap {
    aspect-ratio: 16 / 10;
  }

  .breaking-content {
    padding: 20px 16px;
  }

  .breaking-title {
    font-size: 1.28rem;
    line-height: 1.35;
    margin-bottom: 10px;
  }

  .breaking-excerpt {
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 14px;
  }

  .breaking-footer-meta {
    font-size: 0.8rem;
    padding-top: 12px;
  }

  .news-section-heading {
    margin: 28px 0 16px;
  }

  .news-section-title {
    font-size: 1.2rem;
  }

  .trending-grid {
    grid-template-columns: 1fr;
    gap: 16px;
    margin-bottom: 28px;
  }

  .articles-grid {
    grid-template-columns: 1fr;
    gap: 18px;
    margin-bottom: 35px;
  }

  .article-card-body,
  .trending-body {
    padding: 16px;
  }

  .article-title {
    font-size: 1.05rem;
  }

  .article-snippet {
    font-size: 0.88rem;
    margin-bottom: 12px;
  }

  /* ARTICLE DETAIL KHUSUS HP - LEGA & TIDAK DEMPET */
  .article-detail-wrap {
    padding: 20px 0 120px; /* Jarak lega di bawah agar teks tidak tertutup WhatsApp floating */
  }

  .article-back-link {
    font-size: 0.86rem;
    margin-bottom: 18px;
    padding: 4px 0;
  }

  .article-header {
    margin-bottom: 20px;
  }

  .article-header-cat {
    font-size: 0.74rem;
    padding: 5px 12px;
    margin-bottom: 12px;
  }

  .article-header-title {
    font-size: clamp(1.35rem, 5.2vw, 1.7rem);
    line-height: 1.36;
    margin-bottom: 16px;
    letter-spacing: -0.015em;
  }

  .article-author-card {
    padding: 12px 0;
    gap: 12px;
    margin-bottom: 22px;
  }

  .author-avatar {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }

  .author-name {
    font-size: 0.88rem;
  }

  .article-published-time {
    font-size: 0.76rem;
    line-height: 1.4;
  }

  .article-hero-media {
    aspect-ratio: 16 / 10;
    border-radius: 16px;
    margin-bottom: 26px;
  }

  .article-lead-excerpt {
    font-size: 1.02rem;
    line-height: 1.7;
    margin-bottom: 22px;
    padding-bottom: 18px;
  }

  .article-body-content {
    font-size: 0.96rem;
    line-height: 1.78;
  }

  .article-body-content p {
    margin-bottom: 18px;
  }

  .article-body-content h2,
  .article-body-content h3 {
    font-size: 1.25rem;
    margin: 28px 0 12px;
  }
}
