/* ==========================================================================
   PENGUMUMAN CLIENT STYLES
   Mengikuti global.css dan memiliki hero section yang clean
   ========================================================================== */

/* Base container */
.pengumuman-client-wrap {
  min-height: 100vh;
  background: #f8f9fa;
}

/* Clean Hero Section */
.pengumuman-hero-wrap {
  background: linear-gradient(to right, #f8f9fa 0%, #e9ecef 100%);
  color: #2c3e50;
  margin-top: calc(var(--head-offset) * -1) !important;
  padding-top: calc(var(--head-offset) + 1.5rem) !important;
  padding-bottom: 3rem;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.pengumuman-hero-wrap::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 320px;
  height: 100%;
  background: url("data:image/svg+xml,%3Csvg width='320' height='100%25' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 0 L320 0 L320 100 L0 100 Z' fill='%231a73e8' opacity='0.03'/%3E%3C/svg%3E");
  z-index: 0;
}

.pengumuman-hero {
  position: relative;
  z-index: 1;
}

.pengumuman-hero h1 {
  font-size: 2.25rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: #2c3e50;
  line-height: 1.2;
}

.pengumuman-hero .lead {
  font-size: 1.05rem;
  color: #666;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Main Layout - FULL WIDTH */
.pengumuman-layout-wrap {
  width: 100%;
  max-width: 100%;
  margin: 0;
  /* top, kiri/kanan responsif, bottom sedikit lebih kecil */
  padding: 2rem clamp(1rem, 3vw, 3rem) 1.25rem;
}

.pengumuman-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

/* Featured Card - menggunakan global card style */
.featured-card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 2rem;
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow-soft);
  border-left: 4px solid #1a73e8;
  margin-bottom: 1.5rem;
  position: relative;
  overflow: hidden;
}

.featured-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(to bottom, #1a73e8, #4a90e2);
}

.featured-badge {
  display: inline-block;
  background: #e8f0fe;
  color: #1a73e8;
  padding: 0.35rem 1rem;
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1rem;
  border: 1px solid #d2e3fc;
}

.featured-title {
  font-size: 1.6rem;
  margin-bottom: 1rem;
  color: #2c3e50;
  line-height: 1.3;
}

.featured-title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

.featured-title a:hover {
  color: #1a73e8;
}

.featured-excerpt {
  color: #555;
  line-height: 1.7;
  font-size: 1rem;
  margin-bottom: 1.5rem;
}

/* Grid Layout */
.pengumuman-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

/* Cards - menggunakan global card style dengan enhancement */
.pengumuman-card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow-soft);
  transition: all 0.3s ease;
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: fadeInUp 0.5s ease forwards;
  opacity: 0;
}

.pengumuman-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
  border-color: #1a73e8;
}

.pengumuman-card--pinned {
  border-top: 3px solid #ffc107;
}

.pengumuman-card-pinned-label {
  position: absolute;
  top: -10px;
  right: 15px;
  background: #fff8e1;
  color: #856404;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid #ffeaa7;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.pengumuman-card-header {
  margin-bottom: 1rem;
  position: relative;
}

.pengumuman-card-date {
  font-size: 0.8rem;
  color: #666;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.pengumuman-card-title {
  font-size: 1.1rem;
  line-height: 1.4;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.pengumuman-card-title a {
  color: #2c3e50;
  text-decoration: none;
}

.pengumuman-card-title a:hover {
  color: #1a73e8;
}

.pengumuman-card-body {
  flex-grow: 1;
  margin-bottom: 1rem;
}

.pengumuman-card-excerpt {
  color: #666;
  line-height: 1.6;
  font-size: 0.9rem;
  margin: 0;
}

/* Sidebar Widgets */
.pengumuman-sidebar {
  order: -1;
}

.sidebar-widget {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow-soft);
}

.sidebar-widget h3 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  color: #2c3e50;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
}

/* Search Widget */
.search-widget .input-group {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid #ddd;
  transition: all 0.3s ease;
}

.search-widget .input-group:focus-within {
  border-color: #1a73e8;
  box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.1);
}

.search-widget input {
  border: none;
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
}

.search-widget input:focus {
  box-shadow: none;
}

.search-widget button {
  background: #1a73e8;
  border: none;
  color: white;
  padding: 0 1.25rem;
  transition: background 0.3s ease;
}

.search-widget button:hover {
  background: #0d62d9;
}

/* Categories Widget */
.category-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.category-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid #eee;
  transition: background 0.2s ease, padding 0.2s ease;
}

.category-item:hover {
  background: #f8f9fa;
  border-radius: var(--radius-sm);
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}

.category-item:last-child {
  border-bottom: none;
}

.category-link {
  color: #555;
  text-decoration: none;
  transition: color 0.3s;
  flex-grow: 1;
  font-size: 0.95rem;
  position: relative;
}

.category-link:hover {
  color: #1a73e8;
}

