/**
 * Portal Berita SALUT UT Samarinda - Design System & Stylesheet
 * Standard: Impeccable Craft & Modern Editorial UI
 * Palet Warna: Institusi Universitas Terbuka (Navy Blue #0b1c3d & UT Gold #facc15)
 */

:root {
  /* Brand Tokens */
  --portal-primary: #0b1c3d;
  --portal-primary-hover: #122854;
  --portal-primary-light: #1e3a8a;
  --portal-accent: #facc15;
  --portal-accent-hover: #eab308;
  --portal-accent-dark: #ca8a04;
  --portal-accent-glow: rgba(250, 204, 21, 0.25);

  /* Neutrals & Surfaces (Light Theme) */
  --portal-bg: #f8fafc;
  --portal-surface: #ffffff;
  --portal-surface-secondary: #f1f5f9;
  --portal-border: #e2e8f0;
  --portal-border-subtle: #edf2f7;

  /* Text Colors */
  --portal-text: #0f172a;
  --portal-text-muted: #64748b;
  --portal-text-light: #94a3b8;
  --portal-text-inverse: #ffffff;

  /* Badges & Accents */
  --badge-blue-bg: #eff6ff;
  --badge-blue-text: #1d4ed8;
  --badge-yellow-bg: #fef9c3;
  --badge-yellow-text: #854d0e;
  --badge-green-bg: #f0fdf4;
  --badge-green-text: #15803d;

  /* Shadows & Radius */
  --portal-radius-sm: 8px;
  --portal-radius-md: 12px;
  --portal-radius-lg: 18px;
  --portal-radius-xl: 24px;
  --portal-radius-pill: 9999px;

  --portal-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.04);
  --portal-shadow: 0 4px 12px -2px rgba(15, 23, 42, 0.06), 0 2px 4px -2px rgba(15, 23, 42, 0.04);
  --portal-shadow-hover: 0 12px 24px -4px rgba(15, 23, 42, 0.12), 0 4px 8px -2px rgba(15, 23, 42, 0.06);

  /* Transitions */
  --portal-transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Dark Theme Overrides */
[data-theme="dark"] {
  --portal-bg: #070d19;
  --portal-surface: #0f172a;
  --portal-surface-secondary: #1e293b;
  --portal-border: #1e293b;
  --portal-border-subtle: #1e293b;

  --portal-text: #f8fafc;
  --portal-text-muted: #94a3b8;
  --portal-text-light: #64748b;

  --badge-blue-bg: rgba(30, 58, 138, 0.4);
  --badge-blue-text: #93c5fd;
  --badge-yellow-bg: rgba(202, 138, 4, 0.3);
  --badge-yellow-text: #fde047;
  --badge-green-bg: rgba(22, 101, 52, 0.3);
  --badge-green-text: #86efac;

  --portal-shadow: 0 4px 12px -2px rgba(0, 0, 0, 0.3);
  --portal-shadow-hover: 0 12px 24px -4px rgba(0, 0, 0, 0.45);
}

/* Base & Reset */
body {
  background-color: var(--portal-bg);
  color: var(--portal-text);
  font-family: 'Public Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  transition: background-color 0.3s ease, color 0.3s ease;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--portal-transition);
}

/* Accessibility: Skip link */
.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  background: var(--portal-accent);
  color: var(--portal-primary);
  padding: 0.5rem 1rem;
  font-weight: 700;
  border-radius: var(--portal-radius-sm);
  z-index: 9999;
  transition: top 0.2s ease;
}
.skip-link:focus {
  top: 1rem;
}

/* ==========================================================================
   1. NAVBAR & HEADER
   ========================================================================== */
.portal-navbar {
  background-color: var(--portal-primary);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.6rem 0;
  position: sticky;
  top: 0;
  z-index: 1030;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.portal-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.portal-brand-logo-img {
  height: 82px;
  width: auto;
  max-width: 360px;
  object-fit: contain;
  transition: var(--portal-transition);
  display: block;
}

@media (max-width: 767.98px) {
  .portal-brand-logo-img {
    height: 56px;
    max-width: 250px;
  }
}

.portal-brand:hover .portal-brand-logo-img {
  opacity: 0.95;
}

.portal-brand-logo {
  height: 42px;
  width: auto;
  object-fit: contain;
}

.portal-brand-text {
  display: flex;
  flex-direction: column;
}

.portal-brand-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.5px;
  line-height: 1.1;
}

.portal-brand-title span {
  color: var(--portal-accent);
}

.portal-brand-subtitle {
  font-size: 0.65rem;
  font-weight: 600;
  color: #94a3b8;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

/* Nav Menu Items */
.portal-nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.portal-nav-item {
  position: relative;
}

.portal-nav-link {
  color: #cbd5e1;
  font-size: 0.925rem;
  font-weight: 500;
  padding: 0.5rem 0.25rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.portal-nav-link:hover,
.portal-nav-link.active {
  color: #ffffff;
}

.portal-nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 3px;
  background-color: var(--portal-accent);
  border-radius: var(--portal-radius-pill);
}

/* Hide duplicate Bootstrap caret ::after so only the line chevron appears */
.portal-nav-link.dropdown-toggle::after {
  display: none !important;
}

.portal-nav-link.dropdown-toggle .bi-chevron-down {
  transition: transform 0.25s ease;
}

.portal-nav-link.dropdown-toggle[aria-expanded="true"] .bi-chevron-down,
.portal-nav-link.dropdown-toggle.show .bi-chevron-down {
  transform: rotate(180deg);
}

/* Dropdown Menu */
.portal-dropdown-menu {
  background-color: var(--portal-primary);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--portal-radius-md);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
  padding: 0.5rem;
  min-width: 200px;
}

.portal-dropdown-item {
  color: #cbd5e1;
  padding: 0.5rem 0.75rem;
  border-radius: var(--portal-radius-sm);
  font-size: 0.875rem;
  display: block;
}

.portal-dropdown-item:hover {
  background-color: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

/* Navbar Search Pill */
.portal-nav-search {
  position: relative;
  width: 260px;
}

.portal-search-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--portal-radius-pill);
  padding: 0.45rem 2.25rem 0.45rem 1rem;
  font-size: 0.825rem;
  color: #ffffff;
  outline: none;
  transition: var(--portal-transition);
}

.portal-search-input::placeholder {
  color: #94a3b8;
  font-size: 0.8rem;
}

.portal-search-input:focus {
  background: rgba(255, 255, 255, 0.14);
  border-color: var(--portal-accent);
  box-shadow: 0 0 0 3px var(--portal-accent-glow);
}

.portal-search-btn {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 0 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.portal-search-btn:hover {
  color: var(--portal-accent);
}

/* Theme Toggle & Mobile Toggles */
.btn-icon-nav {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #e2e8f0;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--portal-transition);
}

.btn-icon-nav:hover {
  background: rgba(255, 255, 255, 0.18);
  color: var(--portal-accent);
  border-color: var(--portal-accent);
}

/* ==========================================================================
   2. HERO HEADLINE SLIDER
   ========================================================================== */
.hero-headline-card {
  background-color: var(--portal-primary);
  border-radius: var(--portal-radius-xl);
  overflow: hidden;
  position: relative;
  min-height: 380px;
  box-shadow: 0 10px 30px -5px rgba(11, 28, 61, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.08);
  touch-action: pan-y;
  -webkit-user-select: none;
  user-select: none;
}

/* Plain image layout - no decorative graphic stripes or polygonal shapes */
.hero-headline-card::before,
.hero-headline-card::after {
  display: none !important;
  content: none !important;
}

.hero-slider-track {
  display: grid;
  grid-template-areas: "slide";
  position: relative;
  width: 100%;
  min-height: 400px;
}

.hero-slide {
  grid-area: slide;
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 400px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.4s ease, visibility 0.4s ease;
  z-index: 1;
}

.hero-slide.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  z-index: 2;
}

.hero-content {
  padding: 2.75rem 2.5rem;
  z-index: 3;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 65%;
  height: 100%;
}

.badge-headline {
  background-color: var(--portal-accent);
  color: #0f172a;
  font-size: 0.775rem;
  font-weight: 700;
  padding: 0.35rem 0.85rem;
  border-radius: var(--portal-radius-pill);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  width: fit-content;
  margin-bottom: 1rem;
  box-shadow: 0 2px 8px rgba(250, 204, 21, 0.4);
}

.hero-title {
  font-size: 1.85rem;
  font-weight: 800;
  line-height: 1.25;
  color: #ffffff;
  margin-bottom: 0.85rem;
  letter-spacing: -0.5px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.hero-title a:hover {
  color: var(--portal-accent);
}

.hero-excerpt {
  font-size: 0.9rem;
  color: #e2e8f0;
  line-height: 1.55;
  margin-bottom: 1.25rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.4);
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  font-size: 0.8rem;
  color: #cbd5e1;
  margin-bottom: 1.5rem;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

.hero-meta-item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.btn-hero-cta {
  background-color: var(--portal-accent);
  color: #0f172a;
  font-weight: 700;
  font-size: 0.875rem;
  padding: 0.65rem 1.4rem;
  border-radius: var(--portal-radius-pill);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  width: fit-content;
  box-shadow: 0 4px 14px rgba(250, 204, 21, 0.4);
  transition: var(--portal-transition);
}

.btn-hero-cta:hover {
  background-color: var(--portal-accent-hover);
  color: #000000;
}

.hero-image-wrapper {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  overflow: hidden;
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(11, 28, 61, 0.88) 0%,
    rgba(11, 28, 61, 0.65) 35%,
    rgba(11, 28, 61, 0.15) 55%,
    transparent 70%
  );
  z-index: 2;
  pointer-events: none;
}

.hero-slider-controls {
  position: absolute;
  bottom: 1.25rem;
  right: 2rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  z-index: 10;
}

.slider-btn {
  background: rgba(11, 28, 61, 0.75);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #ffffff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.slider-btn:hover {
  background: var(--portal-accent);
  color: #0f172a;
  border-color: var(--portal-accent);
}

.slider-dots {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-left: 0.4rem;
}

.slider-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: all 0.3s ease;
}

.slider-dot.active {
  width: 22px;
  border-radius: var(--portal-radius-pill);
  background: var(--portal-accent);
}

/* ==========================================================================
   3. SECTION HEADERS & TITLE BARS
   ========================================================================== */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin: 0;
}

.title-bar {
  width: 5px;
  height: 22px;
  background-color: var(--portal-accent);
  border-radius: var(--portal-radius-pill);
  display: inline-block;
}

.section-title h2,
.section-title h3 {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--portal-text);
  margin: 0;
  letter-spacing: -0.3px;
}

.view-all-link {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--portal-text-muted);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.view-all-link:hover {
  color: var(--portal-primary-light);
}

.title-bar-blue {
  background-color: #2563eb !important;
}

.section-subtitle {
  font-size: 0.85rem;
  color: var(--portal-text-muted);
  margin-top: 0.35rem;
  margin-bottom: 0;
  line-height: 1.45;
}

/* ==========================================================================
   4. BERITA & INFORMASI TERBARU (3-COLUMN MAGAZINE GRID)
   ========================================================================== */
.news-grid-card {
  background-color: var(--portal-surface);
  border: 1px solid var(--portal-border);
  border-radius: var(--portal-radius-lg);
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: border-color 0.2s ease;
}

.news-grid-card:hover {
  border-color: rgba(37, 99, 235, 0.35);
}

.news-card-thumb-wrapper {
  position: relative;
  overflow: hidden;
  width: 100%;
  background-color: var(--portal-surface-secondary);
}

