/* =========================================================================
   Шаңырақ мешіті (Жаңаөзен) — LED-экран
   Көк фон, кремді ақ, шабдалы түсті белгі.
   Цифрлар мен күн — Oswald, қалғаны — Fira Sans Condensed.
   Сол жақ — намаз уақыттары. Оң жақ — кезектесетін Күн аяты / Күн хадисі / Ақпарат, астында QR.
   1rem = экран енінің 1% (16:9 болмаса — биіктігі бойынша).
   ========================================================================= */

@font-face { font-family: 'Oswald'; font-weight: 500; src: url('fonts/oswald-500.ttf') format('truetype'); }
@font-face { font-family: 'Oswald'; font-weight: 600; src: url('fonts/oswald-600.ttf') format('truetype'); }
@font-face { font-family: 'FiraI'; font-weight: 400; src: url('fonts/fira-400.ttf') format('truetype'); }
@font-face { font-family: 'FiraI'; font-weight: 600; src: url('fonts/fira-c-500.ttf') format('truetype'); }
@font-face { font-family: 'FiraI'; font-weight: 700; src: url('fonts/fira-c-600.ttf') format('truetype'); }
@font-face { font-family: 'KFGQPC'; src: url('fonts/KFGQPC%20Uthmanic%20Script%20HAFS%20Regular.otf') format('opentype'); }
@font-face { font-family: 'AdwaSalaf'; src: url('fonts/adwa-assalaf%20Regular.ttf') format('truetype'); }

