/* ============================================================
   PUSKESMAS TARUMAJAYA - CORE DESIGN SYSTEM & STYLESHEET
   Refactored from index.html with enhancements for uniform pages
   ============================================================ */

:root {
  --primary: #48AA81;
  --primary-dark: #378665;
  --primary-darker: #173627;
  --primary-light: #e8f7ef;
  --primary-subtle: rgba(72, 170, 129, 0.08);
  --primary-gradient: linear-gradient(135deg, #48AA81 0%, #2f7d5b 100%);
  --bg-page: #f5faf5;
  --text-dark: #173627;
  --text-muted: #5e796c;
  --card-shadow: 0 10px 25px rgba(23, 54, 39, 0.07);
  --card-shadow-hover: 0 16px 32px rgba(72, 170, 129, 0.18);
  --border-radius: 12px;
  --transition-fast: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base Styles */
html,
body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--text-dark);
  background: var(--bg-page);
  scroll-behavior: smooth;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: 'Poppins', 'Inter', sans-serif;
  color: var(--primary-darker);
  font-weight: 700;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: var(--transition-fast);
}

a:hover {
  color: var(--primary-dark);
}

/* ============================================================
   TOP INFO BAR (OPTIONAL QUICK BAR)
   ============================================================ */
.top-info-bar {
  background: #173627;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.82rem;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.top-info-bar a {
  color: rgba(255, 255, 255, 0.9);
}

.top-info-bar a:hover {
  color: #79e3b4;
}

/* ============================================================
   MAIN HEADER & NAVIGATION
   ============================================================ */
.main-header {
  background: #ffffff;
  position: sticky;
  top: 0;
  z-index: 1100;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.06);
  border-bottom: 1px solid rgba(72, 170, 129, 0.12);
  transition: var(--transition-fast);
}

.header-upper {
  padding: 14px 0;
}

.logo-outer {
  display: flex;
  align-items: center;
  gap: 16px;
}

.logo-outer .logo img {
  height: 58px;
  width: auto;
  max-width: 280px;
  object-fit: contain;
  display: block;
}

.main-menu .navigation {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
  justify-content: flex-end;
  align-items: center;
}

.main-menu .navigation>li>a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  border-radius: 12px;
  color: var(--primary-darker);
  background: var(--primary-subtle);
  font-weight: 600;
  font-size: 0.88rem;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  transition: var(--transition-fast);
}

.main-menu .navigation>li>a:hover,
.main-menu .navigation>li.active>a {
  background: var(--primary);
  color: #ffffff !important;
  box-shadow: 0 10px 20px rgba(72, 170, 129, 0.25);
  transform: translateY(-1px);
}

/* Dropdown Menu - Desktop */
@media (min-width: 992px) {
  .dropdown {
    position: relative;
  }

  .dropdown-menu {
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    min-width: 250px !important;
    background: #ffffff !important;
    border: 1px solid rgba(72, 170, 129, 0.15) !important;
    border-radius: 14px !important;
    box-shadow: 0 18px 40px rgba(23, 54, 39, 0.12) !important;
    padding: 10px 0 !important;
    margin-top: 8px !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transform: translateY(10px) !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
    z-index: 1200 !important;
    display: block !important;
  }

  .dropdown:hover .dropdown-menu,
  .dropdown.open .dropdown-menu {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
  }

  .dropdown-item {
    display: block !important;
    padding: 11px 20px !important;
    color: var(--text-dark) !important;
    font-size: 0.92rem !important;
    font-weight: 500 !important;
    transition: var(--transition-fast) !important;
    border-radius: 8px !important;
    margin: 2px 8px !important;
  }

  .dropdown-item:hover,
  .dropdown-item.active {
    background: var(--primary-light) !important;
    color: var(--primary-darker) !important;
    transform: translateX(5px) !important;
    font-weight: 600 !important;
  }

  .dropdown>a::after {
    content: '▾';
    margin-left: 6px;
    font-size: 0.85em;
    display: inline-block;
    transition: transform 0.25s ease;
  }

  .dropdown:hover>a::after {
    transform: rotate(180deg);
  }
}

/* Hamburger Toggle (Mobile) */
.navbar-toggle-custom {
  display: none;
  background: transparent;
  border: 2px solid var(--primary);
  border-radius: 10px;
  padding: 8px 10px;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
  transition: all 0.3s ease;
}