.news-card-thumb-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.news-thumb-col1-main {
  height: 200px;
}

.news-thumb-col1-sub {
  height: 165px;
}

.news-thumb-compact {
  height: 135px;
}

.news-thumb-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  font-size: 0.725rem;
  font-weight: 700;
  padding: 0.25rem 0.8rem;
  border-radius: 50px;
  z-index: 2;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  line-height: 1.2;
}

.news-badge-yellow {
  background-color: var(--portal-accent);
  color: #0f172a;
}

.news-badge-blue {
  background-color: #2563eb;
  color: #ffffff;
}

.news-card-body {
  padding: 1.15rem 1.25rem 1.25rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.news-card-body-compact {
  padding: 0.95rem 1.15rem 1.15rem;
}

.news-card-cat-link {
  color: #2563eb;
  font-size: 0.775rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
  display: inline-block;
  text-decoration: none;
}

[data-theme="dark"] .news-card-cat-link {
  color: var(--portal-accent);
}

.news-card-title-lg {
  font-size: 1.125rem;
  font-weight: 800;
  line-height: 1.35;
  color: var(--portal-text);
  margin-bottom: 0.45rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-card-title-compact {
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--portal-text);
  margin-bottom: 0.4rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-card-title-lg a,
.news-card-title-compact a {
  color: inherit;
  text-decoration: none;
}

.news-card-title-lg a:hover,
.news-card-title-compact a:hover {
  color: #2563eb;
}

[data-theme="dark"] .news-card-title-lg a:hover,
[data-theme="dark"] .news-card-title-compact a:hover {
  color: var(--portal-accent);
}

.news-card-excerpt-lg {
  font-size: 0.825rem;
  color: var(--portal-text-muted);
  line-height: 1.5;
  margin-bottom: 0.85rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-card-excerpt-compact {
  font-size: 0.775rem;
  color: var(--portal-text-muted);
  line-height: 1.45;
  margin-bottom: 0.65rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-card-meta {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.75rem;
  color: var(--portal-text-light);
}

.news-card-meta-item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

/* ==========================================================================
   4. BERITA TERBARU (LEGACY COMPATIBILITY)
   ========================================================================== */
.article-card {
  background-color: var(--portal-surface);
  border: 1px solid var(--portal-border);
  border-radius: var(--portal-radius-lg);
  overflow: hidden;
  box-shadow: var(--portal-shadow-sm);
  transition: var(--portal-transition);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.article-card:hover {
  border-color: rgba(33, 69, 148, 0.25);
}

.article-thumb-wrapper {
  position: relative;
  overflow: hidden;
  width: 100%;
}

.article-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.article-card:hover .article-thumb {
  transform: none;
}

/* Category Badges on Thumbnails */
.category-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  font-size: 0.725rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: var(--portal-radius-pill);
  z-index: 2;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  text-transform: capitalize;
}

.category-badge-blue {
  background-color: #2563eb;
  color: #ffffff;
}

.category-badge-yellow {
  background-color: var(--portal-accent);
  color: #0f172a;
}

/* Featured Large Card (Left) */
.featured-card {
  background-color: var(--portal-surface);
  border: 1px solid var(--portal-border);
  border-radius: var(--portal-radius-lg);
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
  box-shadow: var(--portal-shadow-sm);
  transition: var(--portal-transition);
}

.featured-card:hover {
  border-color: rgba(33, 69, 148, 0.25);
}

.featured-thumb-wrapper {
  height: 220px;
  position: relative;
  overflow: hidden;
}

.featured-thumb-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.featured-card:hover .featured-thumb-wrapper img {
  transform: none;
}

.featured-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.featured-cat-link {
  color: #2563eb;
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
  display: inline-block;
}

.featured-title {
  font-size: 1.15rem;
  font-weight: 800;
  line-height: 1.35;
  color: var(--portal-text);
  margin-bottom: 0.65rem;
}

.featured-title a:hover {
  color: #2563eb;
}

[data-theme="dark"] .featured-title a:hover {
  color: var(--portal-accent);
}

.featured-excerpt {
  font-size: 0.85rem;
  color: var(--portal-text-muted);
  line-height: 1.5;
  margin-bottom: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-meta {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.775rem;
  color: var(--portal-text-light);
}

.article-meta-item {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

/* Small Cards Grid (Right) */
.small-card-thumb-wrapper {
  height: 110px;
  position: relative;
  overflow: hidden;
}

.small-card-thumb-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.small-card-body {
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.small-card-title {
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--portal-text);
  margin-bottom: 0.4rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.small-card-title a:hover {
  color: #2563eb;
}

body.dark-mode .small-card-title a,
[data-theme="dark"] .small-card-title a {
  color: #ffffff;
}

body.dark-mode .small-card-title a:hover,
[data-theme="dark"] .small-card-title a:hover {
  color: var(--portal-accent);
}

.small-card-excerpt {
  font-size: 0.775rem;
  color: var(--portal-text-muted);
  line-height: 1.4;
  margin-bottom: 0.65rem;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

body.dark-mode .small-card-excerpt,
[data-theme="dark"] .small-card-excerpt {
  color: #e2e8f0 !important;
}

body.dark-mode .article-meta,
[data-theme="dark"] .article-meta {
  color: #94a3b8 !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
}

body.dark-mode .article-meta-item,
[data-theme="dark"] .article-meta-item {
  color: #cbd5e1 !important;
}

/* ==========================================================================
   5. KATEGORI PILLS ROW
   ========================================================================== */
.category-pills-container {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.cat-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 1rem;
  border-radius: var(--portal-radius-pill);
  font-size: 0.825rem;
  font-weight: 600;
  background: var(--portal-surface);
  border: 1px solid var(--portal-border);
  color: var(--portal-text-muted);
  transition: var(--portal-transition);
  cursor: pointer;
}

.cat-pill:hover {
  border-color: var(--portal-primary-light);
  color: var(--portal-text);
}

.cat-pill.active {
  background-color: var(--portal-primary);
  border-color: var(--portal-primary);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(11, 28, 61, 0.25);
}

[data-theme="dark"] .cat-pill.active {
  background-color: var(--portal-accent);
  border-color: var(--portal-accent);
  color: #0f172a;
}

/* ==========================================================================
   6. SIDEBAR WIDGETS
   ========================================================================== */
/* Widget: Hot Topics (Inverse Theme: Dark in Light Mode, White in Dark Mode) */
.hot-topics-widget {
  background-color: var(--portal-primary);
  border-radius: var(--portal-radius-xl);
  padding: 1.5rem;
  color: #ffffff;
  box-shadow: 0 8px 24px rgba(11, 28, 61, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 1.5rem;
  transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease, color 0.3s ease;
}

.hot-topics-widget .widget-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.hot-topics-widget .widget-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.15rem;
  font-weight: 800;
  margin: 0;
  color: #ffffff;
  transition: color 0.3s ease;
}

.hot-topics-widget .widget-link-light {
  font-size: 0.775rem;
  font-weight: 600;
  color: #94a3b8;
  text-decoration: none;
  transition: color 0.15s ease;
}

.hot-topics-widget .widget-link-light:hover {
  color: var(--portal-accent);
}

.hot-topics-widget .hot-topic-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.hot-topics-widget .hot-topic-item {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  transition: border-color 0.3s ease;
}

.hot-topics-widget .hot-topic-item:first-child {
  padding-top: 0.2rem;
}

.hot-topics-widget .hot-topic-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.hot-topics-widget .rank-badge {
  font-size: 1.15rem;
  font-weight: 800;
  font-family: inherit;
  line-height: 1;
  flex-shrink: 0;
  width: 18px;
  text-align: center;
  margin-top: 2px;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
  transition: color 0.3s ease;
}

.hot-topics-widget .rank-badge.rank-1 {
  color: var(--portal-accent);
  background: transparent;
  box-shadow: none;
}

.hot-topics-widget .rank-badge.rank-other {
  color: #94a3b8;
  background: transparent;
  box-shadow: none;
}

.hot-topics-widget .hot-topic-thumb {
  width: 64px;
  height: 52px;
  border-radius: var(--portal-radius-sm);
  overflow: hidden;
  flex-shrink: 0;
}

.hot-topics-widget .hot-topic-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hot-topics-widget .hot-topic-content {
  flex-grow: 1;
}

.hot-topics-widget .hot-topic-category {
  font-size: 0.7rem;
  color: #94a3b8;
  font-weight: 600;
  margin-bottom: 0.15rem;
  display: block;
  transition: color 0.3s ease;
}

.hot-topics-widget .hot-topic-title {
  font-size: 0.825rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 0.25rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hot-topics-widget .hot-topic-title a {
  color: #ffffff;
  text-decoration: none;
  transition: color 0.15s ease;
}

.hot-topics-widget .hot-topic-title a:hover {
  color: var(--portal-accent);
}

.hot-topics-widget .hot-topic-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.7rem;
  color: #94a3b8;
  transition: color 0.3s ease;
}

/* ==========================================================================
   INVERTED THEME: In Dark Mode, Hot Topics becomes Clean White Card
   ========================================================================== */
[data-theme="dark"] .hot-topics-widget,
body.dark-mode .hot-topics-widget {
  background-color: #ffffff;
  color: #0f172a;
  border: 1px solid #e2e8f0;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .hot-topics-widget .widget-title,
body.dark-mode .hot-topics-widget .widget-title {
  color: #0f172a;
}

[data-theme="dark"] .hot-topics-widget .widget-link-light,
body.dark-mode .hot-topics-widget .widget-link-light {
  color: #64748b;
}

[data-theme="dark"] .hot-topics-widget .widget-link-light:hover,
body.dark-mode .hot-topics-widget .widget-link-light:hover {
  color: #1e3a8a;
}

[data-theme="dark"] .hot-topics-widget .hot-topic-item,
body.dark-mode .hot-topics-widget .hot-topic-item {
  border-bottom: 1px solid #e2e8f0;
}

[data-theme="dark"] .hot-topics-widget .rank-badge.rank-1,
body.dark-mode .hot-topics-widget .rank-badge.rank-1 {
  color: #d97706; /* Rich amber gold for strong contrast on white */
}

[data-theme="dark"] .hot-topics-widget .rank-badge.rank-other,
body.dark-mode .hot-topics-widget .rank-badge.rank-other {
  color: #94a3b8;
}

[data-theme="dark"] .hot-topics-widget .hot-topic-category,
body.dark-mode .hot-topics-widget .hot-topic-category {
  color: #2563eb;
}

[data-theme="dark"] .hot-topics-widget .hot-topic-title a,
body.dark-mode .hot-topics-widget .hot-topic-title a {
  color: #0f172a;
}

[data-theme="dark"] .hot-topics-widget .hot-topic-title a:hover,
body.dark-mode .hot-topics-widget .hot-topic-title a:hover {
  color: #2563eb;
}

[data-theme="dark"] .hot-topics-widget .hot-topic-meta,
body.dark-mode .hot-topics-widget .hot-topic-meta {
  color: #64748b;
}

[data-theme="dark"] .hot-topics-widget .text-white-50,
body.dark-mode .hot-topics-widget .text-white-50 {
  color: #64748b !important;
}

/* Widget: Agenda (Clean White Card) */
.agenda-widget {
  background-color: var(--portal-surface);
  border: 1px solid var(--portal-border);
  border-radius: var(--portal-radius-xl);
  padding: 1.5rem;
  box-shadow: var(--portal-shadow-sm);
  margin-bottom: 1.5rem;
}

.agenda-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--portal-text);
  margin: 0;
}

.agenda-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.agenda-list-scroll {
  max-height: 395px;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 0;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE and Edge */
  scroll-behavior: smooth;
}

.agenda-list-scroll::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
  width: 0;
  height: 0;
}

.agenda-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.75rem 0.5rem;
  border-radius: var(--portal-radius-md);
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
  border-bottom: 1px solid var(--portal-border);
  user-select: none;
}

.agenda-item:first-child {
  padding-top: 0.35rem;
}

.agenda-item:last-child {
  border-bottom: none;
  padding-bottom: 0.35rem;
}

.agenda-item:hover, .agenda-item:focus-visible {
  background-color: var(--portal-surface-secondary);
  border-bottom-color: transparent;
  transform: translateX(4px);
  outline: none;
}

/* Dark mode divider */
[data-theme="dark"] .agenda-item,
body.dark-mode .agenda-item {
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

[data-theme="dark"] .agenda-item:last-child,
body.dark-mode .agenda-item:last-child {
  border-bottom: none;
}

[data-theme="dark"] .agenda-item:hover,
body.dark-mode .agenda-item:hover {
  border-bottom-color: transparent;
}

.agenda-item .agenda-action {
  opacity: 0.45;
  transition: opacity 0.2s ease, transform 0.2s ease, color 0.2s ease;
}

.agenda-item:hover .agenda-action {
  opacity: 1;
  transform: translateX(2px);
  color: var(--portal-primary) !important;
}

.agenda-date-box {
  background-color: var(--portal-surface-secondary);
  border: 1px solid var(--portal-border);
  border-radius: var(--portal-radius-md);
  padding: 0.4rem 0.6rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  text-align: center;
}

.agenda-date-day {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--portal-text);
  line-height: 1;
}

.agenda-date-month {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #2563eb;
  margin-top: 2px;
}

.agenda-info {
  flex-grow: 1;
  min-width: 0;
}

.agenda-item-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--portal-text);
  margin-bottom: 0.2rem;
  transition: color 0.15s ease;
}

.agenda-item:hover .agenda-item-title {
  color: var(--portal-primary);
}

.agenda-item-details {
  font-size: 0.725rem;
  color: var(--portal-text-muted);
}

/* Agenda Detail Modal */
#agendaDetailModal .modal-content {
  background-color: var(--portal-surface, #ffffff);
  color: var(--portal-text, #0f172a);
  border: 1px solid var(--portal-border, #e2e8f0);
}

[data-theme="dark"] #agendaDetailModal .modal-content {
  background-color: var(--portal-surface, #1e293b);
  color: var(--portal-text, #f8fafc);
  border: 1px solid var(--portal-border, #334155);
}

[data-theme="dark"] #agendaDetailModal .text-dark-emphasis {
  color: #f1f5f9 !important;
}

[data-theme="dark"] #agendaDetailModal .text-secondary {
  color: #cbd5e1 !important;
}

[data-theme="dark"] #agendaDetailModal .btn-close {
  filter: invert(1) grayscale(100%) brightness(200%);
}

/* Widget: CTA Banner UT */
.ut-cta-banner {
  background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
  border-radius: var(--portal-radius-xl);
  padding: 1.5rem 1.25rem;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 8px 20px -4px rgba(29, 78, 216, 0.4);
  position: relative;
  overflow: hidden;
}

.ut-cta-banner::before {
  content: '';
  position: absolute;
  right: -20px;
  bottom: -20px;
  width: 100px;
  height: 100px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  pointer-events: none;
}

.ut-cta-content h4 {
  font-size: 1.05rem;
  font-weight: 800;
  margin-bottom: 0.25rem;
  font-style: italic;
}

.ut-cta-content p {
  font-size: 0.775rem;
  color: #bfdbfe;
  margin: 0;
}

.ut-cta-btn {
  background-color: var(--portal-accent);
  color: #0f172a;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  transition: var(--portal-transition);
}

.ut-cta-btn:hover {
  background-color: #ffffff;
  color: #1d4ed8;
  transform: scale(1.08);
}

/* Widget: CTA Image Banner (Sesuai File Banner Resmi) */
.ut-banner-widget {
  margin-bottom: 1.5rem;
  border-radius: var(--portal-radius-xl);
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(11, 28, 61, 0.12);
  border: 1px solid var(--portal-border);
  transition: var(--portal-transition);
  background-color: var(--portal-surface);
}

.ut-banner-widget:hover {
  border-color: rgba(33, 69, 148, 0.35);
}

.ut-banner-link {
  display: block;
  text-decoration: none;
  overflow: hidden;
  line-height: 0;
}

.ut-banner-img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

.ut-banner-link:hover .ut-banner-img {
  transform: none;
}

/* ==========================================================================
   7. FOOTER
   ========================================================================== */
.portal-footer {
  background-color: var(--portal-primary);
  color: #cbd5e1;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin-top: 4rem;
  padding: 3.5rem 0 1.5rem;
}

.footer-brand {
  margin-bottom: 1.25rem;
}

.footer-desc {
  font-size: 0.875rem;
  color: #94a3b8;
  line-height: 1.6;
  max-width: 360px;
}

.footer-heading {
  color: #ffffff;
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  position: relative;
  padding-bottom: 0.5rem;
}

.footer-heading::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 30px;
  height: 2px;
  background-color: var(--portal-accent);
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.footer-links a {
  color: #94a3b8;
  font-size: 0.875rem;
  transition: var(--portal-transition);
}

.footer-links a:hover {
  color: var(--portal-accent);
  padding-left: 4px;
}

.footer-contact-group-title {
  font-size: 0.725rem;
  letter-spacing: 0.5px;
  color: var(--portal-accent);
}

.footer-contact-item {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: #ffffff;
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.2s ease;
  line-height: 1.4;
}

.footer-contact-item:hover {
  color: var(--portal-accent) !important;
  transform: translateX(3px);
}

.footer-contact-item:hover span {
  color: var(--portal-accent) !important;
}

.footer-maps-container iframe {
  filter: brightness(0.92) contrast(1.05);
  transition: filter 0.3s ease;
}

.footer-maps-container:hover iframe {
  filter: brightness(1);
}

.footer-bottom {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.825rem;
  color: #64748b;
}

/* ==========================================================================
   8. LAYANAN CEPAT AKADEMIK (QUICK GATEWAY)
   ========================================================================== */
.quick-service-card {
  background-color: var(--portal-surface);
  border: 1px solid var(--portal-border);
  border-radius: var(--portal-radius-lg);
  padding: 1.5rem 1.25rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  transition: var(--portal-transition);
  height: 100%;
  position: relative;
  overflow: hidden;
  box-shadow: var(--portal-shadow-sm);
  text-decoration: none;
  color: var(--portal-text);
}

.quick-service-card:hover {
  border-color: rgba(37, 99, 235, 0.4);
  color: var(--portal-text);
}

.quick-service-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--portal-radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.quick-service-card:hover .quick-service-icon {
  transform: none;
}

.icon-blue { background: rgba(37, 99, 235, 0.1); color: #2563eb; }
.icon-yellow { background: rgba(250, 204, 21, 0.15); color: #ca8a04; }
.icon-emerald { background: rgba(16, 185, 129, 0.1); color: #059669; }
.icon-indigo { background: rgba(99, 102, 241, 0.1); color: #4f46e5; }
.icon-rose { background: rgba(244, 63, 94, 0.1); color: #e11d48; }
.icon-cyan { background: rgba(6, 182, 212, 0.1); color: #0891b2; }

.quick-service-title {
  font-size: 1rem;
  font-weight: 800;
  margin-bottom: 0.35rem;
  color: var(--portal-text);
}

.quick-service-desc {
  font-size: 0.775rem;
  color: var(--portal-text-muted);
  line-height: 1.5;
  margin-bottom: 1rem;
}

.quick-service-action {
  margin-top: auto;
  font-size: 0.775rem;
  font-weight: 700;
  color: #2563eb;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

[data-theme="dark"] .quick-service-action {
  color: var(--portal-accent);
}

.quick-service-card:hover .quick-service-action i {
  transform: none;
}

/* ==========================================================================
   9. FAKULTAS & PROGRAM STUDI CARDS
   ========================================================================== */
.faculty-card {
  background-color: var(--portal-surface);
  border: 1px solid var(--portal-border);
  border-radius: var(--portal-radius-xl);
  padding: 1.75rem;
  height: 100%;
  display: flex;
  flex-direction: column;
  transition: var(--portal-transition);
  box-shadow: var(--portal-shadow-sm);
  position: relative;
}

.faculty-card:hover {
  border-color: rgba(33, 69, 148, 0.3);
}

.faculty-badge {
  font-size: 0.725rem;
  font-weight: 800;
  padding: 0.3rem 0.75rem;
  border-radius: var(--portal-radius-pill);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  width: fit-content;
  margin-bottom: 0.85rem;
}

.faculty-name {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--portal-text);
  margin-bottom: 0.75rem;
  line-height: 1.3;
}

.faculty-desc {
  font-size: 0.825rem;
  color: var(--portal-text-muted);
  line-height: 1.5;
  margin-bottom: 1.25rem;
}

.prodi-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-top: auto;
}

.prodi-item {
  font-size: 0.8rem;
  color: var(--portal-text);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.5rem;
  border-radius: var(--portal-radius-sm);
  background-color: var(--portal-surface-secondary);
}

.prodi-item i {
  color: #2563eb;
  font-size: 0.75rem;
}

[data-theme="dark"] .prodi-item i {
  color: var(--portal-accent);
}

/* ==========================================================================
   10. FAQ INTERACTIVE ACCORDION (Clean Minimalist Concept)
   ========================================================================== */
.portal-accordion {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

.portal-accordion .accordion-item {
  background: transparent !important;
  border: none !important;
  border-bottom: 1px solid var(--portal-border) !important;
  border-radius: 0 !important;
  margin-bottom: 0 !important;
  box-shadow: none !important;
  overflow: visible !important;
  padding: 0.35rem 0;
}

.portal-accordion .accordion-item:first-of-type {
  border-top: none;
}

.portal-accordion .accordion-header {
  margin: 0;
}

.portal-accordion .accordion-button {
  background: transparent !important;
  color: var(--portal-text) !important;
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.45;
  padding: 1rem 0;
  box-shadow: none !important;
  border: none !important;
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-decoration: none;
  transition: color 0.15s ease, text-decoration 0.15s ease;
}

.portal-accordion .accordion-button:not(.collapsed) {
  color: var(--portal-text) !important;
  background: transparent !important;
  text-decoration: underline !important;
  text-underline-offset: 5px;
  text-decoration-thickness: 1.5px;
}

.portal-accordion .accordion-button:hover {
  text-decoration: underline;
  text-underline-offset: 5px;
}

[data-theme="dark"] .portal-accordion .accordion-button {
  color: #f1f5f9 !important;
}

[data-theme="dark"] .portal-accordion .accordion-button:not(.collapsed) {
  color: #ffffff !important;
}

.portal-accordion .accordion-button::after {
  width: 1.05rem;
  height: 1.05rem;
  background-size: 1.05rem;
  transition: transform 0.25s ease;
  opacity: 0.65;
  flex-shrink: 0;
  margin-left: 1.25rem;
}

.portal-accordion .accordion-button:hover::after,
.portal-accordion .accordion-button:not(.collapsed)::after {
  opacity: 1;
}

[data-theme="dark"] .portal-accordion .accordion-button::after,
body.dark-mode .portal-accordion .accordion-button::after {
  filter: brightness(0) invert(1);
}

.portal-accordion .accordion-body {
  padding: 0.15rem 0 1.25rem 0 !important;
  background: transparent !important;
  border: none !important;
  border-top: none !important;
  font-size: 0.95rem;
  color: var(--portal-text);
  line-height: 1.7;
}

[data-theme="dark"] .portal-accordion .accordion-body,
body.dark-mode .portal-accordion .accordion-body {
  color: #cbd5e1;
}

.portal-accordion .accordion-body p:last-child {
  margin-bottom: 0;
}

/* ==========================================================================
   11. ARTICLE DETAIL & READING TYPOGRAPHY
   ========================================================================== */
.article-detail-container {
  max-width: 820px;
  margin: 0 auto;
}

.article-headline-title {
  font-size: 2.25rem;
  font-weight: 800;
  line-height: 1.25;
  color: var(--portal-text);
  letter-spacing: -0.5px;
  margin-bottom: 1.25rem;
}

@media (max-width: 767.98px) {
  .article-headline-title {
    font-size: 1.65rem;
  }
}

.article-lead-excerpt {
  font-size: 1.1rem;
  color: var(--portal-text-muted);
  line-height: 1.6;
  font-weight: 500;
  margin-bottom: 1.5rem;
  border-left: 3px solid var(--portal-accent);
  padding-left: 1rem;
}

.article-featured-image-box {
  border-radius: var(--portal-radius-xl);
  overflow: hidden;
  box-shadow: var(--portal-shadow);
  margin-bottom: 2rem;
}

.article-featured-image-box img {
  width: 100%;
  height: auto;
  max-height: 500px;
  object-fit: cover;
}

.article-prose {
  font-size: 1.075rem;
  line-height: 1.85;
  color: var(--portal-text);
}

.article-prose p {
  margin-bottom: 1.5rem;
}

.article-prose h2, .article-prose h3 {
  font-weight: 800;
  color: var(--portal-text);
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.article-prose blockquote {
  border-left: 4px solid var(--portal-accent);
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  background-color: var(--portal-surface-secondary);
  border-radius: 0 var(--portal-radius-md) var(--portal-radius-md) 0;
  font-style: italic;
}

.article-prose img {
  max-width: 100%;
  height: auto;
  border-radius: var(--portal-radius-md);
  margin: 1.5rem 0;
  display: inline-block;
  box-shadow: var(--portal-shadow);
}

.article-prose figure {
  margin: 1.5rem 0;
  text-align: center;
}

.article-prose figcaption {
  font-size: 0.85rem;
  color: var(--portal-text-muted);
  margin-top: 0.5rem;
  font-style: italic;
}

.article-prose ul, .article-prose ol {
  margin-bottom: 1.5rem;
  padding-left: 1.75rem;
}

.article-prose li {
  margin-bottom: 0.5rem;
}

.article-prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.95rem;
}

.article-prose th, .article-prose td {
  border: 1px solid var(--portal-border);
  padding: 0.75rem 1rem;
}

.article-prose th {
  background-color: var(--portal-surface-secondary);
  font-weight: 700;
}

.article-prose hr {
  margin: 2rem 0;
  border: 0;
  border-top: 1px solid var(--portal-border);
}

/* Card Container */
.article-main-card {
  background-color: var(--portal-surface);
  border: 1px solid var(--portal-border);
  box-shadow: var(--portal-shadow-sm);
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

/* ==========================================================================
   ARTICLE SHOW PAGE CONTRAST:
   - MODE TERANG (WHITE MODE): SEMUA TEKS HITAM (#000000)
   - MODE GELAP (DARK MODE): SEMUA TEKS PUTIH (#ffffff)
   ========================================================================== */

/* 1. Mode Terang (Default) */
.article-show-page .article-headline-title {
  color: #000000 !important;
}

.article-show-page .article-lead-excerpt {
  color: #000000 !important;
  border-left-color: var(--portal-accent) !important;
}

.article-show-page .article-prose,
.article-show-page .article-prose p,
.article-show-page .article-prose h1,
.article-show-page .article-prose h2,
.article-show-page .article-prose h3,
.article-show-page .article-prose h4,
.article-show-page .article-prose h5,
.article-show-page .article-prose h6,
.article-show-page .article-prose li,
.article-show-page .article-prose span,
.article-show-page .article-prose div,
.article-show-page .article-prose strong,
.article-show-page .article-prose b,
.article-show-page .article-prose em,
.article-show-page .article-prose i,
.article-show-page .article-prose blockquote,
.article-show-page .article-prose figcaption,
.article-show-page .article-prose td,
.article-show-page .article-prose th {
  color: #000000 !important;
}

.article-show-page .article-prose a {
  color: #0b1c3d !important;
  text-decoration: underline;
  font-weight: 600;
}

.article-show-page .breadcrumb-item,
.article-show-page .breadcrumb-item a,
.article-show-page .breadcrumb-item.active {
  color: #000000 !important;
}

.article-show-page .text-muted,
.article-show-page .text-portal,
.article-show-page small,
.article-show-page #share-section span {
  color: #000000 !important;
}

.article-show-page .cat-pill {
  color: #000000 !important;
  border-color: var(--portal-border) !important;
  background-color: var(--portal-surface) !important;
}

.article-show-page .section-title h2 {
  color: #000000 !important;
}

.article-show-page .small-card-title a {
  color: #000000 !important;
}

.article-show-page .small-card-excerpt {
  color: #000000 !important;
}

.article-show-page .article-meta,
.article-show-page .article-meta span,
.article-show-page .article-meta i {
  color: #000000 !important;
}

.article-show-page .pagination .page-link {
  color: #000000 !important;
}

.article-show-page .agenda-title,
.article-show-page .agenda-item-title,
.article-show-page .agenda-item-title a,
.article-show-page .agenda-date-day,
.article-show-page .agenda-item-details {
  color: #000000 !important;
}

/* 2. Mode Gelap (Dark Mode Overrides) */
body.dark-mode .article-show-page .article-headline-title,
[data-theme="dark"] .article-show-page .article-headline-title {
  color: #ffffff !important;
}

body.dark-mode .article-show-page .article-lead-excerpt,
[data-theme="dark"] .article-show-page .article-lead-excerpt {
  color: #ffffff !important;
  border-left-color: var(--portal-accent) !important;
}

body.dark-mode .article-show-page .article-prose,
[data-theme="dark"] .article-show-page .article-prose,
body.dark-mode .article-show-page .article-prose p,
[data-theme="dark"] .article-show-page .article-prose p,
body.dark-mode .article-show-page .article-prose h1,
[data-theme="dark"] .article-show-page .article-prose h1,
body.dark-mode .article-show-page .article-prose h2,
[data-theme="dark"] .article-show-page .article-prose h2,
body.dark-mode .article-show-page .article-prose h3,
[data-theme="dark"] .article-show-page .article-prose h3,
body.dark-mode .article-show-page .article-prose h4,
[data-theme="dark"] .article-show-page .article-prose h4,
body.dark-mode .article-show-page .article-prose h5,
[data-theme="dark"] .article-show-page .article-prose h5,
body.dark-mode .article-show-page .article-prose h6,
[data-theme="dark"] .article-show-page .article-prose h6,
body.dark-mode .article-show-page .article-prose li,
[data-theme="dark"] .article-show-page .article-prose li,
body.dark-mode .article-show-page .article-prose span,
[data-theme="dark"] .article-show-page .article-prose span,
body.dark-mode .article-show-page .article-prose div,
[data-theme="dark"] .article-show-page .article-prose div,
body.dark-mode .article-show-page .article-prose strong,
[data-theme="dark"] .article-show-page .article-prose strong,
body.dark-mode .article-show-page .article-prose b,
[data-theme="dark"] .article-show-page .article-prose b,
body.dark-mode .article-show-page .article-prose em,
[data-theme="dark"] .article-show-page .article-prose em,
body.dark-mode .article-show-page .article-prose i,
[data-theme="dark"] .article-show-page .article-prose i,
body.dark-mode .article-show-page .article-prose blockquote,
[data-theme="dark"] .article-show-page .article-prose blockquote,
body.dark-mode .article-show-page .article-prose figcaption,
[data-theme="dark"] .article-show-page .article-prose figcaption,
body.dark-mode .article-show-page .article-prose td,
[data-theme="dark"] .article-show-page .article-prose td,
body.dark-mode .article-show-page .article-prose th,
[data-theme="dark"] .article-show-page .article-prose th {
  color: #ffffff !important;
}

body.dark-mode .article-show-page .article-prose a,
[data-theme="dark"] .article-show-page .article-prose a {
  color: #93c5fd !important;
  text-decoration: underline;
}

body.dark-mode .article-show-page .article-prose blockquote,
[data-theme="dark"] .article-show-page .article-prose blockquote {
  background-color: rgba(255, 255, 255, 0.05) !important;
  border-left-color: var(--portal-accent) !important;
}

body.dark-mode .article-show-page .article-prose th,
[data-theme="dark"] .article-show-page .article-prose th {
  background-color: rgba(255, 255, 255, 0.1) !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
}

body.dark-mode .article-show-page .article-prose td,
[data-theme="dark"] .article-show-page .article-prose td {
  border-color: rgba(255, 255, 255, 0.15) !important;
}

body.dark-mode .article-show-page .breadcrumb-item,
[data-theme="dark"] .article-show-page .breadcrumb-item,
body.dark-mode .article-show-page .breadcrumb-item a,
[data-theme="dark"] .article-show-page .breadcrumb-item a,
body.dark-mode .article-show-page .breadcrumb-item.active,
[data-theme="dark"] .article-show-page .breadcrumb-item.active {
  color: #ffffff !important;
}

body.dark-mode .article-show-page .text-muted,
[data-theme="dark"] .article-show-page .text-muted,
body.dark-mode .article-show-page .text-portal,
[data-theme="dark"] .article-show-page .text-portal,
body.dark-mode .article-show-page small,
[data-theme="dark"] .article-show-page small,
body.dark-mode .article-show-page #share-section span,
[data-theme="dark"] .article-show-page #share-section span {
  color: #ffffff !important;
}

body.dark-mode .article-show-page #share-section,
[data-theme="dark"] .article-show-page #share-section {
  background-color: var(--portal-surface-secondary) !important;
}

body.dark-mode .article-show-page .cat-pill,
[data-theme="dark"] .article-show-page .cat-pill {
  color: #ffffff !important;
  background-color: rgba(255, 255, 255, 0.08) !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
}

body.dark-mode .article-show-page .section-title h2,
[data-theme="dark"] .article-show-page .section-title h2 {
  color: #ffffff !important;
}

body.dark-mode .article-show-page .small-card-title a,
[data-theme="dark"] .article-show-page .small-card-title a {
  color: #ffffff !important;
}

body.dark-mode .article-show-page .small-card-excerpt,
[data-theme="dark"] .article-show-page .small-card-excerpt {
  color: #ffffff !important;
}

body.dark-mode .article-show-page .article-meta,
[data-theme="dark"] .article-show-page .article-meta,
body.dark-mode .article-show-page .article-meta span,
[data-theme="dark"] .article-show-page .article-meta span,
body.dark-mode .article-show-page .article-meta i,
[data-theme="dark"] .article-show-page .article-meta i {
  color: #ffffff !important;
}

body.dark-mode .article-show-page .pagination .page-link,
[data-theme="dark"] .article-show-page .pagination .page-link {
  color: #ffffff !important;
  background-color: var(--portal-surface-secondary) !important;
  border-color: var(--portal-border) !important;
}

body.dark-mode .article-show-page .agenda-title,
[data-theme="dark"] .article-show-page .agenda-title {
  color: #ffffff !important;
}

body.dark-mode .article-show-page .agenda-item-title,
[data-theme="dark"] .article-show-page .agenda-item-title,
body.dark-mode .article-show-page .agenda-item-title a,
[data-theme="dark"] .article-show-page .agenda-item-title a,
body.dark-mode .article-show-page .agenda-date-day,
[data-theme="dark"] .article-show-page .agenda-date-day {
  color: #ffffff !important;
}

body.dark-mode .article-show-page .agenda-item-details,
[data-theme="dark"] .article-show-page .agenda-item-details {
  color: #ffffff !important;
}

body.dark-mode .article-show-page .agenda-date-box,
[data-theme="dark"] .article-show-page .agenda-date-box {
  background-color: rgba(255, 255, 255, 0.08) !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
}

.share-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.btn-share {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.9rem;
  border-radius: var(--portal-radius-pill);
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid var(--portal-border);
  background: var(--portal-surface);
  color: var(--portal-text);
  transition: var(--portal-transition);
}

.btn-share:hover {
  transform: translateY(-2px);
  box-shadow: var(--portal-shadow-sm);
}

.btn-share.share-wa:hover { background: #25D366; color: #fff; border-color: #25D366; }
.btn-share.share-fb:hover { background: #1877F2; color: #fff; border-color: #1877F2; }
.btn-share.share-x:hover { background: #000; color: #fff; border-color: #000; }

/* Author Box */
.author-profile-box {
  background-color: var(--portal-surface);
  border: 1px solid var(--portal-border);
  border-radius: var(--portal-radius-lg);
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-top: 2.5rem;
  box-shadow: var(--portal-shadow-sm);
}

.author-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background-color: #2563eb;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

/* ==========================================================================
   12. RESPONSIVE MEDIA QUERIES
   ========================================================================== */
@media (max-width: 991.98px) {
  .hero-headline-card,
  .hero-slider-track {
    min-height: 420px;
  }
  .hero-slide {
    min-height: 420px;
    height: 100%;
    justify-content: flex-end;
  }
  .hero-slide.active {
    min-height: 420px;
    height: 100%;
  }
  .hero-image-wrapper {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
  }
  .hero-overlay {
    background: linear-gradient(
      180deg,
      transparent 0%,
      rgba(11, 28, 61, 0.4) 40%,
      rgba(11, 28, 61, 0.88) 75%,
      rgba(11, 28, 61, 0.98) 100%
    );
  }
  .hero-content {
    max-width: 100%;
    padding: 3rem 1.5rem 2rem;
    margin-top: auto;
    z-index: 3;
    height: auto;
  }
  .hero-slider-controls {
    bottom: 1rem;
    right: 1.25rem;
    z-index: 10;
  }
  .hero-headline-card::before,
  .hero-headline-card::after {
    display: none;
  }
  .hero-title {
    font-size: 1.45rem;
  }
  .portal-nav-links {
    display: none; /* Handled by mobile drawer */
  }
}

@media (max-width: 767.98px) {
  /* Sembunyikan tanda panah geser headline di layar handphone / tablet kecil */
  .hero-slider-controls .slider-btn {
    display: none !important;
  }
  .hero-slider-controls .slider-dots {
    margin-left: 0;
  }
}

@media (max-width: 575.98px) {
  .hero-content {
    padding: 1.25rem;
  }
  .hero-title {
    font-size: 1.25rem;
  }
  .btn-hero-cta {
    font-size: 0.8rem;
    padding: 0.5rem 1rem;
  }
  .hero-slider-controls {
    bottom: 0.85rem;
    right: 1rem;
  }
}

/* Accessibility: Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ==========================================================================
   PAGE HERO BANNER (e.g. Visi dan Misi)
   ========================================================================== */
.page-hero-banner {
  position: relative;
  overflow: hidden;
  background-color: var(--portal-primary);
  min-height: 240px;
  padding: 3.5rem 0 3.25rem 0;
  display: flex;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.page-hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: right center;
  background-repeat: no-repeat;
  z-index: 1;
}

.page-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(11, 28, 61, 0.95) 0%,
    rgba(11, 28, 61, 0.88) 35%,
    rgba(11, 28, 61, 0.65) 55%,
    rgba(11, 28, 61, 0.25) 75%,
    rgba(11, 28, 61, 0.05) 100%
  );
  z-index: 2;
  pointer-events: none;
}

.page-hero-content {
  position: relative;
  z-index: 3;
  max-width: 720px;
}

.page-hero-breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  list-style: none;
  padding: 0;
  margin: 0 0 1rem 0;
  font-size: 0.875rem;
  color: #cbd5e1;
}

.page-hero-breadcrumb a {
  color: #cbd5e1;
  text-decoration: none;
  transition: var(--portal-transition);
  display: inline-flex;
  align-items: center;
}

.page-hero-breadcrumb a:hover {
  color: var(--portal-accent);
}

.page-hero-breadcrumb .breadcrumb-separator {
  color: #94a3b8;
  font-size: 0.75rem;
  display: inline-flex;
  align-items: center;
}

.page-hero-breadcrumb .breadcrumb-current {
  color: #ffffff;
  font-weight: 600;
}

.page-hero-title {
  font-size: 2.75rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.15;
  margin: 0;
  letter-spacing: -0.5px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.page-hero-bar {
  width: 55px;
  height: 4px;
  background-color: var(--portal-accent);
  border-radius: var(--portal-radius-pill);
  margin: 0.85rem 0 1.15rem 0;
  box-shadow: 0 2px 6px rgba(250, 204, 21, 0.4);
}

.page-hero-subtitle {
  font-size: 1.05rem;
  color: #f1f5f9;
  line-height: 1.6;
  margin: 0;
  max-width: 580px;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

@media (max-width: 767.98px) {
  .page-hero-banner {
    padding: 2.5rem 0;
    min-height: 200px;
  }
  .page-hero-overlay {
    background: linear-gradient(
      180deg,
      rgba(11, 28, 61, 0.92) 0%,
      rgba(11, 28, 61, 0.82) 50%,
      rgba(11, 28, 61, 0.65) 100%
    );
  }
  .page-hero-title {
    font-size: 2rem;
  }
  .page-hero-subtitle {
    font-size: 0.925rem;
  }
}

/* ==========================================================================
   VISI & MISI WIDE LAYOUT REVAMP
   ========================================================================== */
.visi-card-wide {
  background-color: var(--portal-surface);
  border: 1px solid var(--portal-border);
  border-radius: var(--portal-radius-xl);
  padding: 2.25rem 2.5rem;
  box-shadow: 0 10px 30px rgba(11, 28, 61, 0.05);
  position: relative;
  overflow: hidden;
}

.visi-card-wide::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--portal-primary) 0%, var(--portal-accent) 100%);
}

.badge-visi {
  background-color: rgba(33, 69, 148, 0.1);
  color: var(--portal-primary);
  font-weight: 700;
  font-size: 0.8rem;
  padding: 0.35rem 0.85rem;
  border-radius: var(--portal-radius-pill);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.visi-tagline {
  font-size: 0.825rem;
  color: var(--portal-text-muted);
  font-weight: 500;
}

.visi-heading {
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--portal-primary);
  line-height: 1.3;
  letter-spacing: -0.3px;
}

.visi-quote {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--portal-text);
  font-style: italic;
  position: relative;
  padding-left: 1.25rem;
  border-left: 3px solid var(--portal-accent);
}

.visi-pillars-box {
  background: var(--portal-bg);
  border: 1px solid var(--portal-border);
  border-radius: var(--portal-radius-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.pillars-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--portal-primary);
  margin-bottom: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.pillar-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--portal-border);
}

.pillar-item:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.pillar-item strong {
  display: block;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--portal-text);
  margin-bottom: 0.15rem;
}

.pillar-item p {
  font-size: 0.825rem;
  color: var(--portal-text-muted);
  margin-bottom: 0;
  line-height: 1.5;
}

/* 6 Misi Strategis Section Header */
.misi-section-title {
  color: var(--portal-primary);
  font-size: 1.65rem;
}

.misi-section-desc {
  color: var(--portal-text-muted);
  font-size: 0.95rem;
}

/* Misi Card in 3-Column Wide Grid */
.misi-card {
  background-color: var(--portal-surface);
  border: 1px solid var(--portal-border);
  border-radius: var(--portal-radius-lg);
  padding: 1.75rem 1.5rem;
  height: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: var(--portal-transition);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.03);
}

.misi-card:hover {
  box-shadow: 0 8px 24px rgba(11, 28, 61, 0.08);
  border-color: rgba(33, 69, 148, 0.25);
}

.misi-card-header {
  display: flex;
  align-items: center;
  margin-bottom: 0.85rem;
}

.misi-number {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--portal-primary);
  font-family: monospace;
  background-color: rgba(33, 69, 148, 0.08);
  padding: 0.2rem 0.65rem;
  border-radius: 6px;
}

[data-theme="dark"] .misi-number {
  color: var(--portal-accent);
  background-color: rgba(250, 204, 21, 0.12);
}

.misi-card-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--portal-text);
  margin-bottom: 0.75rem;
  line-height: 1.35;
}