.category-count {
  background: #e9ecef;
  color: #666;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-pill);
  font-size: 0.8rem;
  min-width: 30px;
  text-align: center;
}

/* Popular Widget */
.popular-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.popular-item {
  display: flex;
  gap: 0.75rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid #eee;
  align-items: flex-start;
  transition: background 0.2s ease, padding 0.2s ease;
}

.popular-item:hover {
  background: #f8f9fa;
  border-radius: var(--radius-sm);
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}

.popular-item:last-child {
  border-bottom: none;
}

.popular-number {
  background: #f0f7ff;
  color: #1a73e8;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-pill);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.popular-title {
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
  line-height: 1.4;
  font-weight: 500;
}

.popular-title a {
  color: #2c3e50;
  text-decoration: none;
  position: relative;
}

.popular-title a:hover {
  color: #1a73e8;
}

.popular-date {
  font-size: 0.75rem;
  color: #666;
}

/* Empty State */
.pengumuman-empty {
  text-align: center;
  padding: 4rem 2rem;
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--card-border);
}

.pengumuman-empty-icon {
  font-size: 3.5rem;
  color: #dee2e6;
  margin-bottom: 1.5rem;
  opacity: 0.7;
}

/* Pagination */
.pagination-modern {
  margin-top: 1.25rem;
  /* lebih dekat ke kartu */
  margin-bottom: 0;
  /* supaya ke footer tidak ngolong */
}

.pagination-modern .pagination {
  justify-content: center;
}

.pagination-modern .page-link {
  border: 1px solid var(--card-border);
  color: #666;
  margin: 0 0.25rem;
  border-radius: var(--radius-md);
  padding: 0.5rem 0.9rem;
  transition: all 0.3s ease;
  font-size: 0.9rem;
}

.pagination-modern .page-link:hover {
  background: #f8f9fa;
  border-color: #1a73e8;
  color: #1a73e8;
}

.pagination-modern .page-item.active .page-link {
  background: #1a73e8;
  border-color: #1a73e8;
  color: white;
}

/* Animation untuk cards */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Micro-interactions underline */
.category-link::after,
.popular-title a::after,
.pengumuman-card-title a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: #1a73e8;
  transition: width 0.3s ease;
}

.category-link:hover::after,
.popular-title a:hover::after,
.pengumuman-card-title a:hover::after {
  width: 100%;
}

/* ===================================================
   MOBILE COMPACT FIX - KHUSUS UNTUK IOS/ANDROID
   =================================================== */
@media (max-width: 768px) {

  /* Hero lebih compact */
  .pengumuman-hero-wrap {
    padding: 1.5rem 0 2rem 0 !important;
    padding-top: calc(var(--head-offset) + 0.75rem) !important;
  }

  .pengumuman-hero h1 {
    font-size: 1.5rem !important;
    margin-bottom: 0.5rem !important;
    line-height: 1.3 !important;
  }

  .pengumuman-hero .lead {
    font-size: 0.875rem !important;
    line-height: 1.4 !important;
    max-width: 90% !important;
  }

  /* Layout & jarak antar section (Informasi ↔ Pengumuman) */
  .pengumuman-layout-wrap {
    padding: 1rem 0.75rem 0.75rem !important;
  }

  .pengumuman-layout {
    gap: 0.25rem !important;
    /* ini yang nge-rapetin antara sidebar & main */
  }

  .pengumuman-sidebar .sidebar-widget:last-child {
    margin-bottom: 0.25rem !important;
  }

  /* Grid pengumuman lebih rapat */
  .pengumuman-grid {
    grid-template-columns: 1fr !important;
    gap: 0.5rem !important;
    margin-top: 0.25rem !important;
    margin-bottom: 1.25rem !important;
  }

  /* Featured card lebih compact dan tidak terlalu turun */
  .featured-card {
    padding: 1.25rem !important;
    margin-top: 0 !important;
    margin-bottom: 0.75rem !important;
  }

  .featured-title {
    font-size: 1.2rem !important;
    margin-bottom: 0.75rem !important;
  }

  .featured-excerpt {
    font-size: 0.9rem !important;
    line-height: 1.5 !important;
    margin-bottom: 1rem !important;
  }

  /* Card biasa lebih compact */
  .pengumuman-card {
    padding: 1rem !important;
    margin-bottom: 0.5rem !important;
  }

  .pengumuman-card-header {
    margin-bottom: 0.75rem !important;
  }

  .pengumuman-card-title {
    font-size: 1rem !important;
    line-height: 1.3 !important;
    margin-bottom: 0.375rem !important;
  }

  .pengumuman-card-excerpt {
    font-size: 0.85rem !important;
    line-height: 1.5 !important;
  }

  /* Sidebar lebih compact */
  .sidebar-widget {
    padding: 1rem !important;
    margin-bottom: 1rem !important;
  }

  .sidebar-widget h3 {
    font-size: 1rem !important;
    margin-bottom: 0.75rem !important;
  }

  .category-item,
  .popular-item {
    padding: 0.5rem 0 !important;
  }

  .popular-content {
    min-width: 0 !important;
  }

  .popular-title {
    font-size: 0.85rem !important;
  }

  /* Search mobile */
  .pengumuman-search-mobile {
    padding: 0 0.75rem;
  }

  .pengumuman-search-mobile .sidebar-widget {
    padding: 1rem !important;
  }

  /* Empty state lebih compact */
  .pengumuman-empty {
    padding: 2rem 1rem !important;
  }

  .pengumuman-empty-icon {
    font-size: 2.5rem !important;
    margin-bottom: 1rem !important;
  }

  /* Pagination lebih kecil */
  .pagination-modern .page-link {
    padding: 0.375rem 0.75rem !important;
    font-size: 0.85rem !important;
    margin: 0 0.125rem !important;
  }
}