.navbar-toggle-custom span {
  display: block;
  width: 24px;
  height: 2.5px;
  background: var(--primary);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.navbar-toggle-custom.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.navbar-toggle-custom.active span:nth-child(2) {
  opacity: 0;
}

.navbar-toggle-custom.active span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* Mobile Menu */
@media (max-width: 991.98px) {
  .navbar-toggle-custom {
    display: flex;
  }

  .main-menu .navigation {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #ffffff;
    flex-direction: column !important;
    align-items: stretch !important;
    padding: 16px 20px 24px;
    gap: 8px !important;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
    border-top: 1px solid rgba(72, 170, 129, 0.15);
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transition: all 0.35s ease;
    z-index: 1150;
  }

  .main-menu .navigation.open {
    max-height: 800px;
    opacity: 1;
    visibility: visible;
  }

  .main-menu .navigation li {
    width: 100%;
  }

  .main-menu .navigation>li>a {
    width: 100% !important;
    justify-content: space-between !important;
    padding: 12px 18px !important;
  }

  .main-menu .navigation li.dropdown .dropdown-menu {
    position: static !important;
    box-shadow: none !important;
    border: none !important;
    background: #f5faf5 !important;
    border-radius: 12px !important;
    margin-top: 6px !important;
    padding: 6px 0 !important;
    display: none;
    transform: none !important;
    --bs-dropdown-link-active-bg: #e3f4ec;
    --bs-dropdown-link-active-color: #173627;
    --bs-dropdown-link-hover-bg: #e8f7ef;
    --bs-dropdown-link-hover-color: #173627;
    --bs-dropdown-link-focus-bg: #e3f4ec;
    --bs-dropdown-link-focus-color: #173627;
  }

  .main-menu .navigation li.dropdown.open .dropdown-menu {
    display: block !important;
  }

  .main-menu .navigation li.dropdown .dropdown-item {
    display: block !important;
    padding: 10px 20px !important;
    margin: 2px 8px !important;
    font-size: 0.9rem !important;
    color: var(--text-dark, #173627) !important;
    background-color: transparent !important;
    border-radius: 8px !important;
    box-shadow: none !important;
    transform: none !important;
    transition: background-color 0.2s ease, color 0.2s ease !important;
    -webkit-tap-highlight-color: rgba(72, 170, 129, 0.12);
  }

  .main-menu .navigation li.dropdown .dropdown-item i {
    transition: color 0.2s ease !important;
  }

  /* Active State (Halaman yang sedang dibuka) */
  .main-menu .navigation li.dropdown .dropdown-item.active {
    background-color: #e3f4ec !important;
    color: #173627 !important;
    font-weight: 600 !important;
    box-shadow: inset 3px 0 0 #48AA81 !important;
    transform: none !important;
  }

  .main-menu .navigation li.dropdown .dropdown-item.active i {
    color: #29684c !important;
  }

  /* Pressed State (:active) - mint sedikit lebih pekat dari aktif */
  .main-menu .navigation li.dropdown .dropdown-item:active {
    background-color: #d2ede0 !important;
    color: #173627 !important;
    box-shadow: inset 3px 0 0 #48AA81 !important;
    transform: none !important;
  }

  .main-menu .navigation li.dropdown .dropdown-item:active i {
    color: #173627 !important;
  }

  /* Focus & Focus-Visible State */
  .main-menu .navigation li.dropdown .dropdown-item:focus-visible {
    outline: 2px solid #48AA81 !important;
    outline-offset: -2px;
    background-color: #e3f4ec !important;
    color: #173627 !important;
  }

  .main-menu .navigation li.dropdown .dropdown-item:focus:not(:focus-visible) {
    outline: none !important;
    background-color: transparent !important;
  }

  .main-menu .navigation li.dropdown .dropdown-item.active:focus:not(:focus-visible) {
    background-color: #e3f4ec !important;
  }

  /* Hover only on devices with pointer cursor */
  @media (hover: hover) {
    .main-menu .navigation li.dropdown .dropdown-item:hover:not(.active) {
      background-color: #e8f7ef !important;
      color: #173627 !important;
      transform: none !important;
    }
  }

  .main-menu .navigation li.dropdown>a::after {
    content: '▾';
    margin-left: 8px;
    transition: transform 0.3s ease;
  }

  .main-menu .navigation li.dropdown.open>a::after {
    transform: rotate(180deg);
  }
}

/* ============================================================
   BANNER & HERO SECTIONS
   ============================================================ */
.hero-banner-section {
  position: relative;
  width: 100%;
  min-height: clamp(280px, 70vw, 560px);
  background: linear-gradient(135deg, #173627 0%, #29684c 50%, #48AA81 100%);
  background-size: cover;
  background-position: center;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
}

.hero-banner-section .hero-bg-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 1;
  pointer-events: none;
}

.hero-banner-section .hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, rgba(15, 35, 25, 0.45) 0%, rgba(15, 35, 25, 0.25) 50%, rgba(15, 35, 25, 0.1) 100%);
  z-index: 2;
  pointer-events: none;
}

