/*
Theme Name: Solaris Newsroom by RDE
Theme URI: https://solarisbyrde.com/news
Author: Solaris by RDE
Description: Custom WordPress Theme untuk halaman Berita & Edukasi Solaris by RDE. Terintegrasi langsung dengan desain utama Solaris.
Version: 1.0.0
Text Domain: solaris-news
*/

:root {
  --sn-surface: #ffffff;
  --sn-bg-soft: #f3f5ef;
  --sn-bg-subtle: #f8faf5;
  --sn-border: #dde3da;
  --sn-border-strong: #c3cebe;
  --sn-muted: #5b6960;
  --sn-shadow-sm: 0 4px 14px rgba(7, 27, 23, 0.04);
  --sn-shadow-md: 0 14px 34px rgba(7, 27, 23, 0.08);
  --sn-shadow-lg: 0 24px 60px rgba(7, 27, 23, 0.14);
  --sn-radius-sm: 10px;
  --sn-radius-md: 16px;
  --sn-radius-lg: 24px;
}

body.solaris-news-body {
  background-color: var(--sn-bg-soft);
  color: var(--ink);
  font-family: "DM Sans", Arial, sans-serif;
}

/* Penyelarasan ukuran Header & Footer agar identik dengan halaman Products */
.solaris-news-body .navbar {
  min-height: 90px;
  gap: 24px;
}

.solaris-news-body .nav-links {
  gap: 28px;
}

.solaris-news-body .nav-link {
  font-size: 0.9rem;
}

.solaris-news-body .header-action {
  min-height: 46px;
  font-size: 0.85rem;
}

/* ==========================================================================
   1. NEWSROOM HERO SECTION
   ========================================================================== */
.sn-hero {
  position: relative;
  overflow: hidden;
  padding: 64px 0 68px;
  color: var(--white);
  background:
    radial-gradient(circle at 82% 22%, rgba(200, 239, 76, 0.2), transparent 34%),
    radial-gradient(circle at 12% 88%, rgba(28, 117, 93, 0.28), transparent 40%),
    linear-gradient(135deg, #051613 0%, #0b2822 60%, #0f352d 100%);
}

.sn-hero::before {
  position: absolute;
  inset: 0;
  opacity: 0.08;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.2) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.2) 1px, transparent 1px);
  background-size: 56px 56px;
  content: "";
  pointer-events: none;
}

.sn-hero-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.35fr 0.65fr;
  align-items: end;
  gap: 40px;
}

.sn-breadcrumb {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.72);
}

.sn-breadcrumb a:hover {
  color: var(--lime);
}

.sn-hero h1 {
  font-size: clamp(2.35rem, 4.4vw, 3.8rem);
  letter-spacing: -0.04em;
  line-height: 1.1;
}

.sn-hero h1 span {
  color: var(--lime);
}

.sn-hero p {
  color: rgba(255, 255, 255, 0.76);
  font-size: 1rem;
  line-height: 1.72;
}

/* ==========================================================================
   2. CATEGORY FILTER & SEARCH COMMAND BAR
   ========================================================================== */
.sn-toolbar-section {
  position: sticky;
  top: 92px;
  z-index: 40;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--sn-border);
  padding: 14px 0;
}

.sn-toolbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.sn-cat-pills {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.sn-cat-pills::-webkit-scrollbar {
  display: none;
}

.sn-cat-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--sn-border);
  background: var(--sn-bg-subtle);
  color: #49574f;
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.sn-cat-pill:hover {
  border-color: var(--green-600);
  color: var(--green-900);
  background: #edf4e4;
}

.sn-cat-pill.is-active {
  background: var(--green-900);
  border-color: var(--green-900);
  color: var(--lime);
  box-shadow: 0 4px 12px rgba(11, 40, 34, 0.16);
}

.sn-search-form {
  position: relative;
  width: 290px;
  flex-shrink: 0;
}

.sn-search-form input {
  width: 100%;
  height: 42px;
  padding: 0 40px 0 16px;
  border-radius: 999px;
  border: 1.5px solid var(--sn-border);
  background: #f9faf7;
  font-size: 0.84rem;
  color: var(--ink);
  transition: all 0.2s ease;
}

.sn-search-form input:focus {
  border-color: var(--green-600);
  background: var(--white);
  box-shadow: 0 0 0 4px rgba(28, 117, 93, 0.1);
}

.sn-search-btn {
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: var(--green-900);
  color: var(--lime);
  display: grid;
  place-items: center;
}

/* ==========================================================================
   3. FEATURED HEADLINE ARTICLE (SPOTLIGHT)
   ========================================================================== */
.sn-main-section {
  padding: 48px 0 84px;
}