.misi-card-desc {
  font-size: 0.9rem;
  line-height: 1.65;
  color: var(--portal-text-muted);
  margin-bottom: 0;
}

/* Motto Wide Ribbon */
.motto-strip-wide {
  background: linear-gradient(135deg, #0b1c3d 0%, #152d59 100%);
  border-radius: var(--portal-radius-xl);
  padding: 2rem 2.5rem;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 10px 30px rgba(11, 28, 61, 0.18);
}

.motto-icon-box {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: rgba(250, 204, 21, 0.18);
  color: var(--portal-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.65rem;
  flex-shrink: 0;
}

.motto-badge {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--portal-accent);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: block;
  margin-bottom: 0.25rem;
}

.motto-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #ffffff;
  font-style: italic;
  letter-spacing: -0.2px;
}

.btn-motto-cta {
  background-color: var(--portal-accent);
  color: #0f172a;
  font-weight: 700;
  font-size: 0.875rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--portal-radius-pill);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(250, 204, 21, 0.35);
  transition: var(--portal-transition);
  text-decoration: none;
}

.btn-motto-cta:hover {
  background-color: var(--portal-accent-hover);
  color: #000000;
}

/* Dark mode adjustments */
body.dark-mode .visi-card-wide {
  background-color: var(--portal-surface);
  border-color: var(--portal-border);
}

