/* =====================================================================
   SEFORAA – beranda, "Tujuh aplikasi" Pilihan C (acuan: "Solusi modular")
   Pasangan: includes/beranda-ubin-kartu.php + assets/js/seforaa-beranda-kartu.js
   Warna kartu: --c1/--c2 milik tiap aplikasi (sama dengan mega menu).
   ===================================================================== */
.bm-sec { --bm-ink: #252B37; --bm-slate: #5E6672; --bm-line: #E7E3E1; }

/* ---------- wadah berpola titik ---------- */
.bm-panel {
  padding: 14px; border-radius: 28px; border: 1px solid var(--bm-line);
  background: #FBF9F8 radial-gradient(rgba(105, 19, 27, .09) 1px, transparent 1px) 0 0 / 15px 15px;
}

/* ---------- tab pil ---------- */
.bm-tabs { position: relative; display: inline-flex; flex-wrap: wrap; gap: 4px; margin: 0 0 16px; padding: 4px; border-radius: 999px; background: #ECE8E6; }
.bm-tabs[hidden] { display: none; }
.bm-tab { position: relative; z-index: 1; padding: 7px 16px; border: 0; border-radius: 999px; background: none; font: inherit; font-size: 14px; color: var(--bm-slate); cursor: pointer; transition: color .3s ease; }
.bm-tab span { margin-left: 4px; font-size: 12px; opacity: .7; }
.bm-tab:hover { color: var(--bm-ink); }
.bm-tab[aria-pressed="true"] { color: var(--bm-ink); font-weight: 600; }
.bm-tab:focus-visible { outline: 2px solid var(--b-maroon, #69131B); outline-offset: 2px; }
.bm-tab-ind { position: absolute; z-index: 0; left: 0; top: 0; border-radius: 999px; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .06), 0 4px 10px -4px rgba(0, 0, 0, .12); pointer-events: none; }

/* ---------- kartu: nampan + kartu putih ---------- */
.bm-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.bm-card { position: relative; z-index: 1; display: flex; padding: 7px; border-radius: 24px; background: color-mix(in srgb, var(--c1, #69131B) 7%, #F4F1F0); }
.bm-card.is-hidden { display: none; }
.bm-wrap {
  position: relative; z-index: 2; display: flex; flex-direction: column; width: 100%; min-height: 268px; border-radius: 17px; overflow: hidden; background: #fff; color: var(--bm-ink); text-decoration: none;
  box-shadow: 0 38px 23px 0 rgba(11, 45, 60, .03), 0 17px 17px 0 rgba(11, 45, 60, .04), 0 4px 9px 0 rgba(11, 45, 60, .05);
  transition: transform .45s cubic-bezier(.22, 1, .36, 1), box-shadow .45s ease;
}
a.bm-wrap:hover { color: var(--bm-ink); }
a.bm-wrap:focus-visible { outline: 2px solid var(--c1); outline-offset: 3px; }
.bm-head { display: block; padding: 18px 18px 0; }
.bm-cat { display: block; margin-bottom: 6px; line-height: 1.35; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: color-mix(in srgb, var(--c1) 80%, #222); }
.bm-name { margin: 0 0 4px; font-size: 18px; font-weight: 600; line-height: 1.3; color: var(--bm-ink); letter-spacing: -.01em; }
.bm-desc { display: block; min-height: 2.9em; font-size: 14px; line-height: 1.45; color: var(--bm-slate); }
/* label fitur (sama dengan ubin asli): latar lembut & teks warna aplikasi */
.bm-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.bm-tags span { padding: 6px 9px; border-radius: 7px; font-size: 12px; font-weight: 500; line-height: 1; color: color-mix(in srgb, var(--c1) 78%, #1a1a1a); background: color-mix(in srgb, var(--c1) 10%, #fff); }

/* ikon besar + garis lengkung (kartu produk) */
.bm-visual { position: relative; flex: 1; display: grid; place-items: center; min-height: 140px; margin-top: 2px; }
.bm-arcs {
  position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 22%, #000 70%, transparent 100%); mask-image: linear-gradient(to bottom, transparent 0%, #000 22%, #000 70%, transparent 100%);
}
.bm-arcs circle { fill: none; stroke: var(--c1); stroke-width: 1.2; transform-box: fill-box; transform-origin: center; }
.bm-arcs circle:nth-child(1) { opacity: .34; }
.bm-arcs circle:nth-child(2) { opacity: .24; }
.bm-arcs circle:nth-child(3) { opacity: .15; }
.bm-arcs circle:nth-child(4) { opacity: .09; stroke-dasharray: 3 6; }
.bm-glow { position: absolute; left: 50%; top: 56%; width: 150px; height: 110px; transform: translate(-50%, -50%); border-radius: 50%; background: radial-gradient(closest-side, color-mix(in srgb, var(--c2) 38%, transparent), transparent); opacity: .7; transition: opacity .45s ease, transform .6s cubic-bezier(.22, 1, .36, 1); }
.bm-sec .bm-ico { position: relative; z-index: 1; width: 64px; height: 64px; border-radius: 19px; margin-top: 12px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 18px 26px -12px var(--c1); /* kotak membulat, sama dengan ikon ubin asli */ transition: transform .55s cubic-bezier(.34, 1.56, .64, 1); }
.bm-sec .bm-ico svg { width: 28px; height: 28px; }

/* ---------- laci aksi (perangkat dengan kursor) ---------- */
.bm-action { display: none; }
@media (hover: hover) and (pointer: fine) {
  .bm-action {
    position: absolute; z-index: 1; left: 0; top: 0; width: 100%; height: 100%; display: flex; align-items: flex-end; justify-content: space-between; gap: 8px;
    padding: 0 18px 16px; border-radius: 24px; opacity: 0; pointer-events: none;
    border: 1px solid color-mix(in srgb, var(--c1) 26%, #DCDFE4);
    background: color-mix(in srgb, var(--c1) 8%, #F8F8FB) radial-gradient(color-mix(in srgb, var(--c1) 26%, transparent) 1px, transparent 1px) 0 0 / 13px 13px;
    transition: height .5s cubic-bezier(.34, 1.35, .64, 1), opacity .25s ease;
  }
  .bm-action a { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: color-mix(in srgb, var(--c1) 82%, #111); text-decoration: none; opacity: 0; transform: translateY(6px); transition: opacity .3s ease .1s, transform .4s cubic-bezier(.22, 1, .36, 1) .1s; }
  .bm-action a span { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
  .bm-action a svg { transition: transform .3s ease; }
  .bm-action a:hover svg { transform: translateX(3px); }
  .bm-action a.is-demo { padding: 5px 11px; border-radius: 999px; font-size: 13px; color: #fff; background: var(--c1); }
  .bm-card:not(.bm-help):hover, .bm-card:not(.bm-help):focus-within { z-index: 5; }
  .bm-card:hover .bm-action, .bm-card:focus-within .bm-action { height: calc(100% + 52px); opacity: 1; pointer-events: auto; }
  .bm-card:hover .bm-action a, .bm-card:focus-within .bm-action a { opacity: 1; transform: translateY(0); }
  .bm-card:hover .bm-ico, .bm-card:focus-within .bm-ico { transform: translateY(-6px) scale(1.08) rotate(-6deg); }
  .bm-card:hover .bm-glow { opacity: 1; transform: translate(-50%, -54%) scale(1.15); }
}

/* ---------- kartu "Belum yakin?" ---------- */
.bm-help { background: color-mix(in srgb, #69131B 16%, #F4F1F0); }
.bm-help .bm-wrap { padding: 20px 20px 16px; background: linear-gradient(160deg, #7A1620, #4A0D13); color: #fff; }
.bm-help .bm-cat { color: #F2B8BE; }
.bm-help .bm-name { color: #fff; font-size: 20px; }
.bm-help .bm-desc { margin-top: 6px; color: rgba(255, 255, 255, .78); }
.bm-help-links { display: grid; margin-top: auto; padding-top: 14px; }
.bm-help-links a { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; border-top: 1px solid rgba(255, 255, 255, .2); font-size: 14.5px; font-weight: 600; color: #fff; text-decoration: none; }
.bm-help-links a:hover { color: #F2B8BE; }
.bm-help-links a svg { transition: transform .3s ease; }
.bm-help-links a:hover svg { transform: translateX(3px); }

/* ---------- layar lebih kecil ---------- */
@media (max-width: 1199px) { .bm-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 991px) { .bm-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 575px) {
  .bm-panel { padding: 8px; border-radius: 20px; }
  .bm-tabs { display: flex; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; max-width: 100%; }
  .bm-tabs::-webkit-scrollbar { display: none; }
  .bm-tab { flex: none; padding: 7px 13px; font-size: 13px; }
  .bm-grid { gap: 8px; }
  .bm-card { padding: 5px; border-radius: 18px; }
  .bm-wrap { min-height: 210px; border-radius: 14px; }
  .bm-head { padding: 13px 12px 0; }
  .bm-cat { font-size: 11px; letter-spacing: .05em; }
  .bm-name { font-size: 15.5px; }
  .bm-desc { font-size: 12.5px; }
  .bm-visual { min-height: 108px; }
  .bm-tags { display: none; } /* ponsel: ringkas, seperti ubin asli */
  .bm-sec .bm-ico { width: 50px; height: 50px; border-radius: 15px; }
  .bm-sec .bm-ico svg { width: 23px; height: 23px; }
  /* "Belum yakin?" mengisi sel kosong di samping kartu ke-7 (grid 2 x 4 penuh) */
  .bm-help .bm-wrap { padding: 13px 12px 8px; }
  .bm-help .bm-name { font-size: 15.5px; }
  .bm-help .bm-desc { display: none; }
  .bm-help-links a { padding: 9px 0; font-size: 12.5px; line-height: 1.3; }
}
@media (prefers-reduced-motion: reduce) { .bm-action, .bm-action a, .bm-ico, .bm-glow, .bm-wrap { transition: none; } }
