/* ARTIKEL & INSIGHT PAGE STYLES */

/* 1. MAIN ARTICLES SECTION */
.artikel-section {
  padding: 85px 8%;
  max-width: 1300px;
  margin: 0 auto;
}

.filter-box {
  background: white;
  padding: 24px 30px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1.5px solid #e2e8f0;
  margin-bottom: 40px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.search-input-wrapper {
  position: relative;
  width: 100%;
}

.search-input-wrapper i {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-secondary);
  font-size: 16px;
}

.search-input-wrapper input {
  width: 100%;
  padding: 14px 20px 14px 48px;
  border-radius: var(--radius-md);
  border: 2px solid #e2e8f0;
  font-size: 15px;
  outline: none;
  background: var(--bg-main);
  color: var(--text-primary);
  transition: var(--transition);
}

.search-input-wrapper input:focus {
  border-color: var(--primary);
  background: white;
}

.category-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tab-btn {
  background: var(--bg-main);
  border: 1px solid #cbd5e1;
  padding: 8px 18px;
  border-radius: 20px;
  font-weight: 700;
  font-size: 13.5px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
}

.tab-btn:hover, .tab-btn.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

/* 2. BALANCED ARTIKEL GRID */
.artikel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 28px;
}

.art-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 30px;
  box-shadow: var(--shadow-sm);
  border: 1.5px solid #e2e8f0;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.art-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
}

.art-badge {
  display: inline-block;
  background: #dcfce7;
  color: #15803d;
  font-weight: 800;
  font-size: 12.5px;
  padding: 4px 14px;
  border-radius: 20px;
  margin-bottom: 16px;
  width: fit-content;
}

.badge-b3 {
  background: #fee2e2 !important;
  color: #ef4444 !important;
}

.badge-dampak {
  background: #dbeafe !important;
  color: #2563eb !important;
}

.badge-kompos {
  background: #fef3c7 !important;
  color: #d97706 !important;
}

.art-card h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 21px;
  color: var(--text-primary);
  margin-bottom: 12px;
  line-height: 1.35;
}

.art-card p {
  color: var(--text-secondary);
  font-size: 14.5px;
  line-height: 1.6;
  margin-bottom: 24px;
  flex: 1;
}

.art-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px dashed #e2e8f0;
  padding-top: 16px;
}

.art-footer span {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}

.art-footer button {
  background: transparent;
  border: none;
  color: var(--primary);
  font-weight: 800;
  font-size: 14px;
  cursor: pointer;
  transition: var(--transition);
}

.art-footer button:hover {
  color: var(--primary-dark);
  transform: translateX(4px);
}

/* 3. MEDIA EDUKASI VIDEO YOUTUBE STYLES */
.video-section {
  padding: 85px 8%;
  background: var(--bg-main);
  border-top: 1.5px solid #e2e8f0;
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 28px;
  max-width: 1300px;
  margin: 35px auto 0;
}

.video-card {
  background: white;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1.5px solid #e2e8f0;
  transition: var(--transition);
}

.video-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
}

.video-wrapper {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  background: #0f172a;
}

.video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-info {
  padding: 22px 20px;
}

.video-info h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 18px;
  color: var(--forest);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.text-red {
  color: #ef4444;
}

.video-info p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.55;
}

/* 4. MODAL READ ARTICLE */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(8px);
  z-index: 2000;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.art-modal-content {
  background: white;
  width: 100%;
  max-width: 700px;
  max-height: 85vh;
  overflow-y: auto;
  padding: 40px;
  border-radius: var(--radius-lg);
  box-shadow: 0 25px 50px rgba(0,0,0,0.3);
  position: relative;
  text-align: left;
}

.close-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 30px;
  cursor: pointer;
  color: var(--text-secondary);
}

.modal-category-badge {
  background: var(--primary-light);
  color: var(--primary-dark);
  font-size: 12.5px;
  font-weight: 800;
  padding: 4px 14px;
  border-radius: 20px;
  display: inline-block;
  margin-bottom: 12px;
}

.art-modal-content h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 26px;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.modal-meta {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e2e8f0;
}

.modal-body-text p {
  color: var(--text-secondary);
  font-size: 15.5px;
  line-height: 1.8;
  margin-bottom: 16px;
}

/* 5. RESPONSIVE BREAKPOINTS */
@media (max-width: 768px) {
  .artikel-section, .video-section {
    padding: 45px 16px;
  }

  .artikel-grid, .video-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .art-card, .video-card {
    border-radius: 20px;
  }

  .filter-box {
    padding: 18px;
    border-radius: 20px;
  }

  .art-modal-content {
    padding: 24px 18px;
  }
}