body.dark-mode .visi-pillars-box {
  background-color: rgba(255, 255, 255, 0.03);
  border-color: var(--portal-border);
}

body.dark-mode .badge-visi {
  background-color: rgba(250, 204, 21, 0.15);
  color: var(--portal-accent);
}

body.dark-mode .visi-heading,
body.dark-mode .pillars-title {
  color: #ffffff;
}

body.dark-mode .pillar-icon {
  background: var(--portal-surface);
  color: var(--portal-accent);
}

body.dark-mode .misi-icon-blue,
[data-theme="dark"] .misi-icon-blue {
  background-color: rgba(255, 255, 255, 0.12);
  color: #ffffff !important;
}

body.dark-mode .misi-icon-blue i,
[data-theme="dark"] .misi-icon-blue i {
  color: #ffffff !important;
}

body.dark-mode .misi-icon-yellow,
[data-theme="dark"] .misi-icon-yellow {
  color: var(--portal-accent);
}

body.dark-mode .misi-number,
[data-theme="dark"] .misi-number {
  color: #ffffff !important;
  font-weight: 800 !important;
}

body.dark-mode .misi-section-title,
[data-theme="dark"] .misi-section-title {
  color: #ffffff !important;
}

body.dark-mode .misi-section-desc,
[data-theme="dark"] .misi-section-desc {
  color: #ffffff !important;
}

