/* Islamic Projects hub — page styles on top of the shared sakina.css */

/* ---------- Hero ---------- */
.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 440px);
  align-items: center;
  gap: clamp(32px, 6vw, 88px);
  padding-top: clamp(24px, 5vw, 56px);
}
.hero__text { display: flex; flex-direction: column; align-items: flex-start; gap: 26px; }
.hero__greeting { min-height: 34px; padding-inline: 10px 14px; gap: 9px; font-size: 13px; }
.hero__title { font-size: clamp(46px, 6.6vw, 86px); max-width: 15ch; }
.hero__lede { margin: 0; max-width: 44ch; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* The sky arch: time of day, real moon phase */
.sky { position: relative; width: 100%; aspect-ratio: 460 / 560; }
.sky__arch {
  position: absolute; inset: 0; overflow: hidden;
  box-shadow: var(--shadow-lg);
  background: linear-gradient(180deg, #050D1A 0%, #0B1D38 45%, #173A5E 80%, #25506F 100%);
  transition: background .6s var(--ease);
}
.sky__arch[data-sky="dawn"] { background: linear-gradient(180deg, #22325F 0%, #6C6AA6 40%, #E7A08C 75%, #F8D3A6 100%); }
.sky__arch[data-sky="day"] { background: linear-gradient(180deg, #7DB6E6 0%, #A9D3EE 45%, #DCEBEF 80%, #F3EEDF 100%); }
.sky__arch[data-sky="dusk"] { background: linear-gradient(180deg, #1C2552 0%, #4B3F7E 38%, #B8617A 72%, #F0A073 100%); }
.sky__stars { position: absolute; inset: 0; }
.sky__stars i { position: absolute; width: 3px; height: 3px; border-radius: 50%; background: #FFF6DC; animation: sk-twinkle 3.2s ease-in-out infinite; }
.sky__stars i:nth-child(even) { width: 2px; height: 2px; }
.sky__stars b { position: absolute; left: 72%; top: 13%; width: 90px; height: 1.5px; border-radius: 2px; background: linear-gradient(90deg, #FFF6DC, transparent); }
.sky__sun, .sky__moon { position: absolute; left: 50%; top: 18%; width: 38%; aspect-ratio: 1; display: grid; place-items: center; border-radius: 50%; }
.sky__sun { display: none; background: radial-gradient(circle, #FFE7B0 0 26%, rgba(255, 227, 163, .7) 27%, rgba(255, 227, 163, 0) 68%); }
.sky__moon { background: radial-gradient(circle, rgba(247, 237, 203, .28) 0%, rgba(247, 237, 203, 0) 65%); }
.sky__moon .sk-moon { width: 34%; height: 34%; --moon-lit: #F7EDCB; --moon-dark: rgba(6, 14, 28, .45); box-shadow: inset var(--x, 0) 0 0 0 var(--moon-lit), 0 0 24px rgba(247, 237, 203, .35); }
.sky__arch[data-sky="day"] .sky__stars, .sky__arch[data-sky="day"] .sky__moon { display: none; }
.sky__arch[data-sky="day"] .sky__sun { display: block; }
.sky__frame { position: absolute; inset: 16px; border: 1px solid rgba(255, 255, 255, .26); pointer-events: none; }
.sky__city { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: auto; aspect-ratio: 460 / 150; }
.sky__keystone { position: absolute; left: 50%; top: -17px; margin-left: -17px; }

.moon-chip {
  position: absolute; inset-inline-end: min(360px, 34vw); bottom: 70px;
  display: flex; align-items: center; gap: 14px;
  padding: 14px 20px 14px 14px; border-radius: 20px; border: 1px solid var(--line); box-shadow: var(--shadow);
}
.moon-chip__moon { width: 34px; height: 34px; --moon-dark: #1B2940; --moon-lit: #F7EDCB; }
.moon-chip__text { display: flex; flex-direction: column; gap: 2px; line-height: 1.3; }
.moon-chip__text strong { font-size: 15px; }
.moon-chip__text span { font-size: 13px; color: var(--text-3); }

/* ---------- Projects ---------- */
.projects { padding-top: clamp(72px, 10vw, 120px); display: flex; flex-direction: column; gap: 32px; }
.projects__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.projects__title { font-size: clamp(44px, 5vw, 60px); margin-top: 10px; }
.projects__filters { max-width: 100%; }

.bento { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.card { position: relative; display: flex; gap: 28px; padding: 28px; min-height: 320px; color: var(--text); overflow: hidden; }
.card:hover { color: var(--text); }
.card--wide { grid-column: span 2; }
.bento.is-filtered .card--wide { grid-column: auto; }
.bento.is-filtered .card__preview { display: none; }
.card__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.card__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.card__title { font-size: clamp(32px, 3vw, 38px); margin-top: 4px; }
.card__desc { margin: 0; flex-grow: 1; font-size: 15.5px; line-height: 1.6; color: var(--text-2); max-width: 44ch; }
.card__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.card__tags { display: flex; gap: 8px; flex-wrap: wrap; }
.card__cta { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 15px; color: var(--tile); }
.card .sk-tile { background: var(--tile-soft); color: var(--tile); }
.card.is-hidden { display: none; }
.card--full { grid-column: 1 / -1; min-height: 260px; }
.bento.is-filtered .card--full { grid-column: auto; }
.card--wide-lg { grid-column: span 2; min-height: 260px; }
.bento.is-filtered .card--wide-lg { grid-column: auto; }
.bento.is-filtered .card__timeline { display: none; }
.card__timeline { position: relative; flex: 0 1 520px; align-self: center; display: flex; flex-direction: column; gap: 10px; padding: 20px 22px; border-radius: 20px; background: var(--bg); border: 1px solid var(--line); }
.tl-row { display: grid; grid-template-columns: 62px minmax(0, 1fr); align-items: center; gap: 10px; font-size: 12.5px; font-weight: 700; color: var(--text-2); }
.tl-row i { position: relative; height: 14px; border-radius: 6px; background: var(--sunk); }
.tl-row b { position: absolute; top: 0; bottom: 0; border-radius: 5px; transform-origin: left; animation: tl-grow 1s var(--ease) both; }
.tl-row:nth-child(2) b { animation-delay: .08s; } .tl-row:nth-child(3) b { animation-delay: .16s; } .tl-row:nth-child(4) b { animation-delay: .24s; } .tl-row:nth-child(5) b { animation-delay: .32s; }
@keyframes tl-grow { from { transform: scaleX(0); } }
.tl-head { position: absolute; top: 12px; bottom: 12px; left: 94px; width: 2px; border-radius: 2px; background: var(--fiqh); box-shadow: 0 0 10px var(--fiqh); animation: tl-play 12s linear infinite; }
@keyframes tl-play { from { left: 94px; } to { left: calc(100% - 24px); } }
.card { animation: sk-rise .5s var(--ease) both; }

.card__preview { width: 330px; flex: none; display: flex; flex-direction: column; gap: 10px; padding: 18px; border-radius: 20px; background: var(--bg); border: 1px solid var(--line); }
.mini-search { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); font-size: 14.5px; font-weight: 500; }
.mini-search svg { color: var(--text-3); }
.mini-caret { border-right: 2px solid var(--primary); padding-right: 1px; animation: caret 1.1s steps(1) infinite; }
@keyframes caret { 50% { border-color: transparent; } }
.mini-hits { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; font-size: 14px; color: var(--text-2); }
.mini-hits li { display: flex; justify-content: space-between; padding: 10px; border-radius: 12px; }
.mini-hits li.is-on { background: var(--primary-soft); color: var(--text); }
.mini-hits li span { color: var(--primary); }

/* ---------- Hadith of the day ---------- */
.daily { padding-top: clamp(72px, 10vw, 112px); }
.daily__panel {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: 240px minmax(0, 1fr); align-items: center; gap: clamp(28px, 5vw, 64px);
  padding: clamp(28px, 5vw, 56px) clamp(24px, 5vw, 64px);
  border-radius: var(--r-xl); border: 1px solid var(--line);
  background: #0E2034; color: var(--text);
}
.daily__panel::before { content: ""; position: absolute; inset: 0; background-image: var(--pattern-img); background-size: 72px; opacity: .07; pointer-events: none; }
.daily__art { position: relative; width: 240px; height: 290px; display: grid; place-items: center; background: rgba(235, 196, 111, .08); border: 1px solid rgba(235, 196, 111, .3); }
.daily__art-frame { position: absolute; inset: 12px; border: 1px solid rgba(235, 196, 111, .18); }
.daily__text { position: relative; display: flex; flex-direction: column; gap: 22px; }
.daily__kicker { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.daily__kicker .sk-eyebrow { color: #EBC46F; }
.daily__quote { margin: 0; font-size: clamp(30px, 3.4vw, 44px); line-height: 1.15; max-width: 26ch; }
.daily__ref { margin: 0; font-size: 15.5px; color: var(--text-2); }
.daily__ref strong { color: var(--text); font-weight: 600; }
.daily__actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------- Note & footer ---------- */
.note { padding-top: 72px; display: flex; flex-direction: column; align-items: center; gap: 18px; text-align: center; }
.note__divider { width: min(320px, 70%); }
.note p { margin: 0; max-width: 58ch; font-size: 15px; line-height: 1.7; color: var(--text-3); }

.hub-footer { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px 48px; padding-block: 40px 32px; }
.hub-footer__about { display: flex; flex-direction: column; gap: 10px; max-width: 380px; }
.hub-footer__about p { margin: 0; font-size: 14.5px; color: var(--text-3); line-height: 1.6; }
.hub-footer__brand { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.hub-footer__links { display: grid; grid-template-columns: repeat(3, auto); gap: 12px 36px; align-content: start; font-size: 14.5px; font-weight: 500; }
.hub-footer__links a { display: flex; align-items: center; gap: 10px; color: var(--text-2); }
.hub-footer__links a:hover { color: var(--text); }
.hub-footer__links i { width: 8px; height: 8px; border-radius: 50%; }
.hub-footer__dua { grid-column: 1 / -1; display: flex; align-items: baseline; justify-content: flex-end; gap: 12px; flex-wrap: wrap; margin: 0; padding-top: 20px; border-top: 1px dashed var(--line); font-size: 13px; color: var(--text-3); }
.hub-footer__dua .sk-ar { font-size: 20px; color: var(--gold); }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card__preview, .card__timeline { display: none; }
  .card--wide-lg { grid-column: auto; }
  .moon-chip { inset-inline-end: auto; inset-inline-start: calc(100% - 440px - var(--gutter) - 48px); }
}
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; }
  .sky { max-width: 420px; justify-self: center; }
  .moon-chip { position: relative; inset: auto; justify-self: center; margin-top: -84px; z-index: 2; }
  .daily__panel { grid-template-columns: 1fr; }
  .daily__art { display: none; }
  .hub-footer { grid-template-columns: 1fr; }
  .hub-footer__links { grid-template-columns: repeat(2, auto); justify-content: start; }
  .hub-footer__dua { justify-content: flex-start; }
}
@media (max-width: 640px) {
  .bento { grid-template-columns: 1fr; }
  .card--wide { grid-column: auto; }
  .card { min-height: 0; padding: 22px; }
  .projects__head { align-items: flex-start; flex-direction: column; }
  .projects__filters { width: 100%; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); width: calc(100% + var(--gutter) * 2); }
  .hero__actions .sk-btn { flex: 1 1 auto; }
}

/* ---------- Arabic ---------- */
.daily__ar { margin: -8px 0 0; font-size: clamp(20px, 2.2vw, 26px); line-height: 1.9; color: #EBC46F; }
[dir="rtl"] .daily__quote.sk-ar { font-family: var(--font-naskh); font-weight: 400; font-size: clamp(28px, 3.2vw, 40px); line-height: 1.8; }
[dir="rtl"] .hero__title { font-size: clamp(40px, 5.4vw, 70px); max-width: 16ch; }
[dir="rtl"] .card__title { font-size: clamp(26px, 2.4vw, 32px); }
[dir="rtl"] .card__desc { font-family: var(--font-ar-text); line-height: 1.85; }
[dir="rtl"] .card__timeline { direction: ltr; }
[dir="rtl"] .tl-row span { font-family: var(--font-ar-ui); }
