/* ═══════════════════════════════════════════════════════════
   tahfizh.css — gaya untuk halaman Tahfidz (tahfizh.html) dan 3 sub-halaman ujian.
   Semua kelas diawali "tf-" supaya tidak bentrok dengan style-main.css.
   Warna mengikuti variabel di style-main.css (--primary, --accent, dst).
   ═══════════════════════════════════════════════════════════ */
.tf-wrap { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
.tf-section { padding: 56px 0 8px; scroll-margin-top: 130px; }
.tf-title { font-family: var(--font-main); font-size: clamp(24px, 4vw, 32px); font-weight: 800; color: var(--dark, #1d1a3d); margin: 0 0 6px; }
.tf-sub { color: var(--muted, #6b6b80); margin: 0 0 28px; max-width: 62ch; line-height: 1.6; }

/* ── Navigasi antar bagian ── */
.tf-tabs { position: sticky; top: 80px; z-index: 20; background: rgba(255,255,255,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--light, #ecebf5); }
.tf-tabs .tf-wrap { display: flex; gap: 8px; overflow-x: auto; padding-top: 12px; padding-bottom: 12px; scrollbar-width: none; }
.tf-tabs a { flex: none; padding: 8px 18px; border-radius: 40px; font-size: 14px; font-weight: 600; color: var(--primary, #2E2A5E); text-decoration: none; border: 1.5px solid transparent; transition: background .2s; }
.tf-tabs a:hover { background: var(--light, #ecebf5); }
.tf-tabs a.on { background: var(--primary, #2E2A5E); color: #fff; }
.tf-tabs a:focus-visible, .tf-kelas button:focus-visible, .tf-sl-btn:focus-visible, .tf-dot:focus-visible { outline: 3px solid var(--accent, #E3A32B); outline-offset: 2px; }

/* ── Slider otomatis (foto halaqah & prestasi) ── */
.tf-slider-grid { display: grid; gap: 28px; grid-template-columns: 1fr; }
@media (min-width: 900px) { .tf-slider-grid { grid-template-columns: 1fr 1fr; } }
.tf-slider-head { font-family: var(--font-main); font-size: 18px; font-weight: 700; color: var(--primary, #2E2A5E); margin: 0 0 12px; display: flex; align-items: center; gap: 10px; }
.tf-slider-head::before { content: ""; width: 5px; height: 20px; border-radius: 3px; background: var(--accent, #E3A32B); }
.tf-slider { position: relative; border-radius: 22px; overflow: hidden; background: #14122e; box-shadow: 0 12px 34px rgba(46,42,94,.16); aspect-ratio: 4/3; touch-action: pan-y; }
.tf-track { display: flex; height: 100%; transition: transform .6s cubic-bezier(.22,.7,.25,1); will-change: transform; }
.tf-slide { position: relative; flex: 0 0 100%; height: 100%; overflow: hidden; }
.tf-slide .tf-bg { position: absolute; inset: -20px; width: calc(100% + 40px); height: calc(100% + 40px); object-fit: cover; filter: blur(22px) brightness(.6); }
.tf-slide .tf-fg { position: relative; width: 100%; height: 100%; object-fit: contain; display: block; }
.tf-cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 34px 20px 44px; background: linear-gradient(to top, rgba(11,28,44,.85), rgba(11,28,44,0)); color: #fff; }
.tf-cap strong { display: block; font-family: var(--font-main); font-size: 17px; }
.tf-cap span { display: block; font-size: 13px; opacity: .85; margin-top: 3px; line-height: 1.5; }
.tf-sl-btn { position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border-radius: 50%; border: 0; cursor: pointer; background: rgba(255,255,255,.88); color: var(--primary, #2E2A5E); font-size: 14px; display: grid; place-items: center; box-shadow: 0 4px 14px rgba(0,0,0,.2); transition: background .2s; }
.tf-sl-btn:hover { background: #fff; }
.tf-sl-prev { left: 12px; } .tf-sl-next { right: 12px; }
.tf-dots { position: absolute; left: 0; right: 0; bottom: 14px; display: flex; justify-content: center; gap: 8px; }
.tf-dot { width: 9px; height: 9px; border-radius: 50%; border: 0; padding: 0; cursor: pointer; background: rgba(255,255,255,.5); transition: width .25s, background .25s; }
.tf-dot.on { width: 24px; border-radius: 6px; background: var(--accent, #E3A32B); }
.tf-slider.tf-solo .tf-sl-btn, .tf-slider.tf-solo .tf-dots { display: none; }
.tf-slider-empty { aspect-ratio: 4/3; border-radius: 22px; border: 2px dashed var(--light, #d9d7ec); display: grid; place-items: center; text-align: center; color: var(--muted, #6b6b80); padding: 24px; background: #faf9fd; }
.tf-slider-empty i { display: block; font-size: 32px; margin-bottom: 10px; color: var(--accent, #E3A32B); }

/* ── Kartu kurikulum & program ── */
.tf-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 22px; }
.tf-card { position: relative; background: #fff; border-radius: 20px; padding: 30px 26px 26px; border: 1px solid var(--light, #ecebf5); box-shadow: 0 10px 30px rgba(46,42,94,.07); overflow: hidden; transition: transform .25s, box-shadow .25s; }
.tf-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 5px; background: var(--accent, #E3A32B); }
.tf-card:hover { transform: translateY(-4px); box-shadow: 0 16px 38px rgba(46,42,94,.13); }
.tf-ico { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; font-size: 26px; background: rgba(227,163,43,.16); margin-bottom: 16px; }
.tf-card h3 { font-family: var(--font-main); font-size: 20px; color: var(--primary, #2E2A5E); margin: 0 0 14px; }
.tf-card ul { list-style: none; margin: 0; padding: 0; }
.tf-card li { position: relative; padding: 9px 0 9px 26px; border-top: 1px dashed var(--light, #ecebf5); font-size: 15px; color: var(--dark, #1d1a3d); }
.tf-card li::before { content: "\f00c"; font-family: "Font Awesome 6 Free"; font-weight: 900; font-size: 11px; position: absolute; left: 0; top: 13px; color: var(--accent, #E3A32B); }

/* ── Jadwal kegiatan ── */
.tf-kelas { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.tf-kelas button { font: inherit; font-weight: 600; font-size: 14px; padding: 8px 20px; border-radius: 40px; cursor: pointer; background: #fff; color: var(--primary, #2E2A5E); border: 2px solid var(--primary, #2E2A5E); transition: background .2s; }
.tf-kelas button:hover { background: var(--light, #ecebf5); }
.tf-kelas button.on { background: var(--primary, #2E2A5E); color: #fff; }
.tf-scroll { overflow-x: auto; border-radius: 18px; border: 1px solid var(--light, #ecebf5); box-shadow: 0 8px 24px rgba(46,42,94,.06); }
.tf-table { width: 100%; min-width: 640px; border-collapse: collapse; background: #fff; font-size: 14px; }
.tf-table th { background: var(--primary, #2E2A5E); color: #fff; padding: 14px 12px; font-weight: 600; text-align: center; }
.tf-table th.today { background: var(--accent, #E3A32B); color: var(--dark, #1d1a3d); }
.tf-table td { padding: 13px 12px; text-align: center; border-top: 1px solid var(--light, #ecebf5); }
.tf-table td:first-child { font-weight: 600; color: var(--primary, #2E2A5E); background: #faf9fd; white-space: nowrap; }
.tf-table td.today { background: rgba(227,163,43,.12); }
.tf-table td.rest { background: repeating-linear-gradient(135deg, #faf9fd, #faf9fd 8px, #f3f1fa 8px, #f3f1fa 16px); color: var(--muted, #6b6b80); font-style: italic; }
.tf-note { font-size: 13px; color: var(--muted, #6b6b80); margin-top: 10px; }

/* ── Status tanggal ujian ("Coming soon · 24 November 2026") ── */
.tf-pill { display: inline-flex; align-items: center; gap: 8px; padding: 7px 16px; border-radius: 40px; font-size: 13px; font-weight: 700; letter-spacing: .02em; background: rgba(227,163,43,.16); color: #8a5d00; border: 1px solid rgba(227,163,43,.45); }
.tf-pill.now { background: #e6f6ec; color: #17653a; border-color: #9fd8b4; }
.tf-pill.done { background: #eeeef5; color: #55557a; border-color: #d4d4e6; }
.page-header .tf-pill { margin-top: 18px; background: rgba(255,255,255,.14); color: #fff; border-color: rgba(255,255,255,.4); }
.page-header .tf-pill.now { background: rgba(120,220,160,.22); }
.tf-ket { margin-top: 12px; font-size: 14px; opacity: .9; }

/* ── Kartu jenis ujian (di tahfizh.html) ── */
.tf-ujian { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 22px; }
.tf-uj { display: flex; flex-direction: column; gap: 12px; background: #fff; border-radius: 20px; padding: 26px 24px; border: 1px solid var(--light, #ecebf5); box-shadow: 0 10px 30px rgba(46,42,94,.07); text-decoration: none; color: inherit; transition: transform .25s, box-shadow .25s; }
.tf-uj:hover { transform: translateY(-4px); box-shadow: 0 16px 38px rgba(46,42,94,.13); }
.tf-uj .tf-ico { margin-bottom: 4px; }
.tf-uj h3 { font-family: var(--font-main); font-size: 19px; color: var(--primary, #2E2A5E); margin: 0; }
.tf-uj p { margin: 0; font-size: 14px; color: var(--muted, #6b6b80); line-height: 1.6; }
.tf-uj .tf-go { margin-top: auto; font-weight: 700; font-size: 14px; color: var(--primary, #2E2A5E); }
.tf-uj .tf-go i { margin-left: 6px; transition: transform .2s; }
.tf-uj:hover .tf-go i { transform: translateX(4px); }

/* ── Sub-halaman ujian: poster ── */
.tf-switch { display: flex; gap: 8px; flex-wrap: wrap; margin: 28px 0 8px; }
.tf-switch a { padding: 8px 18px; border-radius: 40px; font-size: 14px; font-weight: 600; text-decoration: none; color: var(--primary, #2E2A5E); border: 2px solid var(--primary, #2E2A5E); background: #fff; }
.tf-switch a:hover { background: var(--light, #ecebf5); }
.tf-switch a.on { background: var(--primary, #2E2A5E); color: #fff; }
.tf-switch a.tf-back { border-color: transparent; }
.tf-posters { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 22px; padding: 24px 0 64px; }
.tf-poster { background: #fff; border-radius: 18px; overflow: hidden; border: 1px solid var(--light, #ecebf5); box-shadow: 0 8px 24px rgba(46,42,94,.08); cursor: zoom-in; transition: transform .25s; padding: 0; text-align: left; font: inherit; }
.tf-poster:hover { transform: translateY(-4px); }
.tf-poster img { width: 100%; height: auto; display: block; background: #f3f1fa; min-height: 160px; }
.tf-poster div { padding: 12px 14px 14px; }
.tf-poster strong { display: block; font-size: 14px; color: var(--primary, #2E2A5E); }
.tf-poster span { display: block; font-size: 12.5px; color: var(--muted, #6b6b80); margin-top: 3px; line-height: 1.5; }
.tf-empty { grid-column: 1/-1; text-align: center; color: var(--muted, #6b6b80); padding: 34px 20px; background: #faf9fd; border: 2px dashed var(--light, #d9d7ec); border-radius: 18px; }
.tf-empty i { display: block; font-size: 30px; margin-bottom: 10px; color: var(--accent, #E3A32B); }

/* ── Lightbox poster ── */
.tf-lb { position: fixed; inset: 0; z-index: 9999; background: rgba(8,10,28,.92); display: none; align-items: center; justify-content: center; padding: 20px; }
.tf-lb.open { display: flex; }
.tf-lb figure { margin: 0; max-width: min(92vw, 760px); max-height: 92vh; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.tf-lb img { max-width: 100%; max-height: 78vh; object-fit: contain; border-radius: 10px; background: #fff; }
.tf-lb figcaption { color: #fff; text-align: center; font-size: 14px; line-height: 1.6; max-width: 60ch; }
.tf-lb figcaption strong { display: block; font-size: 16px; }
.tf-lb button { position: absolute; border: 0; cursor: pointer; width: 44px; height: 44px; border-radius: 50%; background: rgba(255,255,255,.16); color: #fff; font-size: 18px; }
.tf-lb button:hover { background: rgba(255,255,255,.3); }
.tf-lb .tf-x { top: 16px; right: 16px; } .tf-lb .tf-p { left: 16px; top: 50%; } .tf-lb .tf-n { right: 16px; top: 50%; }

/* ── Memuat / gagal ── */
.tf-load { height: 150px; border-radius: 18px; background: linear-gradient(90deg, #f3f1fa 25%, #faf9fd 50%, #f3f1fa 75%); background-size: 200% 100%; animation: tf-shine 1.2s infinite; }
@keyframes tf-shine { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) {
  .tf-track, .tf-card, .tf-uj, .tf-poster { transition: none; }
  .tf-load { animation: none; }
}


/* ═══════════ PORTAL ORANG TUA ═══════════ */
.tf-po-cta { display: inline-flex; align-items: center; gap: 10px; margin-top: 18px; padding: 11px 24px; border-radius: 40px; background: var(--accent, #E3A32B); color: #2b1d00; font-weight: 700; font-size: 14.5px; text-decoration: none; box-shadow: 0 8px 22px rgba(227,163,43,.35); transition: transform .25s, box-shadow .25s; }
.tf-po-cta:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(227,163,43,.5); }
.tf-po-cta i:last-child { font-size: 12px; animation: tfPoBob 1.6s ease-in-out infinite; }
@keyframes tfPoBob { 50% { transform: translateY(3px); } }
.tf-tabs a.tf-tab-po { background: rgba(227,163,43,.16); color: #7a5200; border-color: rgba(227,163,43,.5); }
.tf-tabs a.tf-tab-po.on { background: var(--accent, #E3A32B); color: #2b1d00; }
.tf-tabs a.tf-tab-po i { margin-right: 5px; font-size: 12px; }

.tf-po { padding-top: 40px; }
.tf-po-card { display: grid; grid-template-columns: 1.1fr 1fr; border-radius: 26px; overflow: hidden; background: #fff; box-shadow: 0 18px 50px rgba(46,42,94,.16); border: 1px solid #ecebf5; }
.tf-po-intro { padding: 40px 38px; color: #fff; position: relative; background: linear-gradient(145deg, #2E2A5E, #4B3F8A); }
.tf-po-intro::after { content: ""; position: absolute; right: -60px; bottom: -60px; width: 220px; height: 220px; border-radius: 50%; background: radial-gradient(circle, rgba(227,163,43,.35), transparent 70%); pointer-events: none; }
.tf-po-intro .tf-title { color: #fff; margin: 14px 0 10px; }
.tf-po-intro p { margin: 0; color: rgba(255,255,255,.85); line-height: 1.7; max-width: 44ch; }
.tf-po-badge { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 6px 14px; border-radius: 30px; background: rgba(227,163,43,.2); color: #ffd98a; border: 1px solid rgba(227,163,43,.45); }
.tf-po-points { list-style: none; margin: 22px 0 0; padding: 0; display: grid; gap: 10px; position: relative; z-index: 1; }
.tf-po-points li { display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; color: rgba(255,255,255,.92); }
.tf-po-points i { color: #ffd98a; margin-top: 3px; }
.tf-po-form { padding: 40px 38px; display: flex; flex-direction: column; gap: 8px; justify-content: center; }
.tf-po-form label { font-weight: 700; font-size: 14px; color: var(--primary, #2E2A5E); }
.tf-po-form label small { font-weight: 500; color: var(--muted, #6b6b80); }
.tf-po-pinlabel { margin-top: 8px; }
.tf-po-form input { width: 100%; box-sizing: border-box; padding: 14px 16px; font: inherit; font-size: 16px; letter-spacing: .04em; border: 1.5px solid #d9d7ea; border-radius: 12px; background: #faf9ff; transition: border-color .2s, box-shadow .2s; }
.tf-po-form input:focus { outline: none; border-color: var(--secondary, #4B3F8A); box-shadow: 0 0 0 4px rgba(75,63,138,.14); background: #fff; }
.tf-po-btn { margin-top: 14px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 14px 20px; border: 0; border-radius: 12px; font: inherit; font-weight: 700; font-size: 15.5px; color: #fff; cursor: pointer; background: linear-gradient(135deg, #2E2A5E, #4B3F8A); transition: transform .2s, box-shadow .2s, opacity .2s; }
.tf-po-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(46,42,94,.3); }
.tf-po-btn:disabled { opacity: .65; cursor: wait; transform: none; box-shadow: none; }
.tf-po-btn:focus-visible { outline: 3px solid var(--accent, #E3A32B); outline-offset: 3px; }
.tf-po-err { margin: 8px 0 0; padding: 10px 14px; border-radius: 10px; background: #fdeeee; color: #a02020; font-size: 14px; line-height: 1.5; }
.tf-po-priv { margin: 10px 0 0; font-size: 12.5px; color: var(--muted, #6b6b80); display: flex; gap: 8px; align-items: flex-start; }
.tf-po-priv i { color: #2f9e6a; margin-top: 2px; }

/* hasil */
.tf-po-hasil { animation: tfPoIn .6s cubic-bezier(.2,.7,.2,1) both; }
@keyframes tfPoIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.tf-po-top { display: flex; align-items: center; gap: 18px; padding: 24px 26px; border-radius: 22px; color: #fff; background: linear-gradient(145deg, #2E2A5E, #4B3F8A); box-shadow: 0 14px 38px rgba(46,42,94,.22); flex-wrap: wrap; }
.tf-po-av { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; font-size: 22px; font-weight: 800; background: var(--accent, #E3A32B); color: #2b1d00; flex: none; }
.tf-po-who { flex: 1; min-width: 180px; }
.tf-po-who small { display: block; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: #ffd98a; font-weight: 700; }
.tf-po-who h3 { margin: 2px 0 2px; font-family: var(--font-main); font-size: clamp(20px, 3.4vw, 26px); color: #fff; }
.tf-po-who span { font-size: 13.5px; color: rgba(255,255,255,.8); }
.tf-po-out { padding: 10px 20px; border-radius: 30px; border: 1.5px solid rgba(255,255,255,.45); background: transparent; color: #fff; font: inherit; font-weight: 600; font-size: 14px; cursor: pointer; transition: background .2s; }
.tf-po-out:hover { background: rgba(255,255,255,.14); }
.tf-po-info { margin: 16px 0 0; padding: 12px 16px; border-radius: 12px; background: #FFF8E6; color: #7A5A00; font-size: 14px; line-height: 1.6; }
.tf-po-tabs { display: flex; gap: 8px; margin: 22px 0 14px; overflow-x: auto; scrollbar-width: none; }
.tf-po-tabs button { flex: none; padding: 9px 20px; border-radius: 40px; border: 1.5px solid #d9d7ea; background: #fff; font: inherit; font-weight: 600; font-size: 14px; color: var(--primary, #2E2A5E); cursor: pointer; transition: all .2s; }
.tf-po-tabs button:hover { border-color: var(--secondary, #4B3F8A); }
.tf-po-tabs button.on { background: var(--primary, #2E2A5E); color: #fff; border-color: var(--primary, #2E2A5E); }
.tf-po-tabs button:focus-visible { outline: 3px solid var(--accent, #E3A32B); outline-offset: 2px; }
.tf-po-latest { padding: 22px 24px; border-radius: 20px; background: #fff; border: 1px solid #ecebf5; box-shadow: 0 8px 26px rgba(46,42,94,.08); }
.tf-po-latest h4 { margin: 0 0 14px; font-family: var(--font-main); font-size: 15px; color: var(--primary, #2E2A5E); display: flex; align-items: center; gap: 8px; }
.tf-po-latest h4::before { content: ""; width: 5px; height: 18px; border-radius: 3px; background: var(--accent, #E3A32B); }
.tf-po-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.tf-po-item { padding: 12px 14px; border-radius: 14px; background: #f7f6fc; }
.tf-po-item small { display: block; font-size: 11.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--secondary, #4B3F8A); opacity: .85; margin-bottom: 4px; }
.tf-po-item b { font-size: 17px; color: var(--dark, #1d1a3d); word-break: break-word; }
.tf-po-item.kosong b { color: #aaa; font-weight: 500; }
.tf-po-riwayat { margin-top: 18px; }
.tf-po-riwayat h4 { margin: 0 0 10px; font-size: 15px; color: var(--primary, #2E2A5E); font-family: var(--font-main); }
.tf-po-riwayat .tf-scroll { border-radius: 16px; }
.tf-po-foot { margin-top: 18px; font-size: 12.5px; color: var(--muted, #6b6b80); text-align: center; }
@media (max-width: 820px) {
  .tf-po-card { grid-template-columns: 1fr; }
  .tf-po-intro, .tf-po-form { padding: 28px 22px; }
  .tf-po-top { padding: 20px; }
}
@media (prefers-reduced-motion: reduce) { .tf-po-hasil, .tf-po-cta i:last-child { animation: none !important; } }
.tf-po [hidden] { display: none !important; }