body.dark-mode .misi-badge-action,
[data-theme="dark"] .misi-badge-action {
  background-color: var(--portal-surface-secondary) !important;
  color: #ffffff !important;
  border-color: var(--portal-border) !important;
}

@media (max-width: 991.98px) {
  .visi-card-wide {
    padding: 1.75rem;
  }
  .motto-strip-wide {
    padding: 1.75rem;
  }
}

/* ==========================================================================
   14. NEWS ARCHIVE & ADVANCED FILTER SYSTEM (/berita)
   ========================================================================== */

/* Category Pills Quick Bar */
.category-pills-bar {
  border-bottom: 1px solid var(--portal-border);
}

.scroll-smooth {
  scroll-behavior: smooth;
  scrollbar-width: thin;
}

.scroll-smooth::-webkit-scrollbar {
  height: 4px;
}

.scroll-smooth::-webkit-scrollbar-track {
  background: transparent;
}

.scroll-smooth::-webkit-scrollbar-thumb {
  background: var(--portal-border);
  border-radius: 4px;
}

.cat-filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--portal-text-muted);
  background-color: var(--portal-surface);
  border: 1px solid var(--portal-border);
  border-radius: var(--portal-radius-pill);
  text-decoration: none;
  white-space: nowrap;
  transition: var(--portal-transition);
}

