/* Yobana — Fitur Canggih (Galeri 3D, Tur 360, Pelacak, Imunisasi, Asisten,
   pengingat kalender, mode offline) + popup install PWA. */

/* ---------- Section Fitur Canggih di Beranda ---------- */
.fx-head { display:flex; align-items:baseline; justify-content:space-between; margin:20px 2px 4px; }
.fx-head h3 { font-family:'Playfair Display',serif; font-size:20px; color:#4A2540; }
.fx-head .fx-tag { font-size:9px; letter-spacing:2px; color:#B0125F; font-weight:800; }
.fx-sub { font-size:12px; color:#8A6A80; margin:0 2px 12px; }
.fx-grid { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.fx-card { position:relative; border:none; text-align:left; cursor:pointer; border-radius:20px; padding:14px;
  color:#fff; overflow:hidden; min-height:104px; font-family:inherit;
  box-shadow:0 8px 20px rgba(176,18,95,.22); transition:transform .15s ease; }
.fx-card:active { transform:scale(.97); }
.fx-card .fx-ic { width:38px; height:38px; border-radius:12px; background:rgba(255,255,255,.22);
  display:flex; align-items:center; justify-content:center; margin-bottom:8px; }
.fx-card b { display:block; font-size:14.5px; line-height:1.25; }
.fx-card span { display:block; font-size:11px; opacity:.88; margin-top:2px; line-height:1.35; }
.fx-card.wide { grid-column:1 / -1; min-height:92px; }
.fx-g1 { background:linear-gradient(135deg,#EC008C,#B0125F); }
.fx-g2 { background:linear-gradient(135deg,#8E2A6E,#5B1E4A); }
.fx-g3 { background:linear-gradient(135deg,#E8B86D,#C07F2A); color:#4A2540; }
.fx-g3 .fx-ic { background:rgba(255,255,255,.35); }
.fx-g4 { background:linear-gradient(135deg,#D6336C,#8E2A6E); }
.fx-g5 { background:linear-gradient(135deg,#5B1E4A,#2E1030); }
.fx-card .fx-shine { position:absolute; top:-40%; right:-20%; width:55%; height:180%;
  background:linear-gradient(105deg,transparent,rgba(255,255,255,.20),transparent); transform:rotate(8deg); pointer-events:none; }

/* ---------- Panel fitur (layar penuh) ---------- */
.fx-panel { position:fixed; inset:0; z-index:1200; background:#FFF5F9; display:none;
  flex-direction:column; animation:fxIn .28s ease; }
.fx-panel.open { display:flex; }
@keyframes fxIn { from { opacity:0; transform:translateY(14px); } to { opacity:1; transform:none; } }
.fx-p-head { background:linear-gradient(135deg,#EC008C,#B0125F); color:#fff; padding:16px;
  display:flex; align-items:center; gap:12px; box-shadow:0 4px 16px rgba(176,18,95,.25); }
.fx-p-head .fx-back { background:rgba(255,255,255,.2); border:none; color:#fff; width:36px; height:36px;
  border-radius:50%; font-size:18px; cursor:pointer; flex:none; }
.fx-p-head b { font-family:'Playfair Display',serif; font-size:18px; display:block; line-height:1.2; }
.fx-p-head span { font-size:11px; opacity:.85; }
.fx-p-body { flex:1; overflow-y:auto; padding:16px; -webkit-overflow-scrolling:touch; }
.fx-note { font-size:12px; color:#8A6A80; line-height:1.55; }
.fx-cta { display:block; width:100%; border:none; cursor:pointer; border-radius:16px; padding:14px;
  background:linear-gradient(135deg,#EC008C,#B0125F); color:#fff; font-weight:800; font-size:14px;
  font-family:inherit; box-shadow:0 8px 18px rgba(176,18,95,.28); margin-top:14px; }
.fx-cta.gold { background:linear-gradient(135deg,#E8B86D,#C07F2A); color:#4A2540; }

/* ---------- Galeri 3D ---------- */
.g3d-stage { perspective:1100px; height:320px; position:relative; margin-top:8px; overflow:hidden; }
.g3d-track { position:absolute; inset:0; transform-style:preserve-3d; }
.g3d-card { position:absolute; top:50%; left:50%; width:210px; height:280px; margin:-140px 0 0 -105px;
  border-radius:20px; overflow:hidden; box-shadow:0 18px 36px rgba(40,6,28,.35); backface-visibility:hidden;
  transition:transform .55s cubic-bezier(.2,.7,.2,1), opacity .55s; }
.g3d-card img { width:100%; height:100%; object-fit:cover; display:block; }
.g3d-card .g3d-cap { position:absolute; left:0; right:0; bottom:0; padding:22px 12px 10px; color:#fff;
  font-size:12px; font-weight:700; background:linear-gradient(transparent,rgba(20,4,16,.72)); }
.g3d-nav { display:flex; align-items:center; justify-content:center; gap:14px; margin-top:6px; }
.g3d-nav button { width:42px; height:42px; border-radius:50%; border:none; cursor:pointer; font-size:18px;
  background:#fff; color:#B0125F; box-shadow:0 4px 12px rgba(176,18,95,.2); }
.g3d-dots { display:flex; gap:6px; }
.g3d-dots i { width:8px; height:8px; border-radius:99px; background:#F0C6DC; transition:all .3s; }
.g3d-dots i.on { width:24px; background:#EC008C; }

/* ---------- Tur Virtual 360 ---------- */
.t360-view { position:relative; height:300px; border-radius:20px; overflow:hidden; cursor:grab;
  box-shadow:0 14px 30px rgba(40,6,28,.28); touch-action:none; background:#2b1024; }
.t360-view:active { cursor:grabbing; }
.t360-strip { position:absolute; top:0; left:0; height:100%; display:flex; will-change:transform; }
.t360-strip img { height:100%; width:auto; min-width:100%; object-fit:cover; flex:none; user-select:none; -webkit-user-drag:none; }
.t360-badge { position:absolute; top:10px; left:10px; background:rgba(20,8,16,.7); color:#fff; z-index:3;
  font-size:11px; font-weight:800; padding:6px 12px; border-radius:99px; letter-spacing:1px; }
.t360-hot { position:absolute; z-index:2; width:28px; height:28px; margin:-14px 0 0 -14px; border-radius:50%;
  background:#EC008C; border:3px solid #fff; box-shadow:0 3px 12px rgba(0,0,0,.45); cursor:pointer;
  animation:t360Pulse 1.8s infinite; }
@keyframes t360Pulse { 0%,100% { transform:scale(1); } 50% { transform:scale(1.22); } }
.t360-info { position:absolute; left:10px; right:10px; bottom:10px; z-index:3; background:rgba(255,253,251,.96);
  border-radius:14px; padding:10px 12px; font-size:12px; color:#4A2540; display:none; line-height:1.5; }
.t360-info.show { display:block; }
.t360-info b { color:#B0125F; }
.t360-scenes { display:flex; gap:8px; margin-top:12px; }
.t360-scenes button { flex:1; border:1.5px solid #F3DCE8; background:#fff; color:#B0125F; cursor:pointer;
  border-radius:14px; padding:10px 4px; font-size:11.5px; font-weight:700; font-family:inherit; }
.t360-scenes button.on { background:linear-gradient(135deg,#EC008C,#B0125F); color:#fff; border-color:transparent; }

/* ---------- Form & hasil pelacak ---------- */
.fx-field { margin-bottom:12px; }
.fx-field label { display:block; font-size:12px; font-weight:700; color:#4A2540; margin-bottom:6px; }
.fx-field input { width:100%; padding:13px 14px; border:1.5px solid #F0D3E2; border-radius:14px;
  font-size:15px; font-family:inherit; background:#fff; color:#4A2540; }
.fx-result { background:#fff; border-radius:20px; padding:16px; margin-top:14px;
  box-shadow:0 8px 20px rgba(176,18,95,.10); border:1px solid #FBE9F2; }
.fx-result .big { font-family:'Playfair Display',serif; font-size:26px; color:#B0125F; }
.fx-prog { height:10px; border-radius:99px; background:#FBE9F2; overflow:hidden; margin:10px 0 4px; }
.fx-prog i { display:block; height:100%; border-radius:99px; background:linear-gradient(90deg,#EC008C,#E8B86D); }
.fx-kv { display:flex; justify-content:space-between; font-size:13px; padding:7px 0; border-bottom:1px dashed #F3DCE8; color:#4A2540; }
.fx-kv:last-child { border-bottom:none; }
.fx-kv b { color:#B0125F; }
.tl-item { display:flex; gap:10px; padding:10px 0; border-bottom:1px dashed #F3DCE8; font-size:13px; color:#4A2540; }
.tl-item:last-child { border-bottom:none; }
.tl-dot { width:26px; height:26px; border-radius:50%; flex:none; display:flex; align-items:center; justify-content:center;
  font-size:12px; background:#FBE9F2; color:#B0125F; }
.tl-item.done .tl-dot { background:#2F9E44; color:#fff; }
.tl-item.soon .tl-dot { background:#E8B86D; color:#4A2540; }
.tl-item small { display:block; color:#8A6A80; }

/* ---------- Asisten chat ---------- */
.chat-flow { display:flex; flex-direction:column; gap:8px; padding-bottom:8px; }
.chat-b { max-width:86%; padding:11px 13px; border-radius:16px; font-size:13.5px; line-height:1.55; }
.chat-b.bot { background:#fff; color:#4A2540; border:1px solid #FBE9F2; border-bottom-left-radius:4px; align-self:flex-start; }
.chat-b.me { background:linear-gradient(135deg,#EC008C,#B0125F); color:#fff; border-bottom-right-radius:4px; align-self:flex-end; }
.chat-b a { color:#B0125F; font-weight:700; }
.chat-chips { display:flex; flex-wrap:wrap; gap:8px; margin:10px 0; }
.chat-chips button { border:1.5px solid #EC008C; background:#fff; color:#B0125F; border-radius:99px;
  padding:8px 13px; font-size:12px; font-weight:700; cursor:pointer; font-family:inherit; }
.chat-input { display:flex; gap:8px; padding:10px; background:#fff; border-top:1px solid #FBE9F2; }
.chat-input input { flex:1; border:1.5px solid #F0D3E2; border-radius:99px; padding:11px 15px; font-size:14px; font-family:inherit; }
.chat-input button { border:none; border-radius:99px; padding:0 18px; cursor:pointer; font-weight:800;
  background:linear-gradient(135deg,#EC008C,#B0125F); color:#fff; font-family:inherit; }

/* ---------- Edukasi bergambar + kuis ---------- */
.edu-img { width:100%; height:150px; object-fit:cover; border-radius:14px; margin-bottom:10px; display:block; }
.quiz-box { background:#fff; border:1px solid #FBE9F2; border-radius:18px; padding:14px; margin-top:14px;
  box-shadow:0 6px 16px rgba(176,18,95,.08); }
.quiz-box h4 { color:#B0125F; font-size:14px; margin-bottom:4px; }
.quiz-q { font-size:13.5px; color:#4A2540; margin:10px 0 8px; font-weight:700; }
.quiz-opts { display:grid; gap:8px; }
.quiz-opts button { text-align:left; border:1.5px solid #F0D3E2; background:#FFFDFB; border-radius:12px;
  padding:10px 12px; font-size:13px; cursor:pointer; font-family:inherit; color:#4A2540; }
.quiz-opts button.right { border-color:#2F9E44; background:#EBFBEE; }
.quiz-opts button.wrong { border-color:#E03131; background:#FFF5F5; }
.quiz-fb { font-size:12.5px; margin-top:8px; color:#5A3A52; line-height:1.5; display:none; }
.quiz-fb.show { display:block; }

/* ---------- Pengingat di struk ---------- */
.remind-box { margin-top:12px; background:#FFF5F9; border:1.5px dashed #EC008C; border-radius:16px; padding:12px; }
.remind-box b { color:#B0125F; font-size:13px; display:block; margin-bottom:2px; }
.remind-box p { font-size:11.5px; color:#8A6A80; margin:0 0 10px; line-height:1.5; }
.remind-box .rb-row { display:flex; gap:8px; }
.remind-box button, .remind-box a { flex:1; text-align:center; text-decoration:none; border-radius:12px;
  padding:10px 6px; font-size:12px; font-weight:800; cursor:pointer; font-family:inherit; }
.rb-gcal { background:linear-gradient(135deg,#EC008C,#B0125F); color:#fff; border:none; }
.rb-ics { background:#fff; color:#B0125F; border:1.5px solid #EC008C; }

/* ---------- Banner offline ---------- */
.offline-bar { position:fixed; top:0; left:0; right:0; z-index:2000; display:none;
  background:#4A2540; color:#FFE3F1; font-size:12px; text-align:center; padding:8px 12px; }
.offline-bar.show { display:block; }

/* ---------- Popup install PWA ---------- */
.pwa-pop { position:fixed; inset:0; z-index:3000; display:flex; align-items:flex-end; justify-content:center;
  background:rgba(43,10,32,.45); opacity:0; pointer-events:none; transition:opacity .3s; }
.pwa-pop.show { opacity:1; pointer-events:auto; }
.pwa-card { background:#FFFDFB; width:100%; max-width:480px; border-radius:26px 26px 0 0; padding:22px 20px 26px;
  transform:translateY(40px); transition:transform .35s cubic-bezier(.2,.8,.2,1); position:relative;
  box-shadow:0 -12px 40px rgba(40,6,28,.3); }
.pwa-pop.show .pwa-card { transform:none; }
.pwa-x { position:absolute; top:12px; right:14px; border:none; background:#FBE9F2; color:#B0125F;
  width:30px; height:30px; border-radius:50%; font-size:17px; cursor:pointer; }
.pwa-head { display:flex; gap:14px; align-items:center; }
.pwa-ico { width:60px; height:60px; border-radius:16px; box-shadow:0 6px 16px rgba(176,18,95,.25); }
.pwa-title { font-family:'Playfair Display',serif; font-size:19px; color:#4A2540; }
.pwa-sub { font-size:12.5px; color:#8A6A80; line-height:1.5; margin-top:2px; }
.pwa-btn { display:block; width:100%; margin-top:16px; border:none; cursor:pointer; border-radius:16px;
  padding:15px; background:linear-gradient(135deg,#EC008C,#B0125F); color:#fff; font-weight:800;
  font-size:15px; font-family:inherit; box-shadow:0 10px 22px rgba(176,18,95,.3); }
.pwa-later { display:block; width:100%; margin-top:8px; border:none; background:none; cursor:pointer;
  color:#8A6A80; font-size:13px; padding:8px; font-family:inherit; }
.pwa-ios { margin-top:14px; background:#FFF5F9; border-radius:14px; padding:12px; font-size:13px; color:#4A2540; line-height:1.6; }

/* ---------- Animasi 3D ringan ---------- */
.fx-tilt { transform-style:preserve-3d; will-change:transform; }
@media (prefers-reduced-motion: reduce) {
  .fx-panel, .g3d-card, .pwa-card { animation:none !important; transition:none !important; }
  .t360-hot { animation:none; }
}
.pwa-apk { margin-top:10px; text-align:center; text-decoration:none; background:#fff !important;
  color:#B0125F !important; border:2px solid #EC008C; box-shadow:none !important; }
