/* =========================================================================
   Teach Quran Online - upgrade components
   (typed hero line, trust bar, lesson demo, billing toggle, sticky CTA,
    WhatsApp bubble, scroll progress ring, page transitions, course overlays)
   ========================================================================= */

/* ---------- typed hero line ---------- */
.banner-heading h3 .typed { color: var(--gold); font-weight: 600; }
.banner-heading h3 .typed::after { content: '|'; margin-left: 2px; animation: tqoCaret 1s steps(1) infinite; color: var(--gold); font-weight: 300; }
@keyframes tqoCaret { 50% { opacity: 0; } }

/* ---------- trust bar ---------- */
.trust-bar { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 16px; font-size: 13px; color: #d5dfd9; opacity: 0; animation: tqoFadeUp .8s .9s cubic-bezier(.2,.7,.2,1) forwards; }
.trust-bar li { display: flex; align-items: center; gap: 6px; }
.trust-bar li i { color: var(--gold); font-size: 12px; }
.trust-bar .online-dot { width: 8px; height: 8px; border-radius: 50%; background: #3ddc84; box-shadow: 0 0 0 0 rgba(61,220,132,.6); animation: tqoOnline 1.8s ease-out infinite; }
@keyframes tqoOnline { 0% { box-shadow: 0 0 0 0 rgba(61,220,132,.6); } 100% { box-shadow: 0 0 0 10px rgba(61,220,132,0); } }

/* ---------- lesson demo ---------- */
.lesson-demo-section { background: var(--cream) url(../images/ornament/pattern-light.svg); position: relative; overflow: hidden; }
.lesson-screen { background: #10221a; border-radius: 16px; box-shadow: 0 30px 60px rgba(0,0,0,.28); overflow: hidden; color: #fff; font-size: 14px; transform: perspective(1400px) rotateY(6deg) rotateX(2deg); transition: transform .6s cubic-bezier(.2,.7,.2,1); }
.lesson-screen:hover { transform: perspective(1400px) rotateY(0) rotateX(0); }
.ls-top { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; background: #0b1a13; border-bottom: 1px solid rgba(255,255,255,.06); }
.ls-top .live { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; letter-spacing: 1px; color: #ff5b5b; }
.ls-top .live::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: #ff5b5b; animation: tqoCaret 1.2s steps(1) infinite; }
.ls-top .ls-title { font-weight: 500; color: #cfd8d3; }
.ls-top .ls-timer { font-variant-numeric: tabular-nums; color: #9fb4a9; font-size: 13px; }
.ls-body { display: grid; grid-template-columns: 1.4fr 1fr; gap: 14px; padding: 16px; }
.ls-quran { background: #fff; color: #123e2a; border-radius: 10px; padding: 22px 20px; direction: rtl; text-align: center; font-family: "Amiri", "Scheherazade New", serif; font-size: 30px; line-height: 2; position: relative; }
.ls-quran .ls-word { display: inline-block; padding: 0 6px; border-radius: 6px; transition: background .35s, color .35s, transform .35s; }
.ls-quran .ls-word.on { background: var(--gold); color: #123e2a; transform: scale(1.08); }
.ls-quran .ls-rule { position: absolute; left: 12px; bottom: 10px; direction: ltr; font-family: "Poppins", sans-serif; font-size: 11px; background: var(--green); color: #fff; padding: 3px 10px; border-radius: 12px; opacity: 0; transform: translateY(6px); transition: all .4s; }
.ls-quran .ls-rule.show { opacity: 1; transform: none; }
.ls-tiles { display: grid; grid-template-rows: 1fr 1fr; gap: 12px; }
.ls-tile { background: #1a3328; border-radius: 10px; padding: 12px; position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 120px; }
.ls-tile .av { width: 54px; height: 54px; border-radius: 50%; background: var(--green); display: flex; align-items: center; justify-content: center; font-weight: 700; color: #fff; font-size: 20px; margin-bottom: 8px; box-shadow: 0 0 0 3px rgba(255,255,255,.12); }
.ls-tile.student .av { background: var(--gold); color: #123e2a; }
.ls-tile .nm { font-size: 12px; color: #d5dfd9; }
.ls-tile .wave { position: absolute; right: 12px; bottom: 12px; display: flex; gap: 3px; align-items: flex-end; height: 18px; }
.ls-tile .wave i { width: 3px; background: #3ddc84; border-radius: 2px; animation: tqoBar 1s ease-in-out infinite; }
.ls-tile .wave i:nth-child(2) { animation-delay: .15s; } .ls-tile .wave i:nth-child(3) { animation-delay: .3s; } .ls-tile .wave i:nth-child(4) { animation-delay: .45s; } .ls-tile .wave i:nth-child(5) { animation-delay: .6s; }
@keyframes tqoBar { 0%, 100% { height: 4px; } 50% { height: 18px; } }
.ls-tile.student .wave i { background: #7fb99a; animation-duration: 1.6s; }
.ls-tile .mic { position: absolute; left: 12px; bottom: 10px; font-size: 11px; color: #9fb4a9; }
.ls-chat { padding: 0 16px 14px; display: flex; flex-direction: column; gap: 8px; min-height: 96px; }
.ls-msg { max-width: 78%; padding: 8px 12px; border-radius: 12px; font-size: 12.5px; line-height: 1.4; opacity: 0; transform: translateY(8px) scale(.96); transition: all .4s cubic-bezier(.2,.7,.2,1); }
.ls-msg.show { opacity: 1; transform: none; }
.ls-msg.t { background: #1f4a37; border-bottom-left-radius: 3px; align-self: flex-start; }
.ls-msg.s { background: var(--gold); color: #123e2a; border-bottom-right-radius: 3px; align-self: flex-end; }
.ls-msg b { display: block; font-size: 10px; opacity: .7; margin-bottom: 2px; text-transform: uppercase; letter-spacing: .5px; }
.ls-bottom { display: flex; justify-content: center; gap: 10px; padding: 12px; background: #0b1a13; }
.ls-bottom span { width: 38px; height: 38px; border-radius: 50%; background: #1a3328; display: inline-flex; align-items: center; justify-content: center; color: #d5dfd9; font-size: 14px; }
.ls-bottom span.end { background: #d63a2f; color: #fff; width: auto; padding: 0 16px; border-radius: 19px; font-size: 12px; font-weight: 600; }
.lesson-points { list-style: none; margin: 0; padding: 0; }
.lesson-points li { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.lesson-points li:last-child { border-bottom: 0; }
.lesson-points li i { flex-shrink: 0; width: 42px; height: 42px; border-radius: 10px; background: var(--green-light); color: var(--green); display: inline-flex; align-items: center; justify-content: center; font-size: 16px; }
.lesson-points li h5 { font-size: 16px; font-weight: 600; margin: 0 0 3px; }
.lesson-points li p { margin: 0; color: var(--muted); font-size: 14px; }

/* ---------- billing toggle ---------- */
.billing-toggle { display: inline-flex; background: #fff; border: 2px solid var(--green); border-radius: 30px; padding: 4px; margin: 0 auto 30px; gap: 4px; }
.billing-toggle button { border: 0; background: transparent; padding: 8px 20px; border-radius: 24px; font-weight: 500; font-size: 14px; color: var(--green); cursor: pointer; transition: all .3s; display: inline-flex; align-items: center; gap: 6px; }
.billing-toggle button em { font-style: normal; font-size: 11px; background: var(--gold); color: #123e2a; padding: 1px 7px; border-radius: 10px; font-weight: 700; }
.billing-toggle button.active { background: var(--green); color: #fff; }
.billing-toggle-wrap { text-align: center; }
.price-num { display: inline-block; transition: transform .25s; }
.price-num.bump { animation: tqoBump .45s ease; }
@keyframes tqoBump { 30% { transform: scale(1.18); color: var(--gold); } }
.price-save { display: block; font-size: 11px; font-weight: 600; color: var(--gold); min-height: 14px; }
.single-pricing:hover .price-save, .pricing-row:not(:hover) .single-pricing[data-recommended="1"] .price-save { color: #fff; }

/* ---------- home FAQ ---------- */
.home-faq-section { background: #fff; }

/* ---------- sticky mobile CTA ---------- */
.mobile-cta { position: fixed; left: 0; right: 0; bottom: 0; z-index: 9990; display: none; gap: 8px; padding: 10px 12px; background: rgba(255,255,255,.96); backdrop-filter: blur(6px); box-shadow: 0 -6px 20px rgba(0,0,0,.12); transform: translateY(110%); transition: transform .4s cubic-bezier(.2,.7,.2,1); }
.mobile-cta.show { transform: none; }
.mobile-cta a { flex: 1; text-align: center; padding: 11px; border-radius: 8px; font-weight: 600; font-size: 14px; text-decoration: none !important; }
.mobile-cta a.primary { background: var(--green); color: #fff !important; }
.mobile-cta a.wa { background: #25d366; color: #fff !important; }
@media (max-width: 991px) { .mobile-cta { display: flex; } body.has-mobile-cta a.whatsapp-popup-btn { bottom: 76px; } body.has-mobile-cta .scrolltop { bottom: 76px; } }

/* ---------- WhatsApp greeting bubble ---------- */
.wa-bubble { position: fixed; left: 84px; bottom: 26px; z-index: 9998; background: #fff; color: #222; border-radius: 12px; padding: 12px 34px 12px 14px; font-size: 13px; box-shadow: 0 10px 30px rgba(0,0,0,.18); max-width: 240px; opacity: 0; transform: translateY(10px) scale(.95); transition: all .4s cubic-bezier(.2,.7,.2,1); pointer-events: none; }
.wa-bubble.show { opacity: 1; transform: none; pointer-events: auto; }
.wa-bubble::before { content: ''; position: absolute; left: -8px; bottom: 18px; border: 8px solid transparent; border-right-color: #fff; border-left: 0; }
.wa-bubble b { display: block; color: var(--green); margin-top: 4px; }
.wa-bubble .x { position: absolute; right: 8px; top: 6px; cursor: pointer; color: #999; font-size: 16px; line-height: 1; }
@media (max-width: 991px) { .wa-bubble { bottom: 84px; } body.has-mobile-cta .wa-bubble { bottom: 140px; } }

/* ---------- scroll progress ring ---------- */
.scroll { position: relative; overflow: visible; }
.scroll svg.ring { position: absolute; inset: -4px; width: calc(100% + 8px); height: calc(100% + 8px); transform: rotate(-90deg); pointer-events: none; }
.scroll svg.ring circle { fill: none; stroke: var(--gold); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 176; stroke-dashoffset: 176; transition: stroke-dashoffset .15s linear; }

/* ---------- page transitions ---------- */
body { animation: tqoPageIn .5s ease both; }
@keyframes tqoPageIn { from { opacity: 0; } to { opacity: 1; } }
body.page-leave { opacity: 0; transition: opacity .18s ease; }

/* ---------- course cards overlay (courses page) ---------- */
.single-course { position: relative; }
.single-course .course-overlay { position: absolute; top: 10px; left: 10px; right: 10px; aspect-ratio: 600 / 460; background: linear-gradient(180deg, rgba(9,138,70,.92), rgba(18,62,42,.95)); color: #fff; border-radius: 6px 6px 0 0; display: flex; align-items: center; justify-content: center; text-align: center; padding: 0 16px; font-size: 14px; clip-path: inset(100% 0 0 0); transition: clip-path .45s cubic-bezier(.2,.7,.2,1); }
.single-course:hover .course-overlay { clip-path: inset(0 0 0 0); }
.single-course .course-overlay span { opacity: 0; transform: translateY(10px); transition: all .4s .1s; }
.single-course:hover .course-overlay span { opacity: 1; transform: none; }

/* ---------- section number chips ---------- */
.section-chip { display: inline-block; background: var(--green-light); color: var(--green); font-size: 12px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; padding: 5px 14px; border-radius: 20px; margin-bottom: 12px; }
.white-text .section-chip { background: rgba(255,255,255,.12); color: var(--gold); }

@media (max-width: 767px) {
  .ls-body { grid-template-columns: 1fr; }
  .ls-tiles { grid-template-columns: 1fr 1fr; grid-template-rows: auto; }
  .ls-quran { font-size: 24px; }
  .lesson-screen { transform: none; }
  .billing-toggle button { padding: 8px 12px; font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) { body { animation: none; } .lesson-screen { transform: none; } }

/* ---------- floating social stack (WhatsApp + Instagram DM) ---------- */
.social-stack { position: fixed; left: 16px; bottom: 16px; z-index: 9999; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.social-stack a { position: static !important; display: block; width: 58px; height: 58px; border-radius: 50%; color: #fff; font-size: 30px; line-height: 58px; text-align: center; text-decoration: none; box-shadow: 0 6px 16px rgba(0,0,0,.2); transition: transform .2s, box-shadow .2s; }
.social-stack a:hover { transform: translateY(-3px) scale(1.05); box-shadow: 0 10px 22px rgba(0,0,0,.25); color: #fff; }
a.insta-popup-btn { background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%); }
.mobile-cta a.wa, .mobile-cta a.ig { flex: 0 0 48px; width: 48px; padding: 0; justify-content: center; font-size: 22px; }
.mobile-cta a.ig { background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fd5949 45%, #d6249f 60%, #285AEB 90%); color: #fff; }
@media (max-width: 991px) { body.has-mobile-cta .social-stack { bottom: 76px; } .social-stack a { width: 50px; height: 50px; line-height: 50px; font-size: 26px; } .wa-bubble { bottom: 84px; } }
@media (max-width: 991px) { body.has-mobile-cta .social-stack { display: none; } }