.cat-filter-pill:hover {
  color: var(--portal-primary);
  border-color: var(--portal-primary);
  background-color: var(--portal-surface-secondary);
  transform: translateY(-1px);
}

.cat-filter-pill.active {
  background-color: var(--portal-primary);
  color: #ffffff;
  border-color: var(--portal-primary);
  box-shadow: 0 4px 12px rgba(11, 28, 61, 0.2);
}

.cat-pill-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.15rem 0.5rem;
  font-size: 0.725rem;
  font-weight: 700;
  border-radius: var(--portal-radius-pill);
  background-color: rgba(0, 0, 0, 0.06);
  color: inherit;
}

.cat-filter-pill.active .cat-pill-count {
  background-color: var(--portal-accent);
  color: #0f172a;
}

/* News Filter Box */
.news-filter-box {
  background-color: var(--portal-surface);
  border: 1px solid var(--portal-border);
  border-radius: var(--portal-radius-lg);
  padding: 1.5rem;
  box-shadow: var(--portal-shadow);
  transition: var(--portal-transition);
}

.filter-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--portal-text);
  margin-bottom: 0.4rem;
  letter-spacing: 0.01em;
}

.filter-input,
.filter-select {
  font-size: 0.875rem;
  border: 1px solid var(--portal-border);
  border-radius: var(--portal-radius-md);
  padding: 0.6rem 0.85rem;
  background-color: var(--portal-surface);
  color: var(--portal-text);
  transition: var(--portal-transition);
}

.filter-input:focus,
.filter-select:focus {
  border-color: var(--portal-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
  background-color: var(--portal-surface);
  color: var(--portal-text);
}

.badge-results-count {
  font-size: 0.85rem;
  color: var(--portal-text-muted);
  font-weight: 500;
}

.btn-filter-submit {
  background-color: var(--portal-primary);
  color: #ffffff;
  border: none;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.55rem 1.25rem;
  border-radius: var(--portal-radius-md);
  display: inline-flex;
  align-items: center;
  transition: var(--portal-transition);
}

.btn-filter-submit:hover {
  background-color: var(--portal-primary-hover);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(11, 28, 61, 0.25);
  transform: translateY(-1px);
}

.btn-filter-reset {
  background-color: transparent;
  color: var(--portal-text-muted);
  border: 1px solid var(--portal-border);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.55rem 1rem;
  border-radius: var(--portal-radius-md);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  transition: var(--portal-transition);
}

.btn-filter-reset:hover {
  color: #ef4444;
  border-color: #fca5a5;
  background-color: #fef2f2;
}

/* Active Filter Chips */
.active-filter-chips {
  padding: 0.6rem 0.85rem;
  background-color: var(--portal-surface-secondary);
  border-radius: var(--portal-radius-md);
  border: 1px dashed var(--portal-border);
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  font-size: 0.785rem;
  font-weight: 600;
  padding: 0.3rem 0.75rem;
  border-radius: var(--portal-radius-pill);
  background-color: var(--portal-surface);
  color: var(--portal-text);
  border: 1px solid var(--portal-border);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.filter-chip-remove {
  margin-left: 0.4rem;
  font-size: 1.1rem;
  line-height: 1;
  color: var(--portal-text-muted);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.filter-chip-remove:hover {
  color: #ef4444;
}

/* Dark mode for News Filter & Pills */
body.dark-mode .cat-filter-pill,
[data-theme="dark"] .cat-filter-pill {
  background-color: var(--portal-surface);
  border-color: var(--portal-border);
  color: var(--portal-text-light);
}

body.dark-mode .cat-filter-pill:hover,
[data-theme="dark"] .cat-filter-pill:hover {
  color: #ffffff;
  background-color: var(--portal-surface-secondary);
  border-color: var(--portal-accent);
}

body.dark-mode .cat-filter-pill.active,
[data-theme="dark"] .cat-filter-pill.active {
  background-color: var(--portal-accent);
  color: #0f172a;
  border-color: var(--portal-accent);
  box-shadow: 0 4px 14px rgba(250, 204, 21, 0.25);
}

body.dark-mode .cat-filter-pill.active .cat-pill-count,
[data-theme="dark"] .cat-filter-pill.active .cat-pill-count {
  background-color: rgba(15, 23, 42, 0.15);
  color: #0f172a;
}

body.dark-mode .news-filter-box,
[data-theme="dark"] .news-filter-box {
  background-color: var(--portal-surface);
  border-color: var(--portal-border);
}

body.dark-mode .filter-input,
body.dark-mode .filter-select,
[data-theme="dark"] .filter-input,
[data-theme="dark"] .filter-select {
  background-color: var(--portal-surface-secondary);
  border-color: var(--portal-border);
  color: #ffffff;
}

body.dark-mode .filter-input:focus,
body.dark-mode .filter-select:focus,
[data-theme="dark"] .filter-input:focus,
[data-theme="dark"] .filter-select:focus {
  border-color: var(--portal-accent);
  box-shadow: 0 0 0 3px rgba(250, 204, 21, 0.15);
}

body.dark-mode .filter-chip,
[data-theme="dark"] .filter-chip {
  background-color: var(--portal-surface);
  border-color: var(--portal-border);
  color: #ffffff;
}

body.dark-mode .active-filter-chips,
[data-theme="dark"] .active-filter-chips {
  background-color: rgba(255, 255, 255, 0.03);
  border-color: var(--portal-border);
}

body.dark-mode .btn-filter-reset:hover,
[data-theme="dark"] .btn-filter-reset:hover {
  background-color: rgba(239, 68, 68, 0.15);
  border-color: #ef4444;
  color: #f87171;
}

/* ==========================================================================
   15. MODERN MINIMALIST PAGINATION (SHADCN / RADIX STYLE)
   ========================================================================== */
.portal-pagination-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  margin: 1.5rem 0;
}

.portal-pagination-list {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.portal-pagination-item {
  display: inline-flex;
  align-items: center;
}

.portal-pagination-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1;
  color: #09090b;
  background-color: transparent;
  border: 1px solid transparent;
  border-radius: 9px;
  text-decoration: none;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

/* Hover state for normal links (matches item 1 in reference) */
.portal-pagination-link:hover:not(.disabled):not(.is-active) {
  background-color: #f4f4f5;
  color: #09090b;
}

/* Active page card (matches item 2 in reference: white background, thin border, subtle shadow) */
.portal-pagination-link.is-active {
  background-color: #ffffff;
  border: 1px solid #e4e4e7;
  color: #09090b;
  font-weight: 500;
  border-radius: 10px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  cursor: default;
}

/* Previous & Next Text Buttons with Chevrons */
.portal-pagination-prev,
.portal-pagination-next {
  padding: 0 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #09090b;
  background-color: transparent;
}

.portal-chevron-icon {
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}

/* Disabled State */
.portal-pagination-link.disabled {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
}

/* Ellipsis (...) */
.portal-pagination-ellipsis {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  color: #09090b;
  user-select: none;
}

/* Dark Mode Theme Overrides */
body.dark-mode .portal-pagination-link,
[data-theme="dark"] .portal-pagination-link {
  color: #f4f4f5;
}

body.dark-mode .portal-pagination-link:hover:not(.disabled):not(.is-active),
[data-theme="dark"] .portal-pagination-link:hover:not(.disabled):not(.is-active) {
  background-color: #27272a;
  color: #ffffff;
}

body.dark-mode .portal-pagination-link.is-active,
[data-theme="dark"] .portal-pagination-link.is-active {
  background-color: #09090b;
  border-color: #27272a;
  color: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

body.dark-mode .portal-pagination-prev,
body.dark-mode .portal-pagination-next,
[data-theme="dark"] .portal-pagination-prev,
[data-theme="dark"] .portal-pagination-next {
  color: #f4f4f5;
}

body.dark-mode .portal-pagination-ellipsis,
[data-theme="dark"] .portal-pagination-ellipsis {
  color: #a1a1aa;
}

/* ==========================================================================
   16. FILTER DRAWER SIDEBAR (OFFCANVAS)
   ========================================================================== */
.filter-drawer.offcanvas-end {
  width: 100%;
  max-width: 440px;
  border-top-left-radius: 24px;
  border-bottom-left-radius: 24px;
  border-left: 1px solid var(--portal-border);
  background-color: #ffffff;
  box-shadow: -8px 0 32px rgba(0, 0, 0, 0.12);
  z-index: 1055;
}

.filter-drawer .offcanvas-header {
  padding: 1.5rem 1.5rem 1rem;
  border-bottom: 1px solid var(--portal-border);
}

.filter-drawer .offcanvas-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #09090b;
  margin-bottom: 0.2rem;
}

.filter-drawer-subtitle {
  font-size: 0.825rem;
  color: #71717a;
  margin: 0;
}

.filter-drawer .offcanvas-body {
  padding: 1.5rem;
  overflow-y: auto;
}

.filter-drawer-footer {
  padding: 1.25rem 1.5rem;
  border-top: 1px solid var(--portal-border);
  background-color: #ffffff;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* Radio Cards in Drawer (Matching reference image) */
.drawer-radio-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1rem;
  border: 1px solid #e4e4e7;
  border-radius: 12px;
  margin-bottom: 0.5rem;
  cursor: pointer;
  background-color: #ffffff;
  transition: all 0.15s ease-in-out;
  user-select: none;
}

.drawer-radio-card:hover {
  border-color: #a1a1aa;
  background-color: #fafafa;
}

.drawer-radio-card.selected,
.drawer-radio-card:has(input[type="radio"]:checked) {
  border-color: #09090b;
  background-color: #f8fafc;
}

.drawer-radio-card input[type="radio"] {
  display: none;
}

.drawer-radio-label {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.drawer-radio-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: #09090b;
}

.drawer-radio-desc {
  font-size: 0.775rem;
  color: #71717a;
}

.drawer-radio-indicator {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid #d4d4d8;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.drawer-radio-card:has(input[type="radio"]:checked) .drawer-radio-indicator {
  border-color: #09090b;
}

.drawer-radio-card:has(input[type="radio"]:checked) .drawer-radio-indicator::after {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #09090b;
}

/* Drawer Buttons */
.btn-drawer-confirm {
  width: 100%;
  padding: 0.75rem 1.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: #ffffff;
  background-color: #09090b;
  border: none;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  transition: all 0.15s ease-in-out;
  text-decoration: none;
}

.btn-drawer-confirm:hover {
  background-color: #27272a;
  color: #ffffff;
  transform: translateY(-1px);
}

.btn-drawer-cancel {
  width: 100%;
  padding: 0.6rem 1.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #71717a;
  background-color: transparent;
  border: none;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s ease-in-out;
}

.btn-drawer-cancel:hover {
  color: #09090b;
  background-color: #f4f4f5;
}

/* Toolbar Trigger Button on main page */
.btn-filter-drawer-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1.15rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #09090b;
  background-color: #ffffff;
  border: 1px solid #e4e4e7;
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  cursor: pointer;
  transition: all 0.15s ease-in-out;
}

.btn-filter-drawer-trigger:hover {
  border-color: #09090b;
  background-color: #fafafa;
}

.active-badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #f59e0b;
  display: inline-block;
}

/* Dark Mode for Drawer */
body.dark-mode .filter-drawer.offcanvas-end,
[data-theme="dark"] .filter-drawer.offcanvas-end {
  background-color: #09090b;
  border-left-color: #27272a;
}

body.dark-mode .filter-drawer .offcanvas-header,
body.dark-mode .filter-drawer-footer,
[data-theme="dark"] .filter-drawer .offcanvas-header,
[data-theme="dark"] .filter-drawer-footer {
  background-color: #09090b;
  border-color: #27272a;
}

body.dark-mode .filter-drawer .offcanvas-title,
[data-theme="dark"] .filter-drawer .offcanvas-title {
  color: #ffffff;
}

body.dark-mode .filter-drawer-subtitle,
[data-theme="dark"] .filter-drawer-subtitle {
  color: #a1a1aa;
}

body.dark-mode .drawer-radio-card,
[data-theme="dark"] .drawer-radio-card {
  background-color: #18181b;
  border-color: #27272a;
}

body.dark-mode .drawer-radio-card:hover,
[data-theme="dark"] .drawer-radio-card:hover {
  border-color: #52525b;
  background-color: #27272a;
}

body.dark-mode .drawer-radio-card.selected,
body.dark-mode .drawer-radio-card:has(input[type="radio"]:checked),
[data-theme="dark"] .drawer-radio-card.selected,
[data-theme="dark"] .drawer-radio-card:has(input[type="radio"]:checked) {
  border-color: #facc15;
  background-color: rgba(250, 204, 21, 0.08);
}

body.dark-mode .drawer-radio-title,
[data-theme="dark"] .drawer-radio-title {
  color: #ffffff;
}

body.dark-mode .drawer-radio-desc,
[data-theme="dark"] .drawer-radio-desc {
  color: #a1a1aa;
}

body.dark-mode .drawer-radio-card:has(input[type="radio"]:checked) .drawer-radio-indicator,
[data-theme="dark"] .drawer-radio-card:has(input[type="radio"]:checked) .drawer-radio-indicator {
  border-color: #facc15;
}

body.dark-mode .drawer-radio-card:has(input[type="radio"]:checked) .drawer-radio-indicator::after,
[data-theme="dark"] .drawer-radio-card:has(input[type="radio"]:checked) .drawer-radio-indicator::after {
  background-color: #facc15;
}

body.dark-mode .btn-drawer-confirm,
[data-theme="dark"] .btn-drawer-confirm {
  background-color: #facc15;
  color: #09090b;
}

body.dark-mode .btn-drawer-confirm:hover,
[data-theme="dark"] .btn-drawer-confirm:hover {
  background-color: #eab308;
  color: #000000;
}

body.dark-mode .btn-drawer-cancel,
[data-theme="dark"] .btn-drawer-cancel {
  color: #a1a1aa;
}

body.dark-mode .btn-drawer-cancel:hover,
[data-theme="dark"] .btn-drawer-cancel:hover {
  color: #ffffff;
  background-color: #27272a;
}

body.dark-mode .btn-filter-drawer-trigger,
[data-theme="dark"] .btn-filter-drawer-trigger {
  background-color: #18181b;
  border-color: #27272a;
  color: #ffffff;
}

body.dark-mode .btn-filter-drawer-trigger:hover,
[data-theme="dark"] .btn-filter-drawer-trigger:hover {
  background-color: #27272a;
  border-color: #52525b;
}

/* ==========================================================================
   17. GALLERY PHOTO GRID & LIGHTBOX
   ========================================================================== */

/* Photo Grid — CSS Columns Masonry */
.gallery-grid {
  column-count: 4;
  column-gap: 12px;
}

.gallery-item {
  break-inside: avoid;
  margin-bottom: 12px;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  position: relative;
  background-color: var(--portal-surface-secondary);
}

.gallery-item img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  transition: transform 0.3s ease, filter 0.3s ease;
}

