/* ═══════════════════════════════════════════
   view-questions.css
   Purple design system — matches site theme
   ═══════════════════════════════════════════ */

@font-face {
  font-family: 'DroidKufi';
  src: url('../fonts/DroidKufi-Regular.woff2') format('woff2'),
       url('../fonts/DroidKufi-Regular.woff')  format('woff'),
       url('../fonts/DroidKufi-Regular.ttf')   format('truetype');
}

*, *::before, *::after { box-sizing: border-box; }

body, html,
h1,h2,h3,h4,h5,h6,p,span,a,li,td,th,div,
label,input,textarea,select,button {
  font-family: 'DroidKufi', sans-serif !important;
}

:root {
  --p:  #5b21b6;
  --pl: #7c3aed;
  --pd: #3b0764;
  --bg: #f3f0ff;
  --bg2:#ede9fe;
  --ink:#1e1b2e;
  --bdr:#d4ccec;
  --accent:#a78bfa;
}

/* ── SECTION ── */
.questions-section {
  padding: 60px 0 80px;
  background: #f0eefa;
  min-height: 60vh;
}

.container-custom {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ── GRID ── */
.questions-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
@media (max-width: 991px) { .questions-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 576px) { .questions-grid { grid-template-columns: 1fr; } }

/* ── CARD ── */
.question-card {
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 4px 24px rgba(91,33,182,.10);
  border: 1.5px solid var(--bdr);
  overflow: hidden;
  transition: transform .28s ease, box-shadow .28s ease;
  display: flex;
  flex-direction: column;
}
.question-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 36px rgba(91,33,182,.18);
}

.question-card-body {
  padding: 22px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.question-card-body h5 {
  font-size: 15px;
  font-weight: 700;
  color: var(--pd);
  margin: 0;
  line-height: 1.6;
  text-align: right;
}

.question-card-body > p {
  font-size: 12px;
  color: var(--pl);
  margin: 0;
  background: var(--bg2);
  display: inline-block;
  padding: 3px 12px;
  border-radius: 20px;
  align-self: flex-end;
}

/* ── IMAGES STRIP ── */
.question-card-images {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.question-card-images img {
  width: calc(50% - 4px);
  height: 110px;
  object-fit: cover;
  border-radius: 10px;
  cursor: pointer;
  border: 2px solid var(--bdr);
  transition: border-color .2s, transform .2s, box-shadow .2s;
}
.question-card-images img:hover {
  border-color: var(--pl);
  transform: scale(1.03);
  box-shadow: 0 4px 14px rgba(91,33,182,.22);
}
/* if only 1 image — full width */
.question-card-images img:only-child {
  width: 100%;
  height: 180px;
}

/* ── VIEW ALL BUTTON ── */
.btn-view-images {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  background: linear-gradient(135deg, var(--pd), var(--pl));
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  padding: 10px 22px;
  border-radius: 25px;
  border: none;
  cursor: pointer;
  width: 100%;
  margin-top: 6px;
  transition: all .25s;
  box-shadow: 0 4px 14px rgba(91,33,182,.25);
}
.btn-view-images::before {
  content: '\f03e'; /* fa-picture-o */
  font-family: FontAwesome;
}
.btn-view-images:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(91,33,182,.35);
}

/* ── NO IMAGE MSG ── */
.no-images-msg {
  text-align: center;
  color: #aaa;
  font-size: 13px;
  padding: 20px 0;
}

/* ── EMPTY STATE ── */
.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 80px 20px;
  color: #999;
  font-size: 16px;
}

/* ═══════════════════════════════════════════
   FULLSCREEN IMAGE SLIDER MODAL
   ═══════════════════════════════════════════ */

.image-slider-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(10,5,20,.96);
  flex-direction: column;
  animation: slFadeIn .25s ease;
}
.image-slider-modal.open {
  display: flex;
}
@keyframes slFadeIn {
  from { opacity:0; }
  to   { opacity:1; }
}

/* header */
.sl-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  background: rgba(59,7,100,.6);
  backdrop-filter: blur(8px);
  flex-shrink: 0;
}
.sl-title {
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  max-width: 60%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sl-counter {
  color: rgba(255,255,255,.75);
  font-size: 13px;
  background: rgba(255,255,255,.1);
  padding: 4px 14px;
  border-radius: 20px;
}
.close-slider {
  color: #fff;
  font-size: 28px;
  cursor: pointer;
  line-height: 1;
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s;
}
.close-slider:hover { background: rgba(255,255,255,.15); }

/* main image area */
.image-slider-modal-content {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  min-height: 0;
}
.image-slider-modal-content img {
  max-width: 90%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 8px;
  transition: opacity .25s ease, transform .25s ease;
  user-select: none;
  pointer-events: none;
}
.image-slider-modal-content img.fade {
  opacity: 0;
  transform: scale(.97);
}

/* nav arrows */
.prev, .next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(91,33,182,.55);
  color: #fff;
  width: 48px; height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  cursor: pointer;
  transition: background .2s, transform .2s;
  backdrop-filter: blur(4px);
  z-index: 2;
  user-select: none;
}
.prev:hover, .next:hover {
  background: var(--pl);
  transform: translateY(-50%) scale(1.1);
}
.prev { right: 20px; }
.next { left:  20px; }

/* caption / counter */
#caption {
  color: rgba(255,255,255,.7);
  font-size: 13px;
  background: rgba(255,255,255,.1);
  padding: 4px 14px;
  border-radius: 20px;
  text-align: center;
  position: absolute;
  top: 70px;
  left: 50%;
  transform: translateX(-50%);
  display: none; /* hidden — counter shown in header */
}

/* thumbnails */
.sl-thumbs {
  display: flex;
  gap: 8px;
  padding: 12px 20px;
  background: rgba(59,7,100,.5);
  backdrop-filter: blur(8px);
  overflow-x: auto;
  flex-shrink: 0;
  justify-content: center;
}
.sl-thumbs::-webkit-scrollbar { height: 4px; }
.sl-thumbs::-webkit-scrollbar-thumb { background: var(--pl); border-radius: 2px; }
.sl-thumb {
  width: 64px; height: 48px;
  object-fit: cover;
  border-radius: 6px;
  cursor: pointer;
  flex-shrink: 0;
  border: 2px solid transparent;
  opacity: .55;
  transition: all .2s;
  pointer-events: auto !important;
}
.sl-thumb:hover { opacity: .85; }
.sl-thumb.active {
  border-color: var(--pl);
  opacity: 1;
  box-shadow: 0 0 10px rgba(124,58,237,.6);
}

/* download button */
#downloadImageBtn {
  display: none;
  align-items: center;
  gap: 7px;
  background: linear-gradient(135deg, var(--pd), var(--pl));
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  padding: 9px 24px;
  border-radius: 25px;
  border: none;
  cursor: pointer;
  margin: 10px auto;
  flex-shrink: 0;
  transition: all .2s;
  box-shadow: 0 4px 14px rgba(91,33,182,.35);
}
#downloadImageBtn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(91,33,182,.5);
}
#downloadImageBtn::before {
  content: '\f019';
  font-family: FontAwesome;
}

/* sl-footer wrapper */
.sl-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 20px 12px;
  background: rgba(59,7,100,.4);
  flex-shrink: 0;
}

/* ── PRINT BLOCK ── */
@media print { body { display:none !important; } }

/* ── USER SELECT / DRAG DISABLE ── */
.question-card-images img,
.image-slider-modal-content img {
  -webkit-user-drag: none;
}