/* Gradien gelap tipis dari bawah ke atas agar teks tetap terbaca setelah kartu dipindah */
.hero-banner-section .hero-bottom-gradient {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 70%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0.2) 60%, rgba(0, 0, 0, 0) 100%);
  z-index: 2;
  pointer-events: none;
}

.hero-content-container {
  position: relative;
  z-index: 3;
  width: 100%;
  padding: 0 clamp(24px, 4vw, 40px) clamp(24px, 4vw, 40px);
  margin: 0;
}

.hero-content-wrapper {
  max-width: 540px;
  width: 100%;
}

.hero-text-card {
  background: rgba(23, 54, 39, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 20px 24px;
  max-width: 540px;
  width: 100%;
}

.hero-badge {
  background: #48AA81;
  font-size: 0.72rem;
  letter-spacing: 0.5px;
  margin-bottom: 6px !important;
}

.hero-title {
  font-size: clamp(1.45rem, 2.6vw, 2.05rem);
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin-bottom: 6px !important;
  display: -webkit-box;

  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hero-subtitle {
  display: -webkit-box;

  -webkit-box-orient: vertical;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.85);
  font-size: clamp(0.85rem, 1.4vw, 0.95rem);
  line-height: 1.45;
  margin-top: 0;
}

.carousel-indicators.hero-carousel-indicators {
  position: static;
  margin: 12px 0 0 0;
  padding: 0;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  list-style: none;
  gap: 8px;
  z-index: 4;
}

.carousel-indicators.hero-carousel-indicators button,
.carousel-indicators.hero-carousel-indicators [data-bs-target] {
  box-sizing: content-box;
  flex: 0 0 auto;
  width: 24px;
  height: 6px;
  padding: 0;
  /* sebelumnya 17px 8px */
  margin: 0;
  background-color: rgba(255, 255, 255, 0.55);
  background-clip: padding-box;
  border: 0;
  border-top: 17px solid transparent;
  border-bottom: 17px solid transparent;
  opacity: 0.6;
  border-radius: 3px;
  /* setengah tinggi supaya ujungnya bulat */
  transition: opacity 0.3s ease, width 0.3s ease, background-color 0.3s ease;
  cursor: pointer;
}

.carousel-indicators.hero-carousel-indicators button.active,
.carousel-indicators.hero-carousel-indicators [data-bs-target].active {
  opacity: 1;
  width: 38px;
  background-color: #48AA81;
}

@media (max-width: 767.98px) {
  .hero-content-container {
    padding: 0 14px 14px 14px !important;
  }

  .hero-content-wrapper {
    max-width: 100% !important;
    width: 100% !important;
  }

  .hero-text-card {
    max-width: 100% !important;
    width: 100% !important;
    padding: 14px 18px !important;
    margin-bottom: 0;
  }

  .hero-title {
    font-size: clamp(1.15rem, 4.5vw, 1.45rem) !important;
    line-height: 1.25 !important;

    margin-bottom: 4px !important;
  }

  .hero-subtitle {
    font-size: 0.85rem !important;
    line-height: 1.35 !important;

  }

  .carousel-indicators.hero-carousel-indicators {
    margin-top: 10px !important;
    justify-content: flex-start !important;
  }
}

.bannerSection {
  min-height: 400px;
  background: #e8f7ef;
  position: relative;
  overflow: hidden;
}

.banner {
  width: 100%;
  height: auto;
  max-height: 600px;
  object-fit: cover;
  display: block;
}

/* Dynamic Page Hero for Sub-pages (Profil, ILP, Program, Berita) */
.page-hero {
  background: linear-gradient(135deg, #173627 0%, #29684c 50%, #48AA81 100%);
  color: #ffffff;
  padding: 55px 0 45px;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 -10px 20px rgba(0, 0, 0, 0.05);
}

.page-hero::before {
  content: '';
  position: absolute;
  top: -80px;
  right: -80px;
  width: 320px;
  height: 320px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 50%;
  pointer-events: none;
}

.page-hero .breadcrumb {
  margin-bottom: 12px;
  background: transparent;
  padding: 0;
}

.page-hero .breadcrumb a {
  color: rgba(255, 255, 255, 0.8);
  font-weight: 500;
  font-size: 0.88rem;
}

.page-hero .breadcrumb a:hover {
  color: #ffffff;
}

.page-hero .breadcrumb-item.active {
  color: #79e3b4;
  font-weight: 600;
  font-size: 0.88rem;
}

.page-hero .breadcrumb-item+.breadcrumb-item::before {
  color: rgba(255, 255, 255, 0.5);
}

.page-hero h1 {
  color: #ffffff !important;
  font-size: 2.3rem;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.page-hero p.subtitle {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.05rem;
  max-width: 720px;
  margin-bottom: 0;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn-sm,
.btn-puskesmas {
  background: #48AA81 !important;
  border: 1px solid #48AA81 !important;
  color: #ffffff !important;
  border-radius: 999px;
  padding: 10px 26px;
  font-weight: 600;
  font-size: 0.92rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--transition-fast);
  box-shadow: 0 6px 16px rgba(72, 170, 129, 0.25);
}

.btn-sm:hover,
.btn-puskesmas:hover {
  background: #378665 !important;
  border-color: #378665 !important;
  color: #ffffff !important;
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(72, 170, 129, 0.35);
}

.btn-puskesmas-outline {
  background: transparent !important;
  border: 2px solid #48AA81 !important;
  color: #48AA81 !important;
  border-radius: 999px;
  padding: 9px 24px;
  font-weight: 600;
  font-size: 0.92rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition-fast);
}

.btn-puskesmas-outline:hover {
  background: #48AA81 !important;
  color: #ffffff !important;
}

/* ============================================================
   CARDS (PROGRAM & BERITA)
   ============================================================ */
.card-program {
  border-radius: 14px;
  box-shadow: var(--card-shadow);
  border: 1px solid rgba(72, 170, 129, 0.15);
  border-bottom: 4px solid var(--primary);
  background: #ffffff;
  overflow: hidden;
  transition: var(--transition-fast);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.card-program:hover {
  transform: translateY(-6px);
  box-shadow: var(--card-shadow-hover);
}

.card-program img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.card-program:hover img {
  transform: scale(1.03);
}

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

.card-program h4.card-title {
  font-size: 1.15rem;
  line-height: 1.4;
  color: var(--primary-darker);
  margin-bottom: 10px;
  font-weight: 700;
}

.card-program .card-text {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.card-berita {
  border-radius: 18px;
  box-shadow: var(--card-shadow);
  background: #ffffff;
  padding: 22px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  transition: var(--transition-fast);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.card-berita:hover {
  transform: translateY(-6px);
  box-shadow: var(--card-shadow-hover);
  border-color: rgba(72, 170, 129, 0.3);
}

.img-berita {
  width: 100%;
  border-radius: 12px;
  display: block;
  margin-bottom: 16px;
  aspect-ratio: 16/9;
  object-fit: cover;
  transition: transform 0.4s ease;
}

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

.card-berita h4 {
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.4;
  color: var(--primary-darker);
  margin-bottom: 12px;
  transition: var(--transition-fast);
}

.card-berita h4:hover {
  color: var(--primary);
}

.news-meta-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.8rem;
  color: var(--primary-dark);
  background: var(--primary-light);
  padding: 4px 10px;
  border-radius: 6px;
  font-weight: 600;
  margin-bottom: 10px;
}

/* ============================================================
   CONTENT SURFACES & UNIFORM PAGE LAYOUT
   ============================================================ */
.content-box {
  background: #ffffff;
  border-radius: 18px;
  padding: 36px;
  box-shadow: var(--card-shadow);
  border: 1px solid rgba(72, 170, 129, 0.12);
  line-height: 1.8;
  font-size: 1.02rem;
  color: #2b3a32;
}

.content-box h2,
.content-box h3 {
  margin-top: 1.5rem;
  margin-bottom: 1rem;
  color: var(--primary-darker);
  position: relative;
  padding-bottom: 8px;
}

.content-box h2::after,
.content-box h3::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 48px;
  height: 3px;
  background: var(--primary);
  border-radius: 2px;
}

.content-box img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  margin: 16px 0;
}

.content-box ul,
.content-box ol {
  padding-left: 20px;
  margin-bottom: 1.25rem;
}

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

.content-box blockquote {
  background: var(--primary-light);
  border-left: 4px solid var(--primary);
  padding: 16px 22px;
  border-radius: 0 12px 12px 0;
  font-style: italic;
  color: var(--primary-darker);
  margin: 20px 0;
}

/* Sidebar Widgets */
.sidebar-widget {
  background: #ffffff;
  border-radius: 16px;
  padding: 24px;
  box-shadow: var(--card-shadow);
  border: 1px solid rgba(72, 170, 129, 0.12);
  margin-bottom: 24px;
}

.sidebar-widget h4.widget-title {
  font-size: 1.15rem;
  border-bottom: 2px solid var(--primary-light);
  padding-bottom: 12px;
  margin-bottom: 18px;
  position: relative;
}

.sidebar-widget h4.widget-title::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 36px;
  height: 2px;
  background: var(--primary);
}

.sidebar-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-links li {
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.sidebar-links li:last-child {
  border-bottom: none;
}

.sidebar-links a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 11px 12px;
  color: var(--text-dark);
  font-weight: 500;
  font-size: 0.92rem;
  border-radius: 6px;
  text-decoration: none;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.sidebar-links a:hover,
.sidebar-links a.active {
  background: var(--primary-light);
  color: var(--primary);
}

.sidebar-links .sidebar-link-content {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 10px;
}

.sidebar-links .sidebar-icon-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  min-width: 22px;
  height: 22px;
  text-align: center;
  color: currentColor;
  flex-shrink: 0;
}

.sidebar-links .sidebar-icon-box i {
  font-size: 0.95rem;
  line-height: 1;
  color: inherit;
}

.sidebar-links .sidebar-text {
  line-height: 1.35;
  color: inherit;
}

.sidebar-links .sidebar-chevron {
  font-size: 0.75rem;
  color: #8fa397;
  flex-shrink: 0;
  margin-left: 8px;
  transition: color 0.15s ease;
}

.sidebar-links a:hover .sidebar-chevron,
.sidebar-links a.active .sidebar-chevron {
  color: var(--primary);
}

/* ============================================================
   JADWAL LAYANAN TABLE
   ============================================================ */
.table-schedule-wrapper {
  background: #ffffff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--card-shadow);
  border: 1px solid rgba(72, 170, 129, 0.12);
}

.table-schedule {
  margin-bottom: 0;
  vertical-align: middle;
}

.table-schedule thead {
  background: var(--primary-gradient);
  color: #ffffff;
}

.table-schedule thead th {
  padding: 16px 20px;
  font-weight: 700;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: none;
}

.table-schedule tbody tr {
  transition: var(--transition-fast);
}

.table-schedule tbody tr:hover {
  background: #f0faf5;
}

.table-schedule tbody td {
  padding: 18px 20px;
  border-bottom: 1px solid rgba(72, 170, 129, 0.1);
  color: var(--text-dark);
}

.badge-poli {
  background: var(--primary-light);
  color: var(--primary-dark);
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.85rem;
  display: inline-block;
}

/* ============================================================
   PAGINATION
   ============================================================ */
.pagination {
  gap: 6px;
  justify-content: center;
  margin-top: 36px;
}

.pagination .page-item .page-link {
  color: var(--primary-darker);
  border: 1px solid rgba(72, 170, 129, 0.25);
  border-radius: 10px;
  padding: 8px 16px;
  font-weight: 600;
  background: #ffffff;
  transition: var(--transition-fast);
}

.pagination .page-item.active .page-link {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
  box-shadow: 0 6px 14px rgba(72, 170, 129, 0.3);
}

.pagination .page-item .page-link:hover {
  background: var(--primary-light);
  color: var(--primary-dark);
}

/* ============================================================
   FOOTER (MATCHING EXACT index.html AESTHETICS)
   ============================================================ */
.footer-section {
  background: linear-gradient(135deg, #48AA81 0%, #3d8f6f 100%) !important;
  padding: 45px 20px !important;
  position: relative;
  overflow: hidden;
  color: #ffffff !important;
  text-align: center;
  margin-top: 50px;
}

.footer-section::before {
  content: '';
  position: absolute;
  top: -60px;
  right: -60px;
  width: 240px;
  height: 240px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 50%;
  pointer-events: none;
}

.footer-logo-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 20px;
}

.footer-logo {
  width: 105px !important;
  height: 105px !important;
  object-fit: contain !important;
  background: #ffffff;
  padding: 10px;
  border-radius: 50%;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s ease;
}

.footer-logo:hover {
  transform: scale(1.06) rotate(-3deg);
}

.footer-section .judul-footer {
  color: #ffffff !important;
  font-size: 1.4rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.06em !important;
  margin: 0 0 16px !important;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.footer-line {
  color: rgba(255, 255, 255, 0.95) !important;
  font-size: 0.95rem !important;
  margin: 8px 0 !important;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.footer-line i {
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.footer-social {
  margin: 22px 0 18px !important;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}

.footer-social a {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff !important;
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 500;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition-fast);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.footer-social a:hover {
  background: #ffffff;
  color: #48AA81 !important;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.footer-copy {
  color: rgba(255, 255, 255, 0.85) !important;
  font-size: 0.86rem !important;
  margin: 18px auto 0 !important;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  max-width: 480px;
}

/* ============================================================
   BACK TO TOP & FLOATING HELPERS
   ============================================================ */
.btn-back-to-top {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--primary);
  color: #ffffff;
  border: none;
  box-shadow: 0 8px 24px rgba(72, 170, 129, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition-fast);
}

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

.btn-back-to-top:hover {
  background: var(--primary-dark);
  transform: translateY(-4px);
  color: #ffffff;
}

/* Accessibility Focus States */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid #79e3b4 !important;
  outline-offset: 2px !important;
}

/* ============================================================
   MOBILE ACCORDION FOR JADWAL POLI (< 768px)
   ============================================================ */
.schedule-mobile-accordion {
  margin-top: 10px;
}

.schedule-item-card {
  transition: var(--transition-fast);
  border: 1px solid rgba(72, 170, 129, 0.18) !important;
}

.schedule-item-toggle {
  cursor: pointer;
  outline: none !important;
  transition: background-color 0.2s ease;
}

.schedule-item-toggle:hover,
.schedule-item-toggle[aria-expanded="true"] {
  background: #f4fbf7 !important;
}

.schedule-circle-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary-dark);
  font-weight: 700;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid rgba(72, 170, 129, 0.25);
}