.gallery-item::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(0, 0, 0, 0.15) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: 12px;
  pointer-events: none;
}

.gallery-item:hover img {
  transform: scale(1.04);
}

.gallery-item:hover::after {
  opacity: 1;
}

/* Responsive Columns */
@media (max-width: 1199.98px) {
  .gallery-grid {
    column-count: 3;
  }
}

@media (max-width: 767.98px) {
  .gallery-grid {
    column-count: 2;
    column-gap: 8px;
  }
  .gallery-item {
    margin-bottom: 8px;
    border-radius: 8px;
  }
  .gallery-item::after {
    border-radius: 8px;
  }
}

@media (max-width: 479.98px) {
  .gallery-grid {
    column-count: 2;
    column-gap: 6px;
  }
  .gallery-item {
    margin-bottom: 6px;
    border-radius: 6px;
  }
}

/* Lightbox Overlay */
.gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background-color: rgba(0, 0, 0, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
  cursor: zoom-out;
}

.gallery-lightbox.active {
  opacity: 1;
  visibility: visible;
}

.gallery-lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.5);
  cursor: default;
  animation: lightboxFadeIn 0.3s ease;
}

@keyframes lightboxFadeIn {
  from {
    transform: scale(0.92);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.gallery-lightbox-close {
  position: absolute;
  top: 1.25rem;
  right: 1.5rem;
  font-size: 2.5rem;
  color: #ffffff;
  background: none;
  border: none;
  cursor: pointer;
  line-height: 1;
  opacity: 0.7;
  transition: opacity 0.15s ease, transform 0.15s ease;
  z-index: 10000;
}

.gallery-lightbox-close:hover {
  opacity: 1;
  transform: scale(1.15);
}

/* Album Filter Pills Bar */
.gallery-album-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  overflow-x: auto;
  padding: 0.25rem 0.25rem 1rem;
  margin-bottom: 1.5rem;
  scrollbar-width: thin;
}

.gallery-album-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1.15rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--portal-text-muted);
  background-color: var(--portal-surface);
  border: 1px solid var(--portal-border);
  border-radius: var(--portal-radius-pill);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  user-select: none;
}

.gallery-album-pill:hover {
  color: var(--portal-primary);
  border-color: var(--portal-primary);
  background-color: var(--portal-surface-secondary);
}

.gallery-album-pill.active {
  background-color: var(--portal-primary);
  color: #ffffff;
  border-color: var(--portal-primary);
  box-shadow: 0 4px 12px rgba(11, 28, 61, 0.2);
}

.gallery-album-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.15rem 0.5rem;
  font-size: 0.725rem;
  font-weight: 700;
  border-radius: var(--portal-radius-pill);
  background-color: rgba(0, 0, 0, 0.06);
  color: inherit;
}

.gallery-album-pill.active .gallery-album-count {
  background-color: var(--portal-accent);
  color: #0f172a;
}

/* Lightbox Arrows */
.gallery-lightbox-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 10000;
}

.gallery-lightbox-btn:hover {
  background-color: rgba(255, 255, 255, 0.3);
  color: #ffffff;
  transform: translateY(-50%) scale(1.08);
}

.gallery-lightbox-prev {
  left: 1.5rem;
}

.gallery-lightbox-next {
  right: 1.5rem;
}

@media (max-width: 767.98px) {
  .gallery-lightbox-btn {
    width: 38px;
    height: 38px;
    font-size: 1rem;
  }
  .gallery-lightbox-prev {
    left: 0.75rem;
  }
  .gallery-lightbox-next {
    right: 0.75rem;
  }
}

/* Dark Mode for Album Pills */
body.dark-mode .gallery-album-pill,
[data-theme="dark"] .gallery-album-pill {
  background-color: var(--portal-surface);
  border-color: var(--portal-border);
  color: var(--portal-text-light);
}

body.dark-mode .gallery-album-pill:hover,
[data-theme="dark"] .gallery-album-pill:hover {
  color: #ffffff;
  background-color: var(--portal-surface-secondary);
  border-color: var(--portal-accent);
}

body.dark-mode .gallery-album-pill.active,
[data-theme="dark"] .gallery-album-pill.active {
  background-color: var(--portal-accent);
  color: #0f172a;
  border-color: var(--portal-accent);
  box-shadow: 0 4px 14px rgba(250, 204, 21, 0.25);
}

body.dark-mode .gallery-album-pill.active .gallery-album-count,
[data-theme="dark"] .gallery-album-pill.active .gallery-album-count {
  background-color: rgba(15, 23, 42, 0.15);
  color: #0f172a;
}

/* 404 Error Page Styling */
.error-number {
  background: linear-gradient(135deg, var(--portal-primary) 0%, #3b82f6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 10px 30px rgba(33, 69, 148, 0.12);
}

[data-theme="dark"] .error-number {
  background: linear-gradient(135deg, #60a5fa 0%, #93c5fd 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 10px 30px rgba(96, 165, 250, 0.2);
}

.error-code-wrapper {
  position: relative;
  display: inline-block;
}

/* ==========================================================================
   READING PROGRESS BAR & FLOATING BACK TO TOP BUTTON
   ========================================================================== */

/* Reading Progress Bar (attached to bottom edge of sticky navbar) */
.reading-progress-container {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3.5px;
  background: rgba(255, 255, 255, 0.12);
  z-index: 1035;
  pointer-events: none;
  overflow: hidden;
}

[data-theme="dark"] .reading-progress-container {
  background: rgba(255, 255, 255, 0.08);
}

.reading-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #facc15 0%, #38bdf8 55%, #2563eb 100%);
  box-shadow: 0 0 10px rgba(250, 204, 21, 0.75), 0 0 4px rgba(56, 189, 248, 0.6);
  border-radius: 0 2px 2px 0;
  transition: width 0.1s cubic-bezier(0.2, 0.8, 0.4, 1);
}

/* Floating Back to Top Button */
.portal-back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--portal-primary) 0%, #1e3a8a 100%);
  color: #ffffff;
  border: 1.5px solid rgba(250, 204, 21, 0.45);
  box-shadow: 0 10px 25px -5px rgba(11, 28, 61, 0.45), 0 8px 10px -6px rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  cursor: pointer;
  z-index: 1045;
  opacity: 0;
  visibility: hidden;
  transform: translateY(18px) scale(0.9);
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              visibility 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              background 0.25s ease,
              border-color 0.25s ease,
              box-shadow 0.25s ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.portal-back-to-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.portal-back-to-top:hover {
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
  color: var(--portal-accent);
  border-color: var(--portal-accent);
  box-shadow: 0 14px 28px -4px rgba(37, 99, 235, 0.5), 0 0 16px rgba(250, 204, 21, 0.35);
  transform: translateY(-4px) scale(1.06);
}

