/* =========================================================
   Komponen & utilitas Page Builder  (awalan kelas: cb-)
   Bisa dipakai di HTML kustom mana pun. Daftar lengkap ada
   di panel admin › Page Builder › Panduan.
   ========================================================= */

/* ---------- Section & container ---------- */
.cb-section { padding: 64px 0; position: relative; }
.cb-pad-0 { padding-top: 0; padding-bottom: 0; }
.cb-pad-s { padding-top: 24px; padding-bottom: 24px; }
.cb-pad-m { padding-top: 48px; padding-bottom: 48px; }
.cb-pad-l { padding-top: 80px; padding-bottom: 80px; }
.cb-pad-xl { padding-top: 120px; padding-bottom: 120px; }
.cb-container { width: 100%; max-width: var(--container, 1240px); margin: 0 auto; padding: 0 24px; }
.cb-narrow { max-width: 860px; }
.cb-wide { max-width: 1440px; }

/* ---------- Latar ---------- */
.cb-bg-white { background: #fff; }
.cb-bg-gray { background: var(--gray, #dbdbdb); }
.cb-bg-soft { background: linear-gradient(180deg, #f2f2f2, #e4e4e4); }
.cb-bg-blue { background: var(--blue, #0084ff); color: #fff; }
.cb-bg-navy { background: var(--navy-deep, #0a1a4a); color: #fff; }
.cb-bg-image { background-size: cover; background-position: center; color: #fff; }
.cb-bg-image::before { content: ""; position: absolute; inset: 0; background: rgba(0, 0, 0, var(--overlay, .35)); }
.cb-bg-image > * { position: relative; }
/* Latar bebas dari Page Builder (panel Gaya › Latar belakang): warna = background-color (rgba, sudah termasuk opacity);
   gambar = lapisan ::before di belakang isi, supaya opacity hanya mengenai gambarnya, bukan teks/isi. */
.cb-bg { position: relative; isolation: isolate; }
.cb-bg::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; border-radius: inherit;
  background-image: var(--bg-img, none); background-size: var(--bg-size, cover); background-position: var(--bg-pos, center);
  background-repeat: var(--bg-rep, no-repeat); background-attachment: var(--bg-att, scroll); opacity: var(--bg-o, 1); }

/* ---------- Flexbox ---------- */
.cb-flex { display: flex; flex-wrap: wrap; gap: var(--gap, 24px); }
.cb-flex > * { flex: 1 1 0; min-width: 0; }
.cb-flex.cb-auto > * { flex: 0 0 auto; }
.cb-nowrap { flex-wrap: nowrap; }
.cb-column { flex-direction: column; }
.cb-reverse { flex-direction: row-reverse; }
.cb-align-start { align-items: flex-start; }
.cb-align-center { align-items: center; }
.cb-align-end { align-items: flex-end; }
.cb-align-stretch { align-items: stretch; }
.cb-justify-start { justify-content: flex-start; }
.cb-justify-center { justify-content: center; }
.cb-justify-end { justify-content: flex-end; }
.cb-justify-between { justify-content: space-between; }
.cb-justify-around { justify-content: space-around; }
.cb-flex > .cb-w-20 { flex: 0 0 calc(20% - var(--gap, 24px) * 0.8); }
.cb-flex > .cb-w-25 { flex: 0 0 calc(25% - var(--gap, 24px) * 0.75); }
.cb-flex > .cb-w-33 { flex: 0 0 calc(33.333% - var(--gap, 24px) * 0.667); }
.cb-flex > .cb-w-40 { flex: 0 0 calc(40% - var(--gap, 24px) * 0.6); }
.cb-flex > .cb-w-50 { flex: 0 0 calc(50% - var(--gap, 24px) * 0.5); }
.cb-flex > .cb-w-60 { flex: 0 0 calc(60% - var(--gap, 24px) * 0.4); }
.cb-flex > .cb-w-66 { flex: 0 0 calc(66.666% - var(--gap, 24px) * 0.333); }
.cb-flex > .cb-w-75 { flex: 0 0 calc(75% - var(--gap, 24px) * 0.25); }
.cb-flex > .cb-grow { flex: 1 1 auto; }

/* Jarak antar kolom */
.cb-gap-0 { --gap: 0px; }
.cb-gap-s { --gap: 12px; }
.cb-gap-m { --gap: 24px; }
.cb-gap-l { --gap: 40px; }
.cb-gap-xl { --gap: 64px; }

/* ---------- Grid ---------- */
.cb-grid { display: grid; gap: var(--gap, 24px); grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); }
.cb-cols-1 { --cols: 1; } .cb-cols-2 { --cols: 2; } .cb-cols-3 { --cols: 3; }
.cb-cols-4 { --cols: 4; } .cb-cols-5 { --cols: 5; } .cb-cols-6 { --cols: 6; }
.cb-span-2 { grid-column: span 2; } .cb-span-3 { grid-column: span 3; }

/* ---------- Jarak (margin / padding) ---------- */
.cb-mt-0 { margin-top: 0 !important; } .cb-mt-1 { margin-top: 8px !important; } .cb-mt-2 { margin-top: 16px !important; }
.cb-mt-3 { margin-top: 24px !important; } .cb-mt-4 { margin-top: 40px !important; } .cb-mt-5 { margin-top: 64px !important; }
.cb-mb-0 { margin-bottom: 0 !important; } .cb-mb-1 { margin-bottom: 8px !important; } .cb-mb-2 { margin-bottom: 16px !important; }
.cb-mb-3 { margin-bottom: 24px !important; } .cb-mb-4 { margin-bottom: 40px !important; } .cb-mb-5 { margin-bottom: 64px !important; }
.cb-pt-0 { padding-top: 0 !important; } .cb-pt-1 { padding-top: 8px !important; } .cb-pt-2 { padding-top: 16px !important; }
.cb-pt-3 { padding-top: 24px !important; } .cb-pt-4 { padding-top: 40px !important; } .cb-pt-5 { padding-top: 64px !important; }
.cb-pb-0 { padding-bottom: 0 !important; } .cb-pb-1 { padding-bottom: 8px !important; } .cb-pb-2 { padding-bottom: 16px !important; }
.cb-pb-3 { padding-bottom: 24px !important; } .cb-pb-4 { padding-bottom: 40px !important; } .cb-pb-5 { padding-bottom: 64px !important; }
.cb-p-0 { padding: 0 !important; } .cb-p-2 { padding: 16px !important; } .cb-p-3 { padding: 24px !important; } .cb-p-4 { padding: 40px !important; }
.cb-mx-auto { margin-left: auto; margin-right: auto; }
.cb-spacer { height: var(--h, 40px); }

/* ---------- Teks ---------- */
.cb-center { text-align: center; }
.cb-left { text-align: left; }
.cb-right { text-align: right; }
.cb-justify { text-align: justify; }
.cb-title { font-size: clamp(30px, 4vw, 56px); font-weight: 900; line-height: 1.1; color: var(--navy-deep, #0a1a4a); margin: 0 0 .4em; }
.cb-heading { font-size: clamp(22px, 2.2vw, 32px); font-weight: 800; color: var(--blue-text, #1270a8); margin: 0 0 .5em; }
.cb-subheading { font-size: clamp(18px, 1.6vw, 22px); font-weight: 800; margin: 0 0 .4em; }
.cb-lead { font-size: clamp(18px, 1.7vw, 24px); line-height: 1.45; }
.cb-small { font-size: 14px; }
.cb-white, .cb-white h1, .cb-white h2, .cb-white h3 { color: #fff; }
.cb-muted { color: #5b6470; }
.cb-blue { color: var(--blue-text, #1270a8); }
.cb-navy { color: var(--navy-deep, #0a1a4a); }
.cb-bold { font-weight: 800; }
.cb-upper { text-transform: uppercase; letter-spacing: .06em; }
.cb-bg-blue .cb-title, .cb-bg-navy .cb-title, .cb-bg-image .cb-title,
.cb-bg-blue .cb-heading, .cb-bg-navy .cb-heading, .cb-bg-image .cb-heading { color: #fff; }

/* ---------- Gambar ---------- */
.cb-img { width: 100%; height: auto; display: block; }
.cb-rounded { border-radius: 12px; overflow: hidden; }
.cb-circle { border-radius: 50%; aspect-ratio: 1; object-fit: cover; }
.cb-shadow { box-shadow: 0 10px 30px rgba(0,0,0,.15); }
.cb-ratio-16x9 { aspect-ratio: 16/9; object-fit: cover; }
.cb-ratio-4x3 { aspect-ratio: 4/3; object-fit: cover; }
.cb-ratio-1x1 { aspect-ratio: 1; object-fit: cover; }
.cb-ratio-3x4 { aspect-ratio: 3/4; object-fit: cover; }

/* ---------- Tombol ---------- */
.cb-btn { display: inline-flex; align-items: center; gap: 8px; background: var(--blue, #0084ff); color: #fff; font-weight: 800; padding: 12px 24px; border-radius: 10px; text-decoration: none; border: 2px solid transparent; transition: transform .15s, background .15s; }
.cb-btn:hover { background: #006fe0; transform: translateY(-1px); }
.cb-btn-navy { background: var(--navy-deep, #0a1a4a); }
.cb-btn-navy:hover { background: #142a6b; }
.cb-btn-outline { background: transparent; border-color: currentColor; color: inherit; }
.cb-btn-outline:hover { background: rgba(0,0,0,.06); }
.cb-btn-white { background: #fff; color: var(--navy-deep, #0a1a4a); }
.cb-btn-white:hover { background: #eef4ff; }
.cb-btn-lg { font-size: clamp(20px, 2.4vw, 32px); padding: 10px 34px; border-radius: 12px; }
.cb-btn-sm { padding: 7px 14px; font-size: 14px; }

/* ---------- Kartu ---------- */
.cb-card { background: #fff; color: var(--text, #1b1b1b); border-radius: 12px; box-shadow: 0 6px 20px rgba(0,0,0,.1); padding: 22px; }
.cb-card > img:first-child { margin: -22px -22px 18px; width: calc(100% + 44px); max-width: none; border-radius: 12px 12px 0 0; aspect-ratio: 16/10; object-fit: cover; }
.cb-card-flat { box-shadow: none; border: 1px solid #e1e5ea; }

/* ---------- Banner / hero ---------- */
.cb-hero { position: relative; min-height: var(--h, 70vh); display: flex; align-items: flex-end; background-size: cover; background-position: center; color: #fff; padding: 140px 0 60px; }
.cb-hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.05) 35%, rgba(0,0,0, var(--overlay, .5))); }
.cb-hero > * { position: relative; }
.cb-hero h1 { font-size: clamp(36px, 5vw, 72px); font-weight: 900; margin: 0 0 .2em; text-shadow: 0 2px 14px rgba(0,0,0,.35); }

/* ---------- Video ---------- */
.cb-video { position: relative; aspect-ratio: 16/9; border-radius: 12px; overflow: hidden; background: #000; }
.cb-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------- Accordion ---------- */
.cb-accordion { display: flex; flex-direction: column; gap: 10px; }
.cb-accordion details { background: #fff; border: 1px solid #dfe4ea; border-radius: 10px; overflow: hidden; }
.cb-accordion summary { cursor: pointer; list-style: none; padding: 16px 52px 16px 20px; font-weight: 800; color: var(--navy-deep, #0a1a4a); position: relative; font-size: 18px; }
.cb-accordion summary::-webkit-details-marker { display: none; }
.cb-accordion summary::after { content: ""; position: absolute; right: 22px; top: 50%; width: 10px; height: 10px; border-right: 2.5px solid currentColor; border-bottom: 2.5px solid currentColor; transform: translateY(-70%) rotate(45deg); transition: transform .2s; }
.cb-accordion details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.cb-accordion details[open] summary { color: var(--blue-text, #1270a8); }
.cb-accordion .cb-acc-body { padding: 0 20px 18px; }
.cb-accordion .cb-acc-body > :last-child { margin-bottom: 0; }
.cb-accordion.cb-acc-navy summary { background: var(--navy, #003756); color: #fff; }
.cb-accordion.cb-acc-navy details[open] summary { color: #fff; }

/* ---------- Slider gambar ---------- */
.cb-slider { position: relative; --per: 1; --h: auto; }
.cb-slider .cb-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none; gap: var(--gap, 0px); }
.cb-slider .cb-track::-webkit-scrollbar { display: none; }
.cb-slide { flex: 0 0 calc((100% - (var(--per) - 1) * var(--gap, 0px)) / var(--per)); scroll-snap-align: start; position: relative; min-width: 0; }
.cb-slide > img { width: 100%; height: var(--h); aspect-ratio: var(--ratio, 16/7); object-fit: cover; display: block; }
.cb-slider[data-height] .cb-slide > img { aspect-ratio: auto; }
.cb-caption { position: absolute; left: 0; right: 0; bottom: 0; padding: 60px 6% 34px; color: #fff; background: linear-gradient(180deg, transparent, rgba(0,0,0,.6)); }
.cb-caption h3 { font-size: clamp(22px, 3vw, 40px); font-weight: 900; margin: 0 0 .2em; }
.cb-caption p { margin: 0; max-width: 640px; }
.cb-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 46px; height: 46px; border-radius: 50%; border: 0; background: rgba(255,255,255,.92); color: var(--navy-deep, #0a1a4a); cursor: pointer; display: grid; place-items: center; box-shadow: 0 4px 14px rgba(0,0,0,.2); z-index: 2; font-size: 22px; line-height: 1; }
.cb-arrow:hover { background: #fff; }
.cb-arrow:disabled { opacity: .45; cursor: default; }
.cb-prev { left: 14px; } .cb-next { right: 14px; }
.cb-dots { display: flex; justify-content: center; gap: 8px; padding: 14px 0 0; }
.cb-dots button { width: 10px; height: 10px; border-radius: 99px; border: 0; background: #b8c2cc; cursor: pointer; padding: 0; transition: width .2s, background .2s; }
.cb-dots button.active { width: 28px; background: var(--blue, #0084ff); }
.cb-slider.cb-dots-inside .cb-dots { position: absolute; left: 0; right: 0; bottom: 12px; }
.cb-slider.cb-dots-inside .cb-dots button { background: rgba(255,255,255,.6); }
.cb-slider.cb-dots-inside .cb-dots button.active { background: #fff; }

/* ---------- Slider logo klien (berjalan terus) ---------- */
.cb-logos { overflow: hidden; --logo-h: var(--logo-h-d, 64px); --gap: var(--gap-d, 56px); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.cb-logos-track { display: flex; align-items: center; gap: var(--gap); width: max-content; animation: cb-marquee var(--dur, 30s) linear infinite; padding: 10px 0; }
.cb-logos:hover .cb-logos-track, .cb-logos:focus-within .cb-logos-track { animation-play-state: paused; }
.cb-logos[data-arah="kanan"] .cb-logos-track { animation-direction: reverse; }
.cb-logos img { height: var(--logo-h); width: auto; max-width: max(220px, calc(var(--logo-h) * 3.5)); object-fit: contain; }
.cb-logos a, .cb-logos span { text-decoration: none; flex: none; display: flex; align-items: center; }
.cb-logos.cb-gray img { filter: grayscale(1); opacity: .7; transition: filter .2s, opacity .2s; }
.cb-logos.cb-gray img:hover { filter: none; opacity: 1; }
@keyframes cb-marquee { to { transform: translateX(calc(-50% - var(--gap) / 2)); } }
/* Komputer dengan animasi Windows/Mac dimatikan ("kurangi gerakan"): logo tetap berjalan tapi 2× lebih pelan,
   dan tetap berhenti saat disorot/difokus. Sebelumnya berhenti total sehingga terlihat "tidak jalan". */
@media (prefers-reduced-motion: reduce) {
  .cb-logos-track { animation-duration: calc(var(--dur, 30s) * 2); }
}

/* ---------- Tabs ---------- */
.cb-tabs .cb-tab-buttons { display: flex; flex-wrap: wrap; gap: 6px; border-bottom: 2px solid #dfe4ea; margin-bottom: 18px; }
.cb-tabs .cb-tab-buttons button { background: none; border: 0; font: inherit; font-weight: 800; color: #5b6470; padding: 10px 16px; cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -2px; }
.cb-tabs .cb-tab-buttons button.active { color: var(--blue-text, #1270a8); border-bottom-color: var(--blue-text, #1270a8); }
.cb-tabs .cb-tab:not(.active) { display: none; }

/* ---------- Pemisah ---------- */
.cb-divider { border: 0; border-top: 1.5px solid #8a8a8a; margin: 40px 0; }
.cb-rule { display: block; width: 140px; border-top: 2px solid currentColor; margin: 0 0 24px; }

/* ---------- Tampil/sembunyi per layar ---------- */
@media (max-width: 1024px) {
  .cb-grid.cb-cols-4:not(.cb-keep) { --cols: 2; }
  .cb-grid.cb-cols-5:not(.cb-keep), .cb-grid.cb-cols-6:not(.cb-keep) { --cols: 3; }
}
@media (max-width: 768px) {
  .cb-section { padding: 44px 0; }
  .cb-pad-l, .cb-pad-xl { padding-top: 56px; padding-bottom: 56px; }
  .cb-container { padding: 0 16px; }
  .cb-flex:not(.cb-keep) > * { flex-basis: 100% !important; }
  .cb-flex.cb-nowrap:not(.cb-keep) { flex-wrap: wrap; }
  .cb-reverse:not(.cb-keep) { flex-direction: column-reverse; }
  .cb-grid:not(.cb-keep) { --cols: 1; }
  .cb-grid.cb-cols-5:not(.cb-keep), .cb-grid.cb-cols-6:not(.cb-keep) { --cols: 2; }
  .cb-span-2, .cb-span-3 { grid-column: auto; }
  .cb-slider { --per: var(--per-m, 1) !important; }
  .cb-arrow { width: 36px; height: 36px; font-size: 18px; }
  .cb-logos { --logo-h: var(--logo-h-m, 44px); --gap: var(--gap-m, 32px); }
  .cb-hide-m { display: none !important; }
}
@media (min-width: 769px) { .cb-show-m { display: none !important; } }

/* ---------- Animasi (diatur di Page Builder › CSS Global › CSS visual › Animasi) ----------
   Aturan pemakaiannya dibuat otomatis oleh editor CSS visual; di sini hanya gerakannya. */
@keyframes oel-fade { from { opacity: 0; } }
@keyframes oel-fade-up { from { opacity: 0; transform: translateY(40px); } }
@keyframes oel-fade-down { from { opacity: 0; transform: translateY(-40px); } }
@keyframes oel-slide-left { from { opacity: 0; transform: translateX(-60px); } }
@keyframes oel-slide-right { from { opacity: 0; transform: translateX(60px); } }
@keyframes oel-zoom-in { from { opacity: 0; transform: scale(.85); } }
@keyframes oel-zoom-out { from { opacity: 0; transform: scale(1.15); } }
@keyframes oel-pulse { 50% { transform: scale(1.06); } }
@keyframes oel-float { 50% { transform: translateY(-8px); } }
@keyframes oel-blink { 50% { opacity: .55; } }
@keyframes oel-wobble { 15% { transform: rotate(-4deg); } 30% { transform: rotate(3deg); } 45% { transform: rotate(-2deg); } 60% { transform: rotate(1deg); } 75%, 100% { transform: none; } }
