/* ── /خلفيات-إسلامية/ — phone wallpapers gallery ── */
:root { --wp-card: #fff; --wp-soft: #f4f9fd; --wp-gold: #b8860b; }
body.dark { --wp-card: #1c1c1e; --wp-soft: #232327; --wp-gold: #f0c64a; }

.wp-hero { padding-bottom: 64px; }
.wp-wrap { max-width: 1100px; margin: -40px auto 0; padding: 0 16px 44px; position: relative; z-index: 2; display: grid; gap: 28px; color: var(--page-text); }
.wp-wrap [hidden] { display: none !important; }

.wp-filters { display: flex; gap: 8px; overflow-x: auto; padding: 10px; background: var(--wp-card); border: 1px solid var(--separator);
  border-radius: 18px; box-shadow: 0 10px 40px rgba(13,136,196,.12); scrollbar-width: none; }
.wp-filters::-webkit-scrollbar { display: none; }
.wp-filters button { flex: none; font: 700 14px inherit; font-family: inherit; border: 1.5px solid var(--separator); border-radius: 99px; padding: 8px 14px;
  background: var(--wp-card); color: var(--text-sec); cursor: pointer; }
.wp-filters button small { font-weight: 600; opacity: .7; }
.wp-filters button.is-on { background: linear-gradient(135deg, #2aa8ff, #0a74f0); border-color: transparent; color: #fff; box-shadow: 0 4px 12px rgba(10,116,240,.25); }

.wp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 16px; }
.wp-card { position: relative; display: block; aspect-ratio: 9 / 16; border-radius: 22px; overflow: hidden; background: var(--wp-soft);
  box-shadow: 0 6px 22px rgba(0,0,0,.14); transition: transform .2s, box-shadow .2s; }
.wp-card:hover { transform: translateY(-4px); box-shadow: 0 14px 34px rgba(0,0,0,.2); }
.wp-card img { width: 100%; height: 100%; object-fit: cover; display: block; }
.wp-tag { position: absolute; top: 10px; inset-inline-start: 10px; font-size: 11.5px; font-weight: 700; color: #fff; background: rgba(0,0,0,.42);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); border-radius: 99px; padding: 3px 9px; }

.wp-section { display: grid; gap: 12px; }
.wp-section h2 { font-family: var(--font-quran); font-size: 24px; }
.wp-section a { color: var(--blue-darker); font-weight: 700; text-decoration: none; }
body.dark .wp-section a { color: var(--blue); }
.wp-how { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.wp-how > div { background: var(--wp-card); border: 1px solid var(--separator); border-radius: 16px; padding: 14px 16px; }
.wp-how h3 { font-size: 16px; margin-bottom: 8px; }
.wp-how ol { display: grid; gap: 6px; padding-inline-start: 20px; line-height: 1.8; color: var(--text-sec); font-size: 14.5px; }
.wp-tip { background: var(--wp-soft); border-radius: 12px; padding: 10px 14px; line-height: 1.8; font-size: 14px; color: var(--text-sec); }
.wp-more ul { display: grid; gap: 6px; padding-inline-start: 18px; line-height: 1.8; }
.wp-faq details { background: var(--wp-card); border: 1px solid var(--separator); border-radius: 12px; padding: 0 14px; }
.wp-faq summary { cursor: pointer; font-weight: 700; padding: 12px 0; }
.wp-faq details p { padding-bottom: 12px; line-height: 1.85; color: var(--text-sec); }
.wp-note p { line-height: 1.9; color: var(--text-sec); }

/* ── lightbox ── */
body.wp-noscroll { overflow: hidden; }
.wp-lb { position: fixed; inset: 0; z-index: 1000; background: rgba(8,12,20,.88); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  display: grid; place-items: center; padding: 20px; }
.wp-lb[hidden] { display: none; }
.wp-lb-body { display: flex; align-items: center; gap: 32px; max-height: 100%; }
.wp-phone { position: relative; height: min(78vh, 720px); aspect-ratio: 9 / 19.5; border-radius: 44px; overflow: hidden; background: #000;
  border: 10px solid #111; box-shadow: 0 0 0 2px #333, 0 30px 80px rgba(0,0,0,.6); flex: none; }
.wp-phone img { width: 100%; height: 100%; object-fit: cover; display: block; }
.wp-phone::before { content: ''; position: absolute; top: 10px; left: 50%; transform: translateX(-50%); width: 32%; height: 22px; border-radius: 99px; background: #000; z-index: 2; }
.wp-lock { position: absolute; top: 9%; inset-inline: 0; text-align: center; color: #fff; text-shadow: 0 1px 12px rgba(0,0,0,.35);
  font-family: -apple-system, 'SF Pro Display', 'Segoe UI', sans-serif; display: grid; gap: 0; pointer-events: none; }
.wp-lock span { font-size: clamp(12px, 1.9vh, 16px); font-weight: 600; opacity: .92; }
.wp-lock b { font-size: clamp(48px, 10vh, 92px); font-weight: 700; line-height: 1.05; letter-spacing: -1px; direction: ltr; }
.wp-phone.no-lock .wp-lock { display: none; }
.wp-lb-side { width: 300px; color: #fff; display: grid; gap: 12px; }
.wp-lb-text { font-family: var(--font-quran); font-size: 22px; line-height: 2; }
.wp-lb-src { font-size: 13px; opacity: .7; }
.wp-lb-check { display: flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; opacity: .9; }
.wp-lb-check input { width: 18px; height: 18px; accent-color: #2aa8ff; }
.wp-lb-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.wp-btn { font: 700 15px inherit; font-family: inherit; border-radius: 99px; padding: 11px 18px; cursor: pointer; border: 1.5px solid rgba(255,255,255,.35);
  background: rgba(255,255,255,.08); color: #fff; text-decoration: none; display: inline-flex; align-items: center; gap: 8px; }
.wp-btn-main { background: linear-gradient(135deg, #2aa8ff, #0a74f0); border-color: transparent; box-shadow: 0 6px 18px rgba(10,116,240,.35); }
.wp-lb-x { position: absolute; top: 14px; inset-inline-end: 14px; width: 42px; height: 42px; border-radius: 50%; border: 0; background: rgba(255,255,255,.12);
  color: #fff; font-size: 18px; cursor: pointer; z-index: 3; }
.wp-lb-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; border-radius: 50%; border: 0; background: rgba(255,255,255,.12);
  color: #fff; font-size: 30px; line-height: 1; cursor: pointer; z-index: 3; }
.wp-lb-prev { left: 16px; }
.wp-lb-next { right: 16px; }

@media (max-width: 760px) {
  .wp-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
  .wp-card { border-radius: 16px; }
  .wp-tag { font-size: 10px; top: 7px; inset-inline-start: 7px; padding: 2px 7px; }
  .wp-how { grid-template-columns: 1fr; }
  .wp-lb { padding: 12px 8px; align-items: start; overflow-y: auto; }
  .wp-lb-body { flex-direction: column; gap: 14px; padding-top: 34px; }
  .wp-phone { height: min(64vh, 600px); border-width: 7px; border-radius: 34px; }
  .wp-lb-side { width: 100%; max-width: 360px; text-align: center; justify-items: center; }
  .wp-lb-text { font-size: 18px; line-height: 1.9; display: none; }
  .wp-lb-nav { top: 38vh; width: 40px; height: 40px; font-size: 26px; }
  .wp-lb-prev { left: 6px; }
  .wp-lb-next { right: 6px; }
}
@media (max-width: 420px) { .wp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