/* Device sangat kecil (iPhone SE, dll) */
@media (max-width: 375px) {
  .pengumuman-hero-wrap {
    padding: 1rem 0 1.5rem 0 !important;
    padding-top: calc(var(--head-offset) + 0.5rem) !important;
  }

  .pengumuman-hero h1 {
    font-size: 1.3rem !important;
  }

  .pengumuman-hero .lead {
    font-size: 0.8125rem !important;
  }

  .pengumuman-grid {
    gap: 0.5rem !important;
  }

  .featured-card,
  .pengumuman-card {
    padding: 0.875rem !important;
  }

  .pengumuman-card-title {
    font-size: 0.95rem !important;
  }

  .sidebar-widget {
    padding: 0.875rem !important;
  }
}

/* Tablet */
@media (min-width: 769px) and (max-width: 991px) {
  .pengumuman-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
}

/* Desktop Layout */
@media (min-width: 992px) {
  .pengumuman-layout {
    grid-template-columns: 3fr 1fr;
    gap: 2.5rem;
  }

  .pengumuman-sidebar {
    order: 2;
  }

  .pengumuman-layout-wrap {
    padding-left: clamp(2rem, 5vw, 4rem);
    padding-right: clamp(2rem, 5vw, 4rem);
  }
}

/* Large Desktop */
@media (min-width: 1400px) {
  .pengumuman-grid {
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  }

  .pengumuman-layout {
    gap: 3rem;
  }
}

/* ===== SUPER NEMPEL BOTTOM NAV - FINAL TUNING ===== */
@media (max-width: 768px) {

  /* buang jarak bawaan di bawah konten pengumuman */
  .pengumuman-layout-wrap,
  .pengumuman-main,
  .pengumuman-main-stack,
  .pengumuman-grid,
  .pagination-modern {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
  }

  .pagination-modern {
    margin-top: 0.25rem !important;
  }

  /* TARIK seluruh blok pengumuman ke bawah */
  .pengumuman-client-wrap {
    min-height: auto !important;
    padding-bottom: 0 !important;
    margin-bottom: -6rem !important;
    /* kalau masih kurang: -3.5rem, -4rem */
  }

  /* KECILKAN padding footer supaya tidak nambah gap */
  .pengumuman-client-wrap+.client-footer {
    padding-top: 0.25rem !important;
    padding-bottom: 0.25rem !important;
  }
}

/* ==========================================================================
   DETAIL PENGUMUMAN (SHOW PAGE)
   ========================================================================== */

.article-content {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 2rem;
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow-soft);
}

.article-header {
  border-bottom: 1px solid rgba(0, 0, 0, 0.03);
  padding-bottom: 0.75rem;
  margin-bottom: 1.5rem;
}

.article-title {
  font-size: 1.7rem;
  font-weight: 700;
  color: #2c3e50;
  line-height: 1.3;
}

.article-meta {
  font-size: 0.9rem;
  color: #6c757d;
}

.article-body .content-wrapper {
  line-height: 1.7;
  font-size: 0.97rem;
  color: #444;
}

.article-body .content-wrapper p {
  margin-bottom: 0.85rem;
}

.share-section {
  background: #f9fafb;
  border-radius: var(--radius-lg);
}

.share-buttons .btn {
  border-radius: 999px;
}

/* Related articles */
.related-card {
  border-radius: var(--radius-lg);
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.related-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.related-title {
  font-size: 0.95rem;
  line-height: 1.4;
  margin-bottom: 0.25rem;
}

.related-title a {
  color: #2c3e50;
}

.related-title a:hover {
  color: #1a73e8;
}

@media (max-width: 768px) {
  .article-content {
    padding: 1.25rem;
  }

  .article-title {
    font-size: 1.35rem;
  }

  .article-meta {
    font-size: 0.8rem;
    gap: 0.75rem !important;
  }

  .share-section {
    margin-top: 1.75rem;
  }
}