.schedule-chevron-wrapper {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.25s ease, background 0.25s ease;
}

.schedule-chevron-wrapper i {
  transition: transform 0.25s ease;
  font-size: 0.85rem;
}

.schedule-item-toggle[aria-expanded="true"] .schedule-chevron-wrapper {
  background: var(--primary);
}

.schedule-item-toggle[aria-expanded="true"] .schedule-chevron-wrapper i {
  transform: rotate(180deg);
  color: #ffffff !important;
}

/* Responsive Content & Tables */
@media (min-width: 768px) {
  .border-start-md {
    border-left: 3px solid #48AA81 !important;
  }
}

@media (max-width: 767.98px) {
  .border-top-mobile {
    border-top: 2px dashed rgba(72, 170, 129, 0.3) !important;
    padding-top: 12px !important;
    margin-top: 10px !important;
  }

  .content-box {
    padding: 22px 18px !important;
    border-radius: 14px !important;
  }

  .page-hero {
    padding: 36px 0 26px !important;
  }

  .page-hero h1 {
    font-size: 1.65rem !important;
  }

  .content-box table {
    font-size: 0.84rem !important;
  }

  .table-responsive {
    border-radius: 10px;
    border: 1px solid rgba(72, 170, 129, 0.15);
  }

  /* Footer on mobile */
  .footer-line {
    font-size: 0.88rem !important;
    padding: 0 10px;
    line-height: 1.5;
  }
}