.portal-back-to-top:active {
  transform: translateY(0) scale(0.95);
}

.portal-back-to-top:focus-visible {
  outline: 3px solid var(--portal-accent);
  outline-offset: 3px;
}

/* Dark Theme overrides for Back to Top */
body.dark-mode .portal-back-to-top,
[data-theme="dark"] .portal-back-to-top {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  border-color: rgba(250, 204, 21, 0.5);
  color: #f1f5f9;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.6), 0 0 12px rgba(250, 204, 21, 0.2);
}

body.dark-mode .portal-back-to-top:hover,
[data-theme="dark"] .portal-back-to-top:hover {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: var(--portal-accent);
  border-color: var(--portal-accent);
  box-shadow: 0 14px 28px -4px rgba(37, 99, 235, 0.6), 0 0 18px rgba(250, 204, 21, 0.4);
}

/* Mobile responsive adjustment */
@media (max-width: 767.98px) {
  .portal-back-to-top {
    bottom: 1.25rem;
    right: 1.25rem;
    width: 44px;
    height: 44px;
    font-size: 1.15rem;
  }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  .portal-back-to-top,
  .reading-progress-bar {
    transition: none !important;
  }
}

/* ==========================================================================
   18. ALBUM SPOTLIGHT / INFO CARD (GALERI)
   ========================================================================== */
.album-info-card {
  background: linear-gradient(135deg, rgba(11, 28, 61, 0.03) 0%, rgba(250, 204, 21, 0.06) 100%), var(--portal-surface);
  border: 1px solid var(--portal-border);
  border-left: 5px solid var(--portal-accent);
  box-shadow: 0 4px 20px -2px rgba(11, 28, 61, 0.06), 0 2px 6px -1px rgba(0, 0, 0, 0.04);
  position: relative;
  overflow: hidden;
  transition: var(--portal-transition);
}

.album-info-card::after {
  content: "";
  position: absolute;
  top: -40px;
  right: -40px;
  width: 140px;
  height: 140px;
  background: radial-gradient(circle, rgba(250, 204, 21, 0.15) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

[data-theme="dark"] .album-info-card,
body.dark-mode .album-info-card {
  background: linear-gradient(135deg, rgba(30, 58, 138, 0.22) 0%, rgba(250, 204, 21, 0.05) 100%), var(--portal-surface);
  border-color: var(--portal-border);
  border-left-color: var(--portal-accent);
  box-shadow: 0 6px 24px -2px rgba(0, 0, 0, 0.4);
}

.badge-album-label {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background-color: rgba(11, 28, 61, 0.08);
  color: var(--portal-primary);
  border: 1px solid rgba(11, 28, 61, 0.15);
}

[data-theme="dark"] .badge-album-label,
body.dark-mode .badge-album-label {
  background-color: rgba(250, 204, 21, 0.12);
  color: var(--portal-accent);
  border-color: rgba(250, 204, 21, 0.3);
}

.badge-album-meta {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 500;
  background-color: var(--portal-surface-secondary);
  color: var(--portal-text-muted);
  border: 1px solid var(--portal-border);
}

[data-theme="dark"] .badge-album-meta,
body.dark-mode .badge-album-meta {
  background-color: rgba(255, 255, 255, 0.05);
  color: var(--portal-text-light);
  border-color: rgba(255, 255, 255, 0.1);
}

.album-info-title {
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.album-info-description p {
  line-height: 1.75;
  font-size: 0.975rem;
}

[data-theme="dark"] .album-info-description p,
body.dark-mode .album-info-description p {
  color: #cbd5e1 !important;
}

.btn-album-action {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 1rem;
  border-radius: 9999px;
  font-size: 0.825rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: var(--portal-transition);
}

.btn-album-share {
  background-color: var(--portal-surface);
  color: var(--portal-text);
  border: 1px solid var(--portal-border);
}

.btn-album-share:hover {
  background-color: var(--portal-primary);
  color: #ffffff;
  border-color: var(--portal-primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(11, 28, 61, 0.15);
}

[data-theme="dark"] .btn-album-share,
body.dark-mode .btn-album-share {
  background-color: rgba(255, 255, 255, 0.06);
  color: #f1f5f9;
  border-color: rgba(255, 255, 255, 0.12);
}

[data-theme="dark"] .btn-album-share:hover,
body.dark-mode .btn-album-share:hover {
  background-color: var(--portal-accent);
  color: #0f172a;
  border-color: var(--portal-accent);
}

.btn-album-close {
  background-color: rgba(239, 68, 68, 0.08);
  color: #dc2626;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.btn-album-close:hover {
  background-color: #dc2626;
  color: #ffffff;
  border-color: #dc2626;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.2);
}

[data-theme="dark"] .btn-album-close,
body.dark-mode .btn-album-close {
  background-color: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
  border-color: rgba(239, 68, 68, 0.3);
}

[data-theme="dark"] .btn-album-close:hover,
body.dark-mode .btn-album-close:hover {
  background-color: #ef4444;
  color: #ffffff;
  border-color: #ef4444;
}

/* ==========================================================================
   19. LIVE SEARCH AUTOCOMPLETE DROPDOWN
   ========================================================================== */
.portal-nav-search {
  position: relative;
  width: 270px;
  transition: width 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.portal-nav-search:focus-within {
  width: 330px;
}

.portal-search-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 390px;
  max-width: 92vw;
  background-color: var(--portal-surface);
  border: 1px solid var(--portal-border);
  border-radius: 16px;
  box-shadow: 0 16px 36px -4px rgba(11, 28, 61, 0.22), 0 6px 16px -2px rgba(0, 0, 0, 0.08);
  z-index: 1060;
  overflow: hidden;
  animation: searchDropdownFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes searchDropdownFadeIn {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

[data-theme="dark"] .portal-search-dropdown,
body.dark-mode .portal-search-dropdown {
  background-color: #0f172a;
  border-color: #1e293b;
  box-shadow: 0 20px 40px -4px rgba(0, 0, 0, 0.7), 0 8px 16px -2px rgba(0, 0, 0, 0.4);
}

.search-dropdown-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 1rem 0.45rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--portal-text-muted);
  border-bottom: 1px solid var(--portal-border-subtle);
  background-color: var(--portal-surface-secondary);
}

[data-theme="dark"] .search-dropdown-header,
body.dark-mode .search-dropdown-header {
  background-color: #1e293b;
  border-color: #334155;
  color: #94a3b8;
}

.search-dropdown-list {
  list-style: none;
  margin: 0;
  padding: 0.35rem 0;
  max-height: 380px;
  overflow-y: auto;
}

.search-dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.65rem 1rem;
  text-decoration: none;
  color: var(--portal-text);
  transition: background-color 0.15s ease, color 0.15s ease;
  border-left: 3px solid transparent;
}

.search-dropdown-item:hover,
.search-dropdown-item.active {
  background-color: var(--portal-surface-secondary);
  border-left-color: var(--portal-accent);
}

[data-theme="dark"] .search-dropdown-item,
body.dark-mode .search-dropdown-item {
  color: #f1f5f9;
}

[data-theme="dark"] .search-dropdown-item:hover,
body.dark-mode .search-dropdown-item:hover,
[data-theme="dark"] .search-dropdown-item.active,
body.dark-mode .search-dropdown-item.active {
  background-color: #1e293b;
  border-left-color: var(--portal-accent);
}

.search-item-thumb {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
  background-color: var(--portal-surface-secondary);
}

.search-item-info {
  flex-grow: 1;
  min-width: 0;
}

.search-item-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.2rem;
  font-size: 0.725rem;
}

.search-item-category {
  display: inline-block;
  font-weight: 700;
  color: #2563eb;
  background-color: rgba(37, 99, 235, 0.08);
  padding: 0.1rem 0.45rem;
  border-radius: 4px;
}

[data-theme="dark"] .search-item-category,
body.dark-mode .search-item-category {
  color: #60a5fa;
  background-color: rgba(96, 165, 250, 0.15);
}

.search-item-date {
  color: var(--portal-text-muted);
}

.search-item-title {
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--portal-text);
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

[data-theme="dark"] .search-item-title,
body.dark-mode .search-item-title {
  color: #e2e8f0;
}

.search-dropdown-item:hover .search-item-title,
.search-dropdown-item.active .search-item-title {
  color: #2563eb;
}

[data-theme="dark"] .search-dropdown-item:hover .search-item-title,
body.dark-mode .search-dropdown-item:hover .search-item-title,
[data-theme="dark"] .search-dropdown-item.active .search-item-title,
body.dark-mode .search-dropdown-item.active .search-item-title {
  color: var(--portal-accent);
}

.search-highlight {
  color: #ca8a04;
  font-weight: 700;
  background-color: rgba(250, 204, 21, 0.18);
  padding: 0 2px;
  border-radius: 3px;
}

[data-theme="dark"] .search-highlight,
body.dark-mode .search-highlight {
  color: #facc15;
  background-color: rgba(250, 204, 21, 0.25);
}

.search-dropdown-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.7rem 1rem;
  background-color: var(--portal-surface-secondary);
  border-top: 1px solid var(--portal-border-subtle);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--portal-primary-light);
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.search-dropdown-footer:hover {
  background-color: var(--portal-primary);
  color: #ffffff;
}

[data-theme="dark"] .search-dropdown-footer,
body.dark-mode .search-dropdown-footer {
  background-color: #1e293b;
  border-color: #334155;
  color: var(--portal-accent);
}

[data-theme="dark"] .search-dropdown-footer:hover,
body.dark-mode .search-dropdown-footer:hover {
  background-color: #2563eb;
  color: #ffffff;
}

.search-dropdown-loading,
.search-dropdown-empty {
  padding: 1.5rem 1rem;
  text-align: center;
  color: var(--portal-text-muted);
  font-size: 0.825rem;
}

.search-dropdown-loading .spinner-border {
  width: 1.35rem;
  height: 1.35rem;
  border-width: 2px;
  color: var(--portal-accent);
}

.portal-search-dropdown-mobile {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  width: 100%;
}

/* ==========================================================================
   Mobile Search Input & Bright White Placeholder
   ========================================================================== */
#mobileSearchInput,
.portal-search-input-mobile {
  color: #ffffff !important;
  background-color: rgba(255, 255, 255, 0.08) !important;
  border-color: rgba(255, 255, 255, 0.25) !important;
}

#mobileSearchInput::placeholder,
.portal-search-input-mobile::placeholder {
  color: #ffffff !important;
  opacity: 0.92 !important;
}

#mobileSearchInput::-webkit-input-placeholder,
.portal-search-input-mobile::-webkit-input-placeholder {
  color: #ffffff !important;
  opacity: 0.92 !important;
}

#mobileSearchInput::-moz-placeholder,
.portal-search-input-mobile::-moz-placeholder {
  color: #ffffff !important;
  opacity: 0.92 !important;
}

#mobileSearchInput:-ms-input-placeholder,
.portal-search-input-mobile:-ms-input-placeholder {
  color: #ffffff !important;
  opacity: 0.92 !important;
}

#mobileSearchInput:focus,
.portal-search-input-mobile:focus {
  background-color: rgba(255, 255, 255, 0.15) !important;
  border-color: var(--portal-accent) !important;
  box-shadow: 0 0 0 3px var(--portal-accent-glow) !important;
  color: #ffffff !important;
}




