/* ============================================================
   Testimonials — image-overlay cards + lightbox
   Shared by jamia/index.html (preview) and jamia/testimonials.html (full)
   ============================================================ */

.testi-wrap { margin-top: 8px; }
.testi-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 22px; }

.testi-card { position: relative; height: 236px; border-radius: 16px; overflow: hidden;
  cursor: pointer; border: 1px solid var(--line); background: var(--ink);
  box-shadow: 0 18px 40px -26px rgba(20,56,50,0.55); isolation: isolate;
  transition: transform .25s ease, box-shadow .25s ease; }
.testi-card:hover { transform: translateY(-4px); box-shadow: 0 26px 54px -24px rgba(20,56,50,0.6); }
.testi-card:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.testi-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  object-position: center 12%; filter: saturate(0.92) contrast(1.02); z-index: 0; }
.testi-overlay { position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, rgba(15,42,37,0.15) 0%, rgba(15,42,37,0.55) 46%, rgba(11,32,28,0.93) 100%); }
.testi-overlay::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--accent); }
.testi-content { position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column;
  justify-content: flex-end; padding: 20px 20px 18px; color: #fff; }
.testi-badge { position: absolute; top: 14px; left: 16px; display: inline-flex; align-items: center;
  gap: 6px; font-size: 0.66rem; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 700;
  color: #fff; background: rgba(10,28,25,0.42); border: 1px solid rgba(255,255,255,0.28);
  padding: 5px 10px; border-radius: 999px; backdrop-filter: blur(3px); }
.testi-badge svg { width: 12px; height: 12px; }
.testi-title { font-family: 'Cormorant Garamond', Georgia, serif; font-size: 1.24rem; line-height: 1.24;
  margin: 0 0 3px; color: #fff; font-weight: 600; text-shadow: 0 2px 10px rgba(0,0,0,0.4);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.testi-sub { font-size: 0.8rem; line-height: 1.4; color: rgba(255,255,255,0.82); margin: 0 0 12px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 0; }
.testi-btn { display: inline-flex; align-items: center; gap: 8px; align-self: flex-start;
  font-size: 0.76rem; font-weight: 600; letter-spacing: 0.02em; color: var(--ink);
  background: #fff; border-radius: 999px; padding: 7px 14px; line-height: 1;
  box-shadow: 0 6px 16px -8px rgba(0,0,0,0.5); transition: background .2s, color .2s; }
.testi-card:hover .testi-btn { background: var(--accent); color: #fff; }
.testi-btn .ur { font-family: 'AlQalam-Taj-Nastaleeq','Noto Nastaliq Urdu','Amiri',serif;
  direction: rtl; font-size: 0.95rem; line-height: 1; }
.testi-btn svg { width: 13px; height: 13px; }

.testi-more-wrap { text-align: center; margin-top: 30px; }
.testi-more { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; text-decoration: none;
  font-size: 0.95rem; font-weight: 600; color: var(--ink); background: var(--white);
  border: 1px solid var(--line); border-radius: 999px; padding: 12px 26px;
  box-shadow: var(--shadow); transition: background .2s, color .2s, border-color .2s; }
.testi-more:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
.testi-more .ur { font-family: 'AlQalam-Taj-Nastaleeq','Noto Nastaliq Urdu','Amiri',serif;
  direction: rtl; font-size: 1.15rem; line-height: 1; }
.testi-more .cnt { opacity: .7; font-weight: 600; }
.testi-more svg { width: 15px; height: 15px; }

.t-urdu-sub { text-align: center; font-family: 'AlQalam-Taj-Nastaleeq','Noto Nastaliq Urdu','Amiri',serif;
  direction: rtl; font-size: 1.7rem; line-height: 2; margin-top: 12px; color: var(--accent-deep); }
.t-register-note { text-align: center; margin-top: 30px; color: var(--ink-mute); font-style: italic; font-size: 0.92rem; }

/* ---- Lightbox (zoomable / pannable image viewer) ---- */
.testi-lb { position: fixed; inset: 0; z-index: 99999; display: none; flex-direction: column;
  background: rgba(9,22,20,0.95); }
.testi-lb.open { display: flex; animation: testiLbIn .2s ease; }
@keyframes testiLbIn { from { opacity: 0; } to { opacity: 1; } }

.testi-lb-topbar { flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 10px 14px; color: #fff; background: rgba(0,0,0,0.28); }
.testi-lb-cap { min-width: 0; display: flex; align-items: baseline; gap: 10px; overflow: hidden; }
.testi-lb-cap .lb-t { font-family: 'Cormorant Garamond', Georgia, serif; font-size: 1.15rem; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.testi-lb-cap .lb-s { font-size: 0.84rem; color: rgba(255,255,255,0.7); white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis; flex: 1 1 auto; }
.testi-lb-tools { flex: 0 0 auto; display: flex; align-items: center; gap: 8px; }
.testi-zbtn, .testi-zlevel, .testi-lb-close { background: rgba(255,255,255,0.12); color: #fff; cursor: pointer;
  border: 1px solid rgba(255,255,255,0.3); border-radius: 8px; height: 38px; display: flex; align-items: center;
  justify-content: center; transition: background .18s; font-family: inherit; }
.testi-zbtn { width: 38px; font-size: 1.35rem; line-height: 1; }
.testi-zbtn:disabled { opacity: .4; cursor: default; }
.testi-zlevel { min-width: 58px; font-size: 0.8rem; font-variant-numeric: tabular-nums; }
.testi-lb-close { width: 38px; font-size: 1.5rem; line-height: 1; border-radius: 50%; margin-left: 2px; }
.testi-zbtn:hover:not(:disabled), .testi-zlevel:hover, .testi-lb-close:hover { background: rgba(255,255,255,0.26); }

.testi-lb-stage { flex: 1 1 auto; display: flex; overflow: auto; position: relative; padding: 16px;
  -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.testi-lb-stage.is-pannable { cursor: grab; }
.testi-lb-stage.grabbing { cursor: grabbing; }
.testi-lb-img { margin: auto; display: block; height: auto; max-width: none; user-select: none;
  -webkit-user-drag: none; border-radius: 6px; border: 4px solid #fff;
  box-shadow: 0 20px 60px -20px rgba(0,0,0,0.7); background: #fff; }
.testi-lb-loader { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  color: rgba(255,255,255,0.75); font-size: 0.9rem; letter-spacing: .04em; }

.testi-lb-nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 3; width: 46px; height: 46px;
  border-radius: 50%; background: rgba(255,255,255,0.14); border: 1px solid rgba(255,255,255,0.3); color: #fff;
  font-size: 1.9rem; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background .18s; }
.testi-lb-nav:hover { background: rgba(255,255,255,0.28); }
.testi-lb-nav.prev { left: 14px; } .testi-lb-nav.next { right: 14px; }
.testi-lb-foot { flex: 0 0 auto; text-align: center; color: rgba(255,255,255,0.62); font-size: 0.75rem; padding: 7px 8px; }
.testi-lb-hint { color: rgba(255,255,255,0.4); }

.testi-card.reveal-in { animation: testiIn .5s ease both; }
@keyframes testiIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

@media (max-width: 640px) {
  .testi-lb-nav { width: 40px; height: 40px; font-size: 1.6rem; }
  .testi-lb-nav.prev { left: 8px; } .testi-lb-nav.next { right: 8px; }
  .testi-lb-cap .lb-s { display: none; }
  .testi-lb-hint { display: none; }
  .testi-card { height: 210px; }
}