/* ============================================================
   RICH EDITOR FALLBACK STYLES & RESPONSIVE TABLES (.konten-editor)
   Point 5: Fallback styling for rich text editor content
   ============================================================ */
.konten-editor,
.konten-editor-tambahan {
  line-height: 1.8;
  color: #2b3a32;
  word-break: break-word;
}

/* Responsive Table Wrapper for RichEditor content */
.konten-editor .table-wrapper,
.konten-editor-tambahan .table-wrapper,
.konten-editor .table-responsive,
.page-body .table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 1.25rem 0;
  border-radius: 10px;
  border: 1px solid rgba(72, 170, 129, 0.2);
}

/* Tables inserted via editor or raw content */
.konten-editor table,
.konten-editor-tambahan table,
.page-body table,
.news-body table,
.program-body table {
  width: 100% !important;
  border-collapse: collapse !important;
  margin: 1.25rem 0 !important;
  background-color: #ffffff;
  border: 1px solid rgba(72, 170, 129, 0.25) !important;
  border-radius: 8px;
  font-size: 0.95rem;
}

/* Table Header - Light Green Background */
.konten-editor table thead th,
.konten-editor table th,
.konten-editor-tambahan table thead th,
.konten-editor-tambahan table th,
.page-body table thead th,
.page-body table th,
.news-body table th,
.program-body table th {
  background-color: #d1e7dd !important;
  /* Light green (matches .table-success) */
  color: #0f5132 !important;
  font-weight: 700;
  padding: 12px 16px !important;
  border: 1px solid rgba(72, 170, 129, 0.25) !important;
  vertical-align: middle;
}