:root {
  /* --dk — цифрлар мен күннің масштабы, --cell — ең кең цифрдың ені, сағат «қозғалмасын» */
  --f: 'FiraI'; --f-d: 'Oswald'; --num-w: 500; --d-w: 500; --w-strong: 600; --cell: .56em; --cell-c: .26em; --dk: 1.12;
  --hn: 3.2rem; --hn-t: 3.2rem; --ha: 3rem; --ha-t: 7.15rem; --rad: .9rem; --rad2: 1.1rem;
  /* --w — сол жақ ені, --k — сол жақтағы жазулардың масштабы */
  --w: 35%; --k: .86; --hh: 9.35rem;

  /* Ұлытау орталық мешітінің логотипі сияқты көк фон, ақ жазу, шабдалы белгі, қазіргі намаз — кремді карточка */
  --bg1: #1C7FE8; --bg2: #0A52BE; --glow: rgba(255,255,255,.1);
  --line2: rgba(255,255,255,.26); --row: rgba(255,255,255,.08); --row-bd: rgba(255,255,255,.24); --row-sh: none;
  --tx: #FFFFFF; --tx2: rgba(236,244,255,.82); --acc: #F5C795; --pill-tx: #0A4FB4; --ar: #F8DDBB;
  --hero1: #FFF9F3; --hero2: #F8E8DA; --hero-tx: #10233F; --hero-acc: #0B63D1; --hero-mute: #5F6F86; --hero-track: rgba(11,99,209,.15); --hero-ar: #0B63D1; --hero-bd: #F5C795;
  --pan: rgba(255,255,255,.07); --pan-bd: rgba(255,255,255,.24); --cap: #F5C795; --pan-ar: #FFFFFF; --pan-kz: #FFFFFF;
  --orn: #FFFFFF; --orn-op: .06; --div-dot: #F5C795;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: min(1vw, 1.7778vh); width: 100%; height: 100%; overflow: hidden; background: var(--bg2); }
body { width: 100%; height: 100%; overflow: hidden; color: var(--tx);
  font-family: var(--f), Arial, sans-serif; font-weight: 400; font-feature-settings: 'tnum' 1; font-synthesis: none;
  -webkit-font-smoothing: antialiased; }
i { font-style: normal; }
.stage { position: fixed; inset: 0; overflow: hidden; text-transform: uppercase; }   /* барлық мәтін бас әріппен */

/* ------------------------------- фон ------------------------------------ */
.bg { position: absolute; inset: 0; overflow: hidden; background: linear-gradient(170deg, var(--bg1) 0%, var(--bg2) 100%); }
.au { position: absolute; border-radius: 50%; will-change: transform; }
.au1 { left: -25%; top: -40%; width: 80%; height: 120%; background: radial-gradient(circle, var(--glow) 0%, transparent 65%); animation: drift1 40s ease-in-out infinite alternate; }
.au2 { left: -10%; bottom: -60%; width: 70%; height: 110%; background: radial-gradient(circle, var(--glow) 0%, transparent 65%); opacity: .6; animation: drift2 52s ease-in-out infinite alternate; }
@keyframes drift1 { to { transform: translate(12%, 14%) scale(1.1); } }
@keyframes drift2 { to { transform: translate(10%, -12%) scale(.92); } }

/* қазақ ою-өрнегі (дөңгелек розетка): түсі градиентпен, кейбіреуі бұлыңғыр.
   blur — сыртқы қабатта, маска — ішкіде (әйтпесе маска бұлыңғырды кесіп тастайды). */
.orn { position: absolute; opacity: var(--orn-op); }
.orn > i { position: absolute; inset: 0; background: var(--orn);
  -webkit-mask: var(--m-oyu) center / contain no-repeat; mask: var(--m-oyu) center / contain no-repeat;
  animation: ornspin 420s linear infinite; }
.orn-a { left: -42vh; bottom: -62vh; width: 140vh; height: 140vh; }
.orn-b { right: -50vh; top: -50vh; width: 100vh; height: 100vh; }  /* көрінетіні — ширегі */
.orn-b > i { animation-direction: reverse; animation-duration: 340s; }
@keyframes ornspin { to { transform: rotate(360deg); } }


.ui { position: absolute; inset: 0; transition: opacity 1s ease; }
.ui.ui-hidden { opacity: 0; }


/* ========================= ШАПКА (бекітілген) =========================== */
.hdr { position: absolute; left: 0; right: 0; top: 0; height: var(--hh); }
.hdr:after { content: ''; position: absolute; left: 1.8rem; right: 0; bottom: 0; height: 1px; background: var(--line2); }
.h-l { position: absolute; left: 0; top: 0; bottom: 0; width: var(--w); padding: 0 1.8rem; display: flex; align-items: center; }
/* екі логотип: сол жақта ҚМДБ, оң жағында мешіт */
.hl { flex: none; display: block; height: 6.3rem; width: auto; }
.hl-mosque { margin-left: 2rem; }

/* жіңішке тік сызық — шапканың ішіндегі екі бөлікті бөледі */
.h-r { position: absolute; left: var(--w); right: 0; top: 0; bottom: 0; padding: 0 2.2rem; display: flex; align-items: center; }
.h-r:before { content: ''; position: absolute; left: -.9rem; top: 24%; bottom: 24%; width: 1px; background: var(--line2); }
.h-r:after { content: ''; position: absolute; left: -1.22rem; top: 50%; width: .64rem; height: .64rem; margin-top: -.32rem; transform: rotate(45deg); background: var(--div-dot); }
.dates { min-width: 0; white-space: nowrap; font-size: 1rem; }
.d1 { font-family: var(--f-d); font-size: calc(2.1em * var(--dk)); font-weight: var(--d-w); line-height: 1.2; text-transform: uppercase; letter-spacing: .01em; }
.d2 { margin-top: .25em; font-size: 1.4em; font-weight: 400; color: var(--tx2); line-height: 1.4; }
.d2 .ar { font-family: 'AdwaSalaf', serif; font-weight: 400; font-size: 1.15em; color: var(--ar); direction: rtl; unicode-bidi: isolate; }
.d2 .dash { display: inline-block; width: 1.4em; height: 2px; margin: 0 .6em; vertical-align: .32em; background: var(--line2); }
.clock { font-family: var(--f-d); margin-left: auto; padding-left: 2rem; font-size: calc(5rem * var(--dk)); font-weight: var(--w-strong); line-height: 1; letter-spacing: -.02em; white-space: nowrap; }
.clock .s { color: var(--acc); }
/* әр цифр өз ұяшығында — секунд ауысқанда сағат «қозғалмайды» */
.clock b { display: inline-block; width: var(--cell); text-align: center; font-weight: inherit; }
.clock b.c { width: var(--cell-c); }
.pcd-v b { display: inline-block; width: var(--cell); text-align: center; font-weight: inherit; }
.pcd-v b.c { width: var(--cell-c); }

/* ========================= СОЛ ЖАҚ: намаз =============================== */
.lc { position: absolute; left: 0; top: var(--hh); bottom: 0; width: var(--w); padding: 1.4rem 1.8rem 1.8rem; display: flex; flex-direction: column; }
.lp { position: relative; flex: 1 1 auto; min-height: 0; }
.rows { position: absolute; inset: 0; }
.pr { position: relative; display: block; height: 11.9%; margin-bottom: .55rem;
  transition: height .7s cubic-bezier(.2,.8,.2,1); }
.pr-l { margin-bottom: 0; }
.pc-in { position: absolute; inset: 0; overflow: hidden; border-radius: var(--rad);
  background: var(--row); border: 2px solid var(--row-bd, var(--line)); box-shadow: var(--row-sh);
  transition: background-color .7s ease; }
.pn { position: absolute; left: calc(1.35rem * var(--k)); top: 50%; transform: translateY(-50%); font-size: calc(2.3rem * var(--k)); line-height: 1.2; font-weight: 600; text-transform: uppercase; letter-spacing: 0; white-space: nowrap; }
.pa { position: absolute; right: calc(11.4rem * var(--k)); top: 50%; transform: translateY(-50%); font-family: 'AdwaSalaf', serif; font-weight: 400; direction: rtl;
  font-size: calc(3.1rem * var(--k)); line-height: 1.3; color: var(--ar); white-space: nowrap; }
.ptag { position: absolute; left: 46%; top: 50%; transform: translate(-50%, -50%); width: calc(4.5rem * var(--k)); line-height: calc(1.75rem * var(--k)); text-align: center; border-radius: 99px;
  font-size: calc(.62rem * var(--k)); letter-spacing: .14em; text-transform: uppercase; font-weight: 600;
  color: var(--pill-tx); background: var(--acc); opacity: 0; }
.pt { position: absolute; right: calc(1.3rem * var(--k)); top: 50%; transform: translateY(-50%); font-family: var(--f-d); font-size: calc(3rem * var(--k) * var(--dk)); line-height: 1; font-weight: var(--w-strong); letter-spacing: -.02em; white-space: nowrap; }
.pdate, .pcd { display: none; }

.pr.is-next .ptag { opacity: 0; }   /* «Келесі» белгісі алынып тасталды — келесі намазды жақтауының түсі көрсетеді */
/* келесі намаз — жақтауы да акцент түсті, белгі анық көрінсін */
.pr.is-next .pc-in { border-color: var(--acc); }

/* қазіргі намаз — карточка, өз орнында үлкейеді */
.pr.is-now { height: calc(100% - 5 * 11.9% - 5 * .55rem); }   /* баған QR-дың астымен дәл бітеді */
.pr.is-now .pc-in { border-color: var(--hero-bd); background: linear-gradient(to bottom, var(--hero1), var(--hero2));
  box-shadow: 0 .9rem 2.6rem rgba(0,0,0,.22); animation: heroin .8s ease both; }
@keyframes heroin { from { opacity: .4; } }
.pr.is-now .ptag { opacity: 1; left: calc(1.6rem * var(--k)); top: calc(1.35rem * var(--k)); transform: none; width: auto; line-height: 1.2; text-align: left;
  background: none; color: var(--hero-acc); font-size: calc(1.1rem * var(--k)); letter-spacing: .24em; }
.pr.is-now .pn { left: calc(1.6rem * var(--k)); top: calc(var(--hn-t) * var(--k)); transform: none; font-size: calc(var(--hn) * var(--k)); line-height: 1.15; font-weight: 700; color: var(--hero-tx); }
.pr.is-now .pa { left: calc(1.6rem * var(--k)); right: auto; top: calc(var(--ha-t) * var(--k)); transform: none; font-size: calc(var(--ha) * var(--k)); line-height: 1.2; color: var(--hero-ar); }
.pr.is-now .pdate { display: none; position: absolute; right: calc(1.6rem * var(--k)); top: calc(1.35rem * var(--k)); line-height: 1.2; font-size: calc(.95rem * var(--k)); font-weight: 400; color: var(--hero-mute); white-space: nowrap; }
.pr.is-now .pt { right: calc(1.6rem * var(--k)); top: calc(1.2rem * var(--k)); transform: none; font-size: calc(5.7rem * var(--k) * var(--dk)); color: var(--hero-acc); letter-spacing: -.03em; font-weight: var(--w-strong); }
.pr.is-now .pcd { display: block; position: absolute; left: calc(1.6rem * var(--k)); right: calc(1.6rem * var(--k)); bottom: calc(1.25rem * var(--k)); padding-top: calc(1.1rem * var(--k)); white-space: nowrap; }
.pcd-l { font-size: calc(1.55rem * var(--k)); font-weight: 600; color: var(--hero-mute); line-height: calc(2.2rem * var(--k)); }
.pcd-v { float: right; font-family: var(--f-d); font-size: calc(2.2rem * var(--k) * var(--dk)); font-weight: var(--num-w); color: var(--hero-tx); line-height: calc(2.2rem * var(--k)); letter-spacing: -.01em; }
.pbar { position: absolute; left: 0; right: 0; top: 0; height: calc(.42rem * var(--k)); border-radius: 99px; overflow: hidden; background: var(--hero-track); }
.pbar-f { position: absolute; inset: 0; border-radius: 99px; background: var(--hero-acc);
  transform-origin: 0 50%; transform: scaleX(0); transition: transform 1s linear; }

/* ================= ОҢ ЖАҚ: Күн аяты / Күн хадисі, QR ==================== */
.rc { position: absolute; left: var(--w); right: 1.8rem; top: calc(var(--hh) + 1.4rem); bottom: 1.8rem; display: flex; flex-direction: column; }
.pan { position: relative; flex: 1 1 auto; min-height: 0; border-radius: var(--rad2); background: var(--pan); border: 2px solid var(--pan-bd); box-shadow: var(--row-sh); overflow: hidden; }
.cap { position: absolute; left: 2rem; top: 1.5rem; font-size: 1.2rem; line-height: 1.6rem; letter-spacing: .06em; text-transform: uppercase; font-weight: 600; color: var(--cap); white-space: nowrap; }
.cap i { display: inline-block; width: .6rem; height: .6rem; border-radius: 50%; background: var(--cap); margin-right: .75rem; vertical-align: .14rem; }
.src { position: absolute; right: 2rem; top: 1.5rem; font-size: 1.15rem; line-height: 1.6rem; color: var(--tx2); white-space: nowrap; }
.pbody { position: absolute; left: 3rem; right: 3rem; top: 4.2rem; bottom: 1.8rem; overflow: hidden; text-align: center; }
.cap, .src, .pbody { transition: opacity .9s ease; }
.pan.is-swap .cap, .pan.is-swap .src, .pan.is-swap .pbody { opacity: 0; }
.arb { direction: rtl; color: var(--pan-ar); }
.arb { font-family: 'KFGQPC', serif; line-height: 1.75; }
.sep { position: relative; width: 9rem; height: 1px; margin: .9rem auto 1rem; background: var(--line2); }
.sep:after { content: ''; position: absolute; left: 50%; top: 50%; width: .5rem; height: .5rem; margin: -.3rem 0 0 -.3rem; transform: rotate(45deg); border: 1.5px solid var(--cap); background: var(--bg2); }
.kaz { font-weight: 600; line-height: 1.4; color: var(--pan-kz); }
/* Ақпарат: бірінші жол — тақырып, қалғаны — мәтін */
.pan.is-info .sep { display: none; }
.pan.is-info .arb { direction: ltr; font-family: var(--f); font-weight: 600; line-height: 1.25; color: var(--cap); overflow-wrap: anywhere; }
.pan.is-info .arb:not(:empty) { margin-bottom: .55em; }
.pan.is-info .kaz { white-space: pre-line; overflow-wrap: anywhere; }
.pan.is-empty .cap { visibility: hidden; }

/* QR — панельдің астында еркін қатар, жақтаусыз */
.qrs { flex: none; display: flex; justify-content: space-between; margin-top: 1.8rem; }
.qg { flex: none; display: flex; align-items: center; }
.qg + .qg { margin-left: .8rem; }
.qt { flex: none; width: 5.95rem; height: 5.95rem; border-radius: .3rem; background: #FFFFFF; }
.qt img { display: block; width: 100%; height: 100%; }
.qx { min-width: 6.4rem; margin-left: .7rem; }
.qe { font-size: 1rem; line-height: 1.2; font-weight: 400; color: var(--tx2); white-space: nowrap; }
.qn { margin-top: .15em; font-size: 1.2rem; line-height: 1.1; font-weight: 600; color: var(--tx); white-space: nowrap; }

/* ============== «… намазының уақыты кірді» (minaret.kz шешімі) ========== */
.ov { position: absolute; inset: 0; opacity: 0; pointer-events: none; z-index: 5; transition: opacity 1s ease; }
.ov.is-on { opacity: 1; }
.ov-clock { position: absolute; left: 0; right: 0; top: 10%; text-align: center; font-family: var(--f-d); font-size: 3.6rem; line-height: 1; font-weight: var(--num-w); color: var(--tx2); }
.ov-msg { position: absolute; left: 2%; right: 2%; top: 30%; text-align: center; white-space: nowrap;
  font-family: var(--f-d); font-size: 3.9rem; line-height: 1.1; font-weight: var(--d-w); letter-spacing: .01em; text-transform: uppercase; color: var(--tx); }
.ov-msg-ar { position: absolute; left: 2%; right: 2%; top: 54%; text-align: center; white-space: nowrap;
  direction: rtl; unicode-bidi: embed; font-family: 'AdwaSalaf', serif; font-weight: 400; font-size: 2.6rem; line-height: 1.3; color: var(--tx); }

/* ------------------------------ ескерту ---------------------------------- */
.notice { position: absolute; left: 0; bottom: 0; width: var(--w); line-height: 1.8rem; text-align: center; font-size: .9rem;
  color: var(--pill-tx); background: var(--acc); display: none; z-index: 6; }
.notice.is-on { display: block; }