.sn-featured-card {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  overflow: hidden;
  margin-bottom: 44px;
  border-radius: var(--sn-radius-lg);
  border: 1px solid var(--sn-border);
  background: var(--sn-surface);
  box-shadow: var(--sn-shadow-md);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.sn-featured-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--sn-shadow-lg);
}

.sn-featured-media {
  position: relative;
  min-height: 390px;
  overflow: hidden;
  background: var(--green-900);
}

.sn-featured-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.sn-featured-card:hover .sn-featured-media img {
  transform: scale(1.04);
}

.sn-featured-badge {
  position: absolute;
  top: 20px;
  left: 20px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--lime);
  color: var(--green-950);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
}

.sn-featured-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(28px, 4vw, 46px);
}

.sn-post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--sn-muted);
}

.sn-meta-cat {
  padding: 4px 10px;
  border-radius: 6px;
  background: #eaf4dc;
  color: var(--green-800);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.sn-featured-body h2 {
  font-size: clamp(1.55rem, 2.5vw, 2.15rem);
  line-height: 1.22;
  letter-spacing: -0.03em;
  margin-bottom: 14px;
}

.sn-featured-body h2 a:hover {
  color: var(--green-700);
}

.sn-featured-excerpt {
  color: var(--sn-muted);
  font-size: 0.94rem;
  line-height: 1.7;
  margin-bottom: 24px;
}

.sn-read-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  color: var(--green-800);
  font-size: 0.86rem;
  font-weight: 800;
  transition: gap 0.2s ease, color 0.2s ease;
}

.sn-read-more:hover {
  gap: 12px;
  color: var(--green-600);
}

/* ==========================================================================
   4. NEWS GRID CARDS
   ========================================================================== */
.sn-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.sn-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: var(--sn-radius-md);
  border: 1px solid var(--sn-border);
  background: var(--sn-surface);
  box-shadow: var(--sn-shadow-sm);
  transition:
    transform 0.28s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.28s ease,
    box-shadow 0.28s ease;
}

.sn-card:hover {
  transform: translateY(-6px);
  border-color: var(--green-600);
  box-shadow: var(--sn-shadow-md);
}