/* Table Cells - Thin Border & Padding */
.konten-editor table td,
.konten-editor-tambahan table td,
.page-body table td,
.news-body table td,
.program-body table td {
  padding: 12px 16px !important;
  border: 1px solid rgba(72, 170, 129, 0.18) !important;
  vertical-align: middle;
}

/* Zebra Striping */
.konten-editor table tbody tr:nth-of-type(odd),
.konten-editor-tambahan table tbody tr:nth-of-type(odd),
.page-body table tbody tr:nth-of-type(odd),
.news-body table tbody tr:nth-of-type(odd),
.program-body table tbody tr:nth-of-type(odd) {
  background-color: #ffffff;
}

.konten-editor table tbody tr:nth-of-type(even),
.konten-editor-tambahan table tbody tr:nth-of-type(even),
.page-body table tbody tr:nth-of-type(even),
.news-body table tbody tr:nth-of-type(even),
.program-body table tbody tr:nth-of-type(even) {
  background-color: rgba(72, 170, 129, 0.05);
}

.konten-editor table tbody tr:hover,
.konten-editor-tambahan table tbody tr:hover,
.page-body table tbody tr:hover {
  background-color: rgba(72, 170, 129, 0.1);
}

/* Remove default paragraph margins inside table cells from TipTap */
.konten-editor table p,
.konten-editor-tambahan table p,
.page-body table p {
  margin-bottom: 0 !important;
}

/* Responsive mobile scrolling for raw tables without container */
@media (max-width: 767.98px) {

  .konten-editor table,
  .konten-editor-tambahan table,
  .page-body table {
    display: block;
    width: 100% !important;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
    border-radius: 8px;
  }

  .konten-editor table th,
  .konten-editor table td,
  .konten-editor-tambahan table th,
  .konten-editor-tambahan table td,
  .page-body table th,
  .page-body table td {
    padding: 10px 12px !important;
    font-size: 0.85rem !important;
    white-space: normal;
  }
}

/* Headings in RichEditor Content */
.konten-editor h1,
.konten-editor h2,
.konten-editor h3,
.konten-editor h4,
.konten-editor-tambahan h1,
.konten-editor-tambahan h2,
.konten-editor-tambahan h3,
.konten-editor-tambahan h4 {
  color: var(--primary-darker, #173627);
  font-weight: 700;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

/* Lists in RichEditor Content */
.konten-editor ul,
.konten-editor ol,
.konten-editor-tambahan ul,
.konten-editor-tambahan ol {
  padding-left: 1.5rem;
  margin-bottom: 1.25rem;
}

.konten-editor li,
.konten-editor-tambahan li {
  margin-bottom: 0.5rem;
}