/* =========================================================
   FEATURES — Carousel + Modal Lightbox
   Compatible with both Design 2 (dm-*) and Design 7 themes
   ========================================================= */

/* ---------- LAYANAN GRID ---------- */
.kad-layanan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 28px;
  padding: 0;
  list-style: none;
}

/* ---------- SERVICE CARD ---------- */
.kad-service-card {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 2px 16px rgba(0,0,0,0.08);
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.kad-service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.14);
}

/* ---------- CAROUSEL inside card ---------- */
.kad-carousel {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #1a1a2e;
  overflow: hidden;
}
.kad-carousel__slides {
  display: flex;
  height: 100%;
  width: 100%;
  transition: transform 0.4s cubic-bezier(.4,0,.2,1);
  will-change: transform;
}
.kad-carousel__slide {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  object-fit: cover;
  flex-shrink: 0;
  display: block;
}

/* Fade (hero beranda — transisi lambat) */
.kad-carousel--fade .kad-carousel__slides {
  display: block;
  position: relative;
  height: 100%;
  transition: none;
  transform: none;
}
.kad-carousel--fade .kad-carousel__slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  flex: none;
  opacity: 0;
  transition: opacity 3s ease-in-out;
  z-index: 0;
  pointer-events: none;
}
.kad-carousel--fade .kad-carousel__slide.kad-carousel__slide--active {
  opacity: 1;
  z-index: 1;
}
.kad-carousel__slide--placeholder {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1a1a2e, #0d3b66);
  color: rgba(255,255,255,0.3);
  font-size: 48px;
}
.kad-carousel__btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.45);
  color: #fff;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
  transition: background 0.2s;
  font-size: 14px;
  padding: 0;
}
.kad-carousel__btn:hover { background: rgba(0,0,0,0.7); }
.kad-carousel__btn--prev { left: 8px; }
.kad-carousel__btn--next { right: 8px; }
.kad-carousel__btn--hidden { display: none; }
.kad-carousel__dots {
  position: absolute;
  bottom: 8px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 6px;
}
.kad-carousel__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background 0.2s;
}
.kad-carousel__dot--active { background: #fff; }

/* ---------- CARD BODY ---------- */
.kad-card-body {
  padding: 20px 22px 22px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.kad-card-title {
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.3;
  color: inherit;
  margin: 0;
}
.kad-card-desc {
  font-size: 0.9rem;
  line-height: 1.6;
  opacity: 0.75;
  margin: 0;
  flex: 1;
}
.kad-card-action {
  margin-top: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--blue-deep);
  text-decoration: none;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
}
.kad-card-action:hover { text-decoration: underline; }

/* ---------- MODAL LIGHTBOX ---------- */
.kad-modal {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.85);
  padding: 20px;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.25s, visibility 0.25s;
}
.kad-modal.is-open {
  visibility: visible;
  opacity: 1;
}
.kad-modal__inner {
  position: relative;
  background: #111;
  border-radius: 12px;
  overflow: hidden;
  max-width: 960px;
  width: 100%;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  transform: scale(0.96);
  transition: transform 0.25s;
}
.kad-modal__inner--carousel {
  max-width: min(96vw, 1100px);
}
.kad-modal.is-open .kad-modal__inner {
  transform: scale(1);
}
.kad-modal__header {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #1a1a1a;
  color: #fff;
  flex-shrink: 0;
}
.kad-modal__title {
  font-size: 1rem;
  font-weight: 700;
  margin: 0;
}
.kad-modal__close {
  background: none;
  border: none;
  color: rgba(255,255,255,0.7);
  font-size: 24px;
  cursor: pointer;
  line-height: 1;
  padding: 0 4px;
  transition: color 0.2s;
}
.kad-modal__close:hover { color: #fff; }
.kad-modal__body {
  padding: 0;
  overflow: hidden;
  background: #0a0a0a;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-height: 0;
  flex: 1;
}
.kad-modal__carousel {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: min(68vh, 560px);
  flex: 1;
}
.kad-modal__viewport {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 4px;
  max-height: 72vh;
}
.kad-modal__img {
  max-width: 100%;
  max-height: min(70vh, 800px);
  width: auto;
  height: auto;
  object-fit: contain;
  vertical-align: middle;
}
.kad-modal__nav {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  margin: 0 6px;
  border: none;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  color: #fff;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s;
}
.kad-modal__nav:hover {
  background: rgba(14, 165, 233, 0.28);
}
.kad-modal__nav--hidden {
  visibility: hidden;
  pointer-events: none;
}
.kad-modal__meta {
  text-align: center;
  padding: 8px 16px 4px;
  color: rgba(255,255,255,0.6);
  font-size: 0.82rem;
}
.kad-modal__dots {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  padding: 6px 16px 18px;
}
.kad-modal__dots--hidden {
  display: none;
}
.kad-modal__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  padding: 0;
  background: rgba(255,255,255,0.28);
  cursor: pointer;
  transition: transform 0.15s, background 0.15s;
}
.kad-modal__dot:hover {
  background: rgba(255,255,255,0.45);
}
.kad-modal__dot--active {
  background: var(--blue-deep);
  transform: scale(1.2);
}
.kad-modal__empty {
  color: rgba(255,255,255,0.5);
  text-align: center;
  padding: 40px 24px;
}

/* ---------- PUBLICATION LIST ---------- */
.kad-pub-search {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.kad-pub-search__input {
  flex: 1;
  min-width: 200px;
  padding: 10px 16px;
  border: 1.5px solid rgba(0,0,0,0.12);
  border-radius: 8px;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s;
}
.kad-pub-search__input:focus { border-color: #c9a84c; }
.kad-pub-search__btn {
  padding: 10px 22px;
  background: #c9a84c;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}
.kad-pub-search__btn:hover { background: #b8973e; }
.kad-pub-filter {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}
.kad-pub-filter__pill {
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  border: 1.5px solid rgba(0,0,0,0.12);
  background: transparent;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  transition: all 0.2s;
}
.kad-pub-filter__pill:hover,
.kad-pub-filter__pill--active {
  background: #c9a84c;
  border-color: #c9a84c;
  color: #fff;
}

/* ---------- POST LIST CARD (horizontal) ---------- */
.kad-post-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.kad-post-item {
  display: flex;
  gap: 20px;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  transition: box-shadow 0.2s;
  text-decoration: none;
  color: inherit;
}
.kad-post-item:hover {
  box-shadow: 0 6px 24px rgba(0,0,0,0.12);
}
.kad-post-thumb {
  width: 180px;
  min-height: 140px;
  flex-shrink: 0;
  background: #ddd;
  object-fit: cover;
}
.kad-post-thumb--placeholder {
  width: 180px;
  min-height: 140px;
  flex-shrink: 0;
  background: linear-gradient(135deg, #1a1a2e, #0d3b66);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  opacity: 0.6;
}
.kad-post-body {
  padding: 18px 20px 18px 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}
.kad-post-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.kad-post-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.kad-post-badge--berita      { background: #e3f2fd; color: #1565c0; }
.kad-post-badge--foto        { background: #f3e5f5; color: #6a1b9a; }
.kad-post-badge--video       { background: #fce4ec; color: #880e4f; }
.kad-post-badge--pinned      { background: #ffedd5; color: #c2410c; }
.kad-post-date {
  font-size: 0.8rem;
  opacity: 0.6;
}
.kad-post-title {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.35;
  margin: 0;
}
.kad-post-excerpt {
  font-size: 0.88rem;
  line-height: 1.55;
  opacity: 0.7;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (max-width: 600px) {
  .kad-post-item { flex-direction: column; }
  .kad-post-thumb,
  .kad-post-thumb--placeholder {
    width: 100%;
    min-height: 180px;
  }
  .kad-post-body { padding: 16px; }
}

/* ---------- PUBLIKASI — Galeri foto (viewer: utama + thumbnail) ---------- */
.kad-pub-gallery-viewer {
  margin-bottom: 28px;
  width: 100%;
}
.kad-pub-gallery-viewer__stage {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.kad-pub-gallery-viewer__main-wrap {
  flex: 1;
  min-width: 0;
  margin: 0;
  border-radius: 12px;
  overflow: hidden;
  background: #0f172a;
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.12);
}
.kad-pub-gallery-viewer__main-wrap--interactive .kad-pub-gallery-viewer__main {
  cursor: zoom-in;
}
.kad-pub-gallery-viewer__main {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: contain;
  background: #0f172a;
  transition: opacity 0.25s ease;
}
.kad-pub-gallery-viewer__main.is-changing {
  opacity: 0.55;
}
.kad-pub-gallery-viewer__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 1rem;
  background: rgba(15, 23, 42, 0.92);
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.82rem;
}
.kad-pub-gallery-viewer__counter {
  font-weight: 600;
  letter-spacing: 0.04em;
}
.kad-pub-gallery-viewer__expand {
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.08);
  color: inherit;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.kad-pub-gallery-viewer__expand:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.5);
}
.kad-pub-gallery-viewer__nav {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.08);
  color: #0f172a;
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}
.kad-pub-gallery-viewer__nav:hover {
  background: rgba(14, 165, 233, 0.15);
  transform: scale(1.05);
}
.kad-pub-gallery-viewer__nav:focus-visible {
  outline: 2px solid #0ea5e9;
  outline-offset: 2px;
}
.kad-pub-gallery-viewer__thumbs {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.5rem;
  margin-top: 0.85rem;
  padding: 0.25rem 0;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
}
.kad-pub-gallery-viewer__thumb {
  flex: 0 0 auto;
  width: 88px;
  height: 66px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  background: #e2e8f0;
  scroll-snap-align: start;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.kad-pub-gallery-viewer__thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.kad-pub-gallery-viewer__thumb:hover {
  transform: translateY(-2px);
}
.kad-pub-gallery-viewer__thumb--active {
  border-color: #0ea5e9;
  box-shadow: 0 4px 14px rgba(14, 165, 233, 0.35);
}
.kad-pub-gallery-viewer__thumb:focus-visible {
  outline: 2px solid #0ea5e9;
  outline-offset: 2px;
}
@media (max-width: 640px) {
  .kad-pub-gallery-viewer__stage {
    flex-direction: column;
    align-items: stretch;
  }
  .kad-pub-gallery-viewer__nav {
    display: none;
  }
  .kad-pub-gallery-viewer__thumb {
    width: 72px;
    height: 54px;
  }
}
/* Legacy grid trigger (arsip / referensi) */
.kad-pub-gallery-trigger {
  cursor: pointer;
  margin-bottom: 28px;
  border-radius: 12px;
  padding: 0;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
  font: inherit;
  color: inherit;
}
.kad-pub-grid-wrap {
  width: 100%;
}
.kad-pub-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
}
.kad-pub-gallery-grid__img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: 8px;
  display: block;
}
.kad-pub-gallery-hint {
  margin: 12px 0 0;
  font-size: 0.88rem;
  opacity: 0.65;
  text-align: center;
}
.kad-pub-gallery-hint--d7 {
  color: var(--gray, #8a9bb0);
}
.kad-video-frame {
  position: relative;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  border-radius: 10px;
  overflow: hidden;
  background: #000;
}

.kad-video-frame--ratio {
  aspect-ratio: 16 / 9;
  height: auto;
}

.kad-video-frame--ratio-portrait {
  aspect-ratio: 9 / 16;
  width: 100%;
  max-width: min(100%, 420px);
  margin-inline: auto;
}

.kad-video-frame__iframe {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.kad-video-frame__video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

/* ---------- DARK THEME ADJUSTMENTS ---------- */
.dm-page-inner .kad-post-item,
.dm-section .kad-post-item {
  background: rgba(255,255,255,0.05);
  box-shadow: 0 2px 12px rgba(0,0,0,0.2);
}
.dm-page-inner .kad-pub-search__input {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.15);
  color: #fff;
}
.dm-page-inner .kad-pub-filter__pill {
  border-color: rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.8);
}

/* ---------- TRIX / RICH CONTENT ---------- */
.kad-trix-content {
  font-size: 1.05rem;
  line-height: 1.85;
  color: inherit;
  max-width: 100%;
  overflow-wrap: break-word;
  text-align: justify;
}
.kad-trix-content p {
  margin: 0 0 1em;
}
.kad-trix-content p:last-child {
  margin-bottom: 0;
}
.kad-trix-content h2,
.kad-trix-content h3 {
  margin: 1.25em 0 0.5em;
  line-height: 1.25;
}
.kad-trix-content h2:first-child,
.kad-trix-content h3:first-child {
  margin-top: 0;
}
.kad-trix-content ul,
.kad-trix-content ol {
  margin: 0 0 1em 1.2em;
  padding: 0;
}
.kad-trix-content a {
  color: #0369a1;
  text-decoration: underline;
}
.kad-trix-content blockquote {
  margin: 1em 0;
  padding-left: 1em;
  border-left: 4px solid rgba(201, 168, 76, 0.6);
  opacity: 0.95;
}
.kad-trix-content img,
.kad-trix-content figure img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 1em 0;
}
.kad-trix-content .kad-text-align-left,
.kad-trix-content [style*="text-align: left"] {
  text-align: left;
}
.kad-trix-content .kad-text-align-center,
.kad-trix-content [style*="text-align: center"] {
  text-align: center;
}
.kad-trix-content .kad-text-align-right,
.kad-trix-content [style*="text-align: right"] {
  text-align: right;
}
.kad-trix-content .kad-text-align-justify,
.kad-trix-content [style*="text-align: justify"] {
  text-align: justify;
}

/* ---------- MITRA LOGO STRIP ---------- */
.kad-mitra-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: clamp(1rem, 3vw, 2rem);
  padding: 0.5rem 0 1rem;
}
.kad-mitra-strip__item {
  flex: 0 0 auto;
  padding: 12px 20px;
  background: rgba(255,255,255,0.92);
  border-radius: 12px;
  border: 1px solid rgba(14, 165, 233, 0.18);
  box-shadow: 0 4px 16px rgba(14, 165, 233, 0.08);
}
.kad-mitra-strip__item img {
  display: block;
  max-height: 52px;
  width: auto;
  max-width: 140px;
  object-fit: contain;
}
.kad-mitra-strip--d7 .kad-mitra-strip__item--d7 {
  background: #fff;
  border-color: rgba(10, 22, 40, 0.1);
  box-shadow: 0 4px 18px rgba(10, 22, 40, 0.07);
}
.kad-mitra-strip--d7 .kad-mitra-strip__item--d7 img {
  filter: none;
}

/* ---------- MITRA MARQUEE (home) ---------- */
.kad-mitra-marquee {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  overflow: hidden;
  padding: 0.35rem 0;
}
.kad-mitra-marquee__row {
  overflow: hidden;
  width: 100%;
  mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
}
.kad-mitra-marquee__track {
  display: flex;
  width: max-content;
  gap: 1rem;
  animation: kad-mitra-marquee-loop 55s linear infinite;
}
.kad-mitra-marquee__row--alt-b .kad-mitra-marquee__track {
  animation-direction: reverse;
}
@keyframes kad-mitra-marquee-loop {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.kad-mitra-marquee__cell {
  flex: 0 0 auto;
  width: 148px;
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  box-sizing: border-box;
  background: rgba(255, 255, 255, 0.94);
  border-radius: 10px;
  border: 1px solid rgba(14, 165, 233, 0.16);
  box-shadow: 0 4px 14px rgba(14, 165, 233, 0.08);
}
.kad-mitra-marquee__cell img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}
@media (prefers-reduced-motion: reduce) {
  .kad-mitra-marquee__track {
    animation: none;
    flex-wrap: wrap;
    width: 100%;
    justify-content: center;
    row-gap: 1rem;
  }
  .kad-mitra-marquee__row {
    overflow: visible;
    mask-image: none;
  }
  .kad-mitra-marquee__cell[aria-hidden="true"] {
    display: none;
  }
}

/* ---------- INLINE CAROUSEL (ABOUT / HERO) ---------- */
.kad-carousel--inline {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  background: #0f172a;
  aspect-ratio: 16 / 10;
}
.kad-carousel--inline .kad-carousel__slides {
  height: 100%;
}
.kad-carousel--hero {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 100%;
  border-radius: 0;
  aspect-ratio: auto;
  z-index: 0;
}
.kad-carousel--hero .kad-carousel__slides {
  height: 100%;
}
.kad-carousel--d7-hero {
  border-radius: 0;
  aspect-ratio: auto;
}
.kad-carousel--d7-hero .kad-carousel__slides {
  height: 100%;
}

/* ---------- PEMEGANG SAHAM: maks. 3 kartu per baris ---------- */
.kad-pemegang-saham-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}
@media (max-width: 720px) {
  .kad-pemegang-saham-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 480px) {
  .kad-pemegang-saham-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- BERANDA: DEWAN DIREKSI (grid 2×2, kartu horizontal) ---------- */
.kad-direksi-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1rem, 2.5vw, 1.5rem);
}
@media (min-width: 768px) {
  .kad-direksi-grid .kad-direksi-card:nth-child(1) { grid-column: 2; grid-row: 1; }
  .kad-direksi-grid .kad-direksi-card:nth-child(2) { grid-column: 1; grid-row: 1; }
  .kad-direksi-grid .kad-direksi-card:nth-child(3) { grid-column: 2; grid-row: 2; }
  .kad-direksi-grid .kad-direksi-card:nth-child(4) { grid-column: 1; grid-row: 2; }
}
.kad-direksi-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.85fr);
  align-items: stretch;
  min-height: 200px;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.kad-direksi-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 36px rgba(14, 165, 233, 0.14);
}
.kad-direksi-card--reverse {
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1fr);
}
.kad-direksi-card--reverse .kad-direksi-card__body {
  order: 2;
}
.kad-direksi-card--reverse .kad-direksi-card__photo {
  order: 1;
}
.kad-direksi-card__body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(1.1rem, 2.5vw, 1.6rem);
  min-width: 0;
}
.kad-direksi-card__name {
  margin: 0 0 0.4rem;
  font-family: var(--font-display, 'Poppins', sans-serif);
  font-size: clamp(1rem, 1.8vw, 1.15rem);
  font-weight: 700;
  line-height: 1.25;
  color: var(--ink, #0f172a);
}
.kad-direksi-card__role {
  margin: 0;
  font-size: clamp(0.82rem, 1.5vw, 0.92rem);
  font-weight: 600;
  line-height: 1.35;
  color: var(--turquoise-dark, #0e7490);
}
.kad-direksi-card__division {
  margin: 0.3rem 0 0;
  font-size: 0.78rem;
  line-height: 1.35;
  color: var(--muted, #64748b);
}
.kad-direksi-card__photo {
  position: relative;
  min-height: 200px;
  overflow: hidden;
  background: linear-gradient(145deg, rgba(14, 165, 233, 0.1) 0%, rgba(15, 23, 42, 0.07) 100%);
}
.kad-direksi-card__photo img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 200px;
  object-fit: cover;
  object-position: center 22%;
}
.kad-direksi-card__placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 200px;
  font-size: 2.75rem;
  color: rgba(15, 23, 42, 0.2);
}
@media (max-width: 767px) {
  .kad-direksi-grid {
    grid-template-columns: 1fr;
  }
  .kad-direksi-grid .kad-direksi-card:nth-child(n) {
    grid-column: auto;
    grid-row: auto;
  }
  .kad-direksi-card,
  .kad-direksi-card--reverse {
    grid-template-columns: 1fr;
  }
  /* Mobile: foto selalu di atas, teks di bawah (tanpa zigzag) */
  .kad-direksi-card__photo,
  .kad-direksi-card--reverse .kad-direksi-card__photo {
    order: 1;
    min-height: 220px;
  }
  .kad-direksi-card__body,
  .kad-direksi-card--reverse .kad-direksi-card__body {
    order: 2;
  }
}

/* ---------- SERTIFIKAT & ASOSIASI (grid 3 kolom, rata kiri) ---------- */
.kad-sertifikat-page {
  padding-top: 40px;
  padding-bottom: 64px;
}
.kad-sertifikat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  justify-items: stretch;
  align-items: stretch;
}
.kad-sertifikat-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  text-decoration: none;
  color: inherit;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 14px;
  overflow: visible;
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.kad-sertifikat-card:has(.kad-sertifikat-card__dropdown[open]) {
  position: relative;
  z-index: 20;
}
.kad-sertifikat-card--multi {
  cursor: default;
}
.kad-sertifikat-card--multi:hover {
  transform: translateY(-3px);
  border-color: rgba(14, 165, 233, 0.25);
  box-shadow: 0 12px 32px rgba(14, 165, 233, 0.12);
}
.kad-sertifikat-card__media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 14px 14px 0 0;
  background: linear-gradient(145deg, rgba(14, 165, 233, 0.08) 0%, rgba(15, 23, 42, 0.05) 100%);
}
.kad-sertifikat-card__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}
.kad-sertifikat-card--multi:hover .kad-sertifikat-card__media img {
  transform: scale(1.03);
}
.kad-sertifikat-card__placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-size: 2.75rem;
  opacity: 0.3;
}
.kad-sertifikat-card__category {
  position: absolute;
  top: 0.65rem;
  left: 0.65rem;
  z-index: 1;
  display: block;
  padding: 0.25rem 0.6rem;
  max-width: calc(100% - 1.3rem);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(6px);
  color: var(--turquoise-dark, #0e7490);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.3;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}
.kad-sertifikat-card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 0.75rem;
  padding: 0.9rem 1rem 1rem;
}
.kad-sertifikat-card__name {
  margin: 0;
  font-family: var(--font-display, 'Poppins', sans-serif);
  font-size: clamp(0.9rem, 1.5vw, 1rem);
  font-weight: 700;
  line-height: 1.4;
  color: var(--ink, #0f172a);
  text-align: left;
}
.kad-sertifikat-card__docs {
  position: relative;
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.kad-sertifikat-card__pdf-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 2rem;
  height: 1.35rem;
  border-radius: 4px;
  background: rgba(220, 38, 38, 0.12);
  color: #b91c1c;
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}
.kad-sertifikat-card__pdf-btn {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.6rem 0.75rem;
  border-radius: 10px;
  background: rgba(14, 165, 233, 0.07);
  border: 1px solid rgba(14, 165, 233, 0.15);
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.kad-sertifikat-card__pdf-btn:hover {
  background: rgba(14, 165, 233, 0.12);
  border-color: rgba(14, 165, 233, 0.28);
}
.kad-sertifikat-card__pdf-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--blue-deep, #0369a1);
  line-height: 1.35;
  word-break: break-word;
}
.kad-sertifikat-card__dropdown {
  position: relative;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.03);
  border: 1px solid rgba(15, 23, 42, 0.08);
}
.kad-sertifikat-card__dropdown-toggle {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.6rem 0.75rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink, #0f172a);
  cursor: pointer;
  list-style: none;
  user-select: none;
  border-radius: 10px;
  transition: background 0.15s ease;
}
.kad-sertifikat-card__dropdown-toggle::-webkit-details-marker {
  display: none;
}
.kad-sertifikat-card__dropdown-toggle::after {
  content: '';
  margin-left: auto;
  width: 0.45rem;
  height: 0.45rem;
  border-right: 2px solid var(--muted, #64748b);
  border-bottom: 2px solid var(--muted, #64748b);
  transform: rotate(45deg);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}
.kad-sertifikat-card__dropdown[open] .kad-sertifikat-card__dropdown-toggle {
  background: rgba(14, 165, 233, 0.07);
}
.kad-sertifikat-card__dropdown[open] .kad-sertifikat-card__dropdown-toggle::after {
  transform: rotate(-135deg);
  margin-top: 0.2rem;
}
.kad-sertifikat-card__dropdown-toggle:hover {
  background: rgba(14, 165, 233, 0.06);
}
.kad-sertifikat-card__dropdown-list {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 30;
  list-style: none;
  margin: 0;
  padding: 0.35rem 0.5rem 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  max-height: 220px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.14);
}
.kad-sertifikat-card__dropdown-item {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.5rem 0.55rem;
  border-radius: 8px;
  background: #fff;
}
.kad-sertifikat-card__dropdown-link {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--blue-deep, #0369a1);
  text-decoration: none;
  line-height: 1.35;
  word-break: break-word;
}
.kad-sertifikat-card__dropdown-link:hover {
  color: var(--turquoise-dark, #0e7490);
  text-decoration: underline;
}
.kad-sertifikat-card__expiry {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--muted, #64748b);
}
.kad-sertifikat-card__empty {
  margin: 0;
  margin-top: auto;
  padding: 0.55rem 0.65rem;
  font-size: 0.8rem;
  text-align: left;
  color: var(--muted, #64748b);
  background: rgba(15, 23, 42, 0.03);
  border-radius: 8px;
}
.kad-sertifikat-filter {
  margin-bottom: 1.75rem;
}
.kad-sertifikat-page .kad-pub-search {
  margin-bottom: 1rem;
}
.kad-sertifikat-empty {
  text-align: center;
  color: var(--muted, #64748b);
  padding: 48px 0;
}
@media (max-width: 900px) {
  .kad-sertifikat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 560px) {
  .kad-sertifikat-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- BERANDA: stats pengunjung ---------- */
.kad-home-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1.6fr 1fr;
  gap: clamp(1rem, 3vw, 2rem);
  text-align: center;
  align-items: center;
}
.kad-home-stat-block {
  min-width: 0;
}
.kad-home-stat-label {
  opacity: 0.7;
  margin-top: 4px;
  font-size: 0.92rem;
}
.kad-home-stat-block--visitors {
  padding: clamp(0.75rem, 2vw, 1rem);
  border-left: 1px solid rgba(255, 255, 255, 0.12);
  border-right: 1px solid rgba(255, 255, 255, 0.12);
}
.kad-home-stat-block__heading {
  margin: 0 0 0.75rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.75;
}
.kad-home-visitor-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(0.5rem, 2vw, 1rem);
}
.kad-home-visitor-stat {
  min-width: 0;
}
@media (max-width: 767px) {
  .kad-home-stats-grid {
    grid-template-columns: 1fr;
  }
  .kad-home-stat-block--visitors {
    border-left: none;
    border-right: none;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    padding-block: 1.25rem;
  }
}

/* ---------- VIEW COUNT meta ---------- */
.kad-view-count {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.8rem;
  color: var(--muted, #64748b);
  opacity: 0.9;
}
.kad-view-count svg {
  flex-shrink: 0;
  opacity: 0.75;
}

/* ---------- FORM page list ---------- */
.kad-form-page {
  padding-top: 48px;
  padding-bottom: 64px;
  max-width: 860px;
}
.kad-form-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.kad-form-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.kad-form-row__name {
  font-weight: 600;
  color: var(--text, #0f172a);
  min-width: 0;
}
.kad-form-row__action {
  flex-shrink: 0;
}
.kad-form-row__btn {
  text-decoration: none;
  white-space: nowrap;
}
.kad-form-row__disabled {
  font-size: 0.85rem;
  color: var(--muted, #64748b);
  opacity: 0.8;
}
.kad-form-row--empty {
  justify-content: center;
  opacity: 0.65;
}
@media (max-width: 640px) {
  .kad-form-row {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }
  .kad-form-row__action {
    display: flex;
    justify-content: center;
  }
}

/* ---------- FORM verify modal ---------- */
.kad-form-verify-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.kad-form-verify-modal[hidden] {
  display: none !important;
}
.kad-form-verify-modal.is-open {
  display: flex;
}
.kad-form-verify-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
}
.kad-form-verify-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(100%, 420px);
  padding: 1.5rem;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.18);
}
.kad-form-verify-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.kad-form-verify-modal__header h2 {
  margin: 0;
  font-size: 1.15rem;
}
.kad-form-verify-modal__close {
  border: 0;
  background: transparent;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  color: var(--muted, #64748b);
}
.kad-form-verify-modal__lead {
  margin: 0 0 1rem;
  font-size: 0.92rem;
  color: var(--muted, #64748b);
}
.kad-form-verify-modal__form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.kad-form-verify-modal__field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.88rem;
  font-weight: 600;
}
.kad-form-verify-modal__field input {
  font: inherit;
  font-weight: 400;
  padding: 0.65rem 0.75rem;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 8px;
}
.kad-form-verify-modal__error {
  margin: 0;
  font-size: 0.85rem;
  color: #b91c1c;
}
.kad-form-verify-modal__submit {
  margin-top: 0.25rem;
  width: 100%;
}

/* ---------- K3LH page ---------- */
.kad-k3lh-page {
  padding-top: 48px;
  padding-bottom: 64px;
}
.kad-k3lh-flow__text {
  min-width: 0;
}
.kad-k3lh-galleries {
  margin-top: clamp(2rem, 4vw, 3rem);
}
.kad-k3lh-galleries__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}
@media (min-width: 640px) {
  .kad-k3lh-galleries__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 992px) {
  .kad-k3lh-galleries__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
.kad-k3lh-gallery-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--surface-2, #f8fafc);
  border: 1px solid rgba(14, 165, 233, 0.28);
  border-left: 4px solid var(--blue-deep, #0369a1);
  box-shadow: 0 4px 22px rgba(3, 105, 161, 0.09);
  transition: box-shadow 0.25s ease, transform 0.25s ease;
  cursor: pointer;
}
.kad-k3lh-gallery-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(14, 165, 233, 0.14);
}
.kad-k3lh-gallery-card__media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.04);
}
.kad-k3lh-gallery-card__media .kad-carousel,
.kad-k3lh-gallery-card__media .kad-carousel__slides,
.kad-k3lh-gallery-card__media .kad-carousel__slide {
  height: 100%;
}
.kad-k3lh-gallery-card__media .kad-carousel__slide {
  object-fit: cover;
}
.kad-k3lh-gallery-card__body {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding: 1rem 1.1rem 1.15rem;
}
.kad-k3lh-gallery-card__title {
  margin: 0;
  font-family: var(--font-display, 'Poppins', sans-serif);
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink, #0f172a);
  line-height: 1.35;
}
.kad-k3lh-gallery-card__action {
  align-self: flex-start;
  border: 0;
  background: none;
  padding: 0;
  cursor: pointer;
}
.kad-k3lh-pdfs {
  margin-top: clamp(2rem, 4vw, 3rem);
  padding-top: clamp(1.5rem, 3vw, 2rem);
  border-top: 1px solid rgba(15, 23, 42, 0.1);
}
.kad-k3lh-pdfs__title {
  margin: 0 0 1rem;
  font-family: var(--font-display, 'Poppins', sans-serif);
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  font-weight: 700;
  color: var(--ink, #0f172a);
}
.kad-k3lh-pdfs__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.kad-k3lh-pdfs__item {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.04);
  border: 1px solid rgba(15, 23, 42, 0.08);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.kad-k3lh-pdfs__item:hover {
  border-color: rgba(14, 165, 233, 0.28);
  box-shadow: 0 10px 28px rgba(14, 165, 233, 0.12);
  transform: translateY(-1px);
}
.kad-k3lh-pdfs__card-hit {
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
}
.kad-k3lh-pdfs__name {
  position: relative;
  z-index: 0;
  flex: 1;
  min-width: 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink, #0f172a);
  line-height: 1.4;
  word-break: break-word;
  pointer-events: none;
}
.kad-k3lh-pdfs__download {
  position: relative;
  z-index: 2;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  background: var(--blue-deep, #0369a1);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: background 0.2s ease, transform 0.2s ease;
}
.kad-k3lh-pdfs__download:hover {
  background: var(--turquoise-dark, #0e7490);
  transform: translateY(-1px);
}