.sn-card-media {
  position: relative;
  height: 220px;
  overflow: hidden;
  background: linear-gradient(135deg, #0b2822, #175b49);
}

.sn-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.sn-card:hover .sn-card-media img {
  transform: scale(1.06);
}

.sn-card-cat {
  position: absolute;
  top: 14px;
  left: 14px;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(7, 27, 23, 0.86);
  border: 1px solid rgba(200, 239, 76, 0.35);
  backdrop-filter: blur(6px);
  color: var(--lime);
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.sn-card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 22px;
}

.sn-card-body h3 {
  font-size: 1.14rem;
  line-height: 1.35;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.sn-card-body h3 a:hover {
  color: var(--green-700);
}

.sn-card-excerpt {
  color: var(--sn-muted);
  font-size: 0.85rem;
  line-height: 1.65;
  margin-bottom: 18px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.sn-card-footer {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid #edf1ea;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
}

/* Pagination */
.sn-pagination {
  margin-top: 48px;
  display: flex;
  justify-content: center;
}

.sn-pagination .nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.sn-pagination .page-numbers {
  display: inline-grid;
  place-items: center;
  min-width: 40px;
  height: 40px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid var(--sn-border);
  background: var(--white);
  color: var(--ink);
  font-size: 0.85rem;
  font-weight: 700;
  transition: all 0.2s ease;
}

.sn-pagination .page-numbers.current {
  background: var(--green-900);
  border-color: var(--green-900);
  color: var(--lime);
}

.sn-pagination a.page-numbers:hover {
  border-color: var(--green-600);
  background: #eef5e6;
}

/* ==========================================================================
   5. SINGLE POST READER VIEW (DETAIL ARTIKEL)
   ========================================================================== */
.sn-article-hero {
  padding: 52px 0 90px;
  color: var(--white);
  background:
    radial-gradient(circle at 80% 20%, rgba(200, 239, 76, 0.16), transparent 32%),
    linear-gradient(135deg, #051613 0%, #0b2822 100%);
}

.sn-article-header {
  max-width: 860px;
}

.sn-article-header h1 {
  font-size: clamp(2rem, 4vw, 3.25rem);
  line-height: 1.15;
  letter-spacing: -0.035em;
  margin: 14px 0 20px;
}

.sn-article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.84rem;
}

.sn-article-wrap {
  margin-top: -54px;
  padding-bottom: 80px;
}

.sn-article-featured-img {
  margin-bottom: 40px;
  border-radius: var(--sn-radius-lg);
  overflow: hidden;
  box-shadow: var(--sn-shadow-lg);
  border: 4px solid var(--white);
  background: var(--green-900);
  max-height: 520px;
}

.sn-article-featured-img img {
  width: 100%;
  height: 100%;
  max-height: 512px;
  object-fit: cover;
}

.sn-article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  align-items: start;
  gap: 40px;
}

.sn-article-content-card {
  padding: clamp(26px, 4.5vw, 52px);
  border-radius: var(--sn-radius-lg);
  border: 1px solid var(--sn-border);
  background: var(--white);
  box-shadow: var(--sn-shadow-sm);
}

/* Rich Content Typography inside WordPress Editor */
.sn-entry-content {
  font-size: 1.04rem;
  line-height: 1.82;
  color: #2c3831;
}

.sn-entry-content p {
  color: #2c3831;
  margin-bottom: 1.45em;
}

.sn-entry-content h2,
.sn-entry-content h3,
.sn-entry-content h4 {
  color: var(--ink);
  margin: 1.8em 0 0.7em;
  line-height: 1.25;
}

.sn-entry-content h2 {
  font-size: clamp(1.45rem, 2.3vw, 1.85rem);
}

.sn-entry-content h3 {
  font-size: clamp(1.2rem, 1.9vw, 1.45rem);
}

.sn-entry-content ul,
.sn-entry-content ol {
  margin: 0 0 1.5em 1.3em;
  padding-left: 0.5em;
}

.sn-entry-content ul {
  list-style: disc;
}

.sn-entry-content ol {
  list-style: decimal;
}

.sn-entry-content li {
  margin-bottom: 0.55em;
}

.sn-entry-content blockquote {
  margin: 1.8em 0;
  padding: 22px 26px;
  border-left: 4px solid var(--green-700);
  border-radius: 0 14px 14px 0;
  background: var(--sn-bg-subtle);
  font-weight: 600;
  color: var(--green-900);
}

.sn-entry-content img,
.sn-entry-content figure {
  max-width: 100%;
  height: auto;
  border-radius: 14px;
  margin: 1.6em 0;
}

.sn-entry-content a {
  color: var(--green-700);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Tags & Share Footer */
.sn-article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid var(--sn-border);
}

.sn-article-tags a {
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--sn-bg-soft);
  color: var(--sn-muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.sn-article-tags a:hover {
  background: var(--lime);
  color: var(--green-950);
}

/* Sticky Article Sidebar */
.sn-article-sidebar {
  position: sticky;
  top: 112px;
  display: grid;
  gap: 22px;
}

.sn-widget {
  padding: 24px;
  border-radius: var(--sn-radius-md);
  border: 1px solid var(--sn-border);
  background: var(--white);
  box-shadow: var(--sn-shadow-sm);
}

.sn-widget h4 {
  font-size: 0.88rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--green-900);
  margin-bottom: 14px;
}

.sn-share-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.sn-share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--sn-border);
  background: var(--sn-bg-subtle);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ink);
  transition: all 0.2s ease;
}

.sn-share-btn:hover {
  background: var(--green-900);
  border-color: var(--green-900);
  color: var(--lime);
}

.sn-widget-cta {
  background: linear-gradient(145deg, #0b2822 0%, #144338 100%);
  border-color: var(--green-800);
  color: var(--white);
}

.sn-widget-cta h4 {
  color: var(--lime);
}

.sn-widget-cta p {
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.84rem;
  margin-bottom: 18px;
}

/* Related Posts */
.sn-related-section {
  padding: 64px 0 80px;
  background: var(--white);
  border-top: 1px solid var(--sn-border);
}

.sn-related-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
}

/* Responsive Breakpoints */
@media (max-width: 1024px) {
  .solaris-news-body .navbar {
    min-height: 80px;
  }

  .sn-toolbar-section {
    top: 80px;
  }

  .sn-hero-inner,
  .sn-featured-card,
  .sn-article-layout {
    grid-template-columns: 1fr;
  }

  .sn-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sn-article-sidebar {
    position: static;
  }
}

@media (max-width: 780px) {
  .solaris-news-body .navbar {
    min-height: 74px;
  }

  .solaris-news-body .logo-img {
    height: 56px;
  }

  .sn-toolbar-section {
    top: 74px;
  }

  .sn-toolbar-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .sn-search-form {
    width: 100%;
  }

  .sn-featured-media {
    min-height: 250px;
  }

  .sn-grid {
    grid-template-columns: 1fr;
  }
}

body.admin-bar .header { top: 32px; }
@media (max-width: 782px) { body.admin-bar .header { top: 46px; } }