/* ============================================================
   Qalam Education Platform - All Reviews / Testimonials Page
   Scrapbook Visual Source of Truth (Exact Landing Page Design)
   ============================================================ */

/* ------------------------------------------------------------
   1. Base & Header Reset
   ------------------------------------------------------------ */
.reviews-page-body {
  background-color: #f7fafc;
  color: #1e293b;
  font-family: 'Cairo', 'Tajawal', system-ui, -apple-system, sans-serif;
  margin: 0;
  padding: 0;
  overflow-x: clip;
}

.accent-teal {
  color: #14b8ae;
}

.text-teal {
  color: #14b8ae !important;
}

.btn-teal-primary {
  background: #14b8ae;
  color: #ffffff;
  border: 1.5px solid #14b8ae;
  border-radius: 50px;
  font-weight: 700;
  transition: all 0.25s ease;
}

.btn-teal-primary:hover {
  background: #0d9488;
  border-color: #0d9488;
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(20, 184, 174, 0.25);
}

/* ------------------------------------------------------------
   2. Clean Brand Header (Matching Courses Catalog Exactly)
   ------------------------------------------------------------ */
.reviews-simple-header {
  background: linear-gradient(135deg, #092032 0%, #0c283c 50%, #123752 100%);
  color: #ffffff;
  padding-top: 120px;
  padding-bottom: 50px;
  position: relative;
  overflow: hidden;
  text-align: center;
}

.reviews-header-decor-circle {
  position: absolute;
  top: -50px;
  right: -30px;
  width: 250px;
  height: 250px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(20, 184, 174, 0.18) 0%, transparent 70%);
  pointer-events: none;
  z-index: 1;
}

.reviews-simple-title {
  font-size: clamp(1.85rem, 3.2vw, 2.35rem);
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 8px;
  line-height: 1.3;
}

.reviews-simple-breadcrumbs {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  flex-wrap: wrap;
}

.reviews-simple-breadcrumbs .home-icon {
  color: #14b8ae;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
}

.reviews-simple-breadcrumbs a {
  color: #14b8ae;
  text-decoration: none;
  transition: color 0.2s ease;
}

.reviews-simple-breadcrumbs a:hover {
  color: #2dd4bf;
}

.reviews-simple-breadcrumbs .sep {
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.82rem;
}

.reviews-simple-breadcrumbs .current {
  color: #e2e8f0;
  font-weight: 500;
}

/* ------------------------------------------------------------
   3. Filter Tabs Section (Floating Pill Bar)
   ------------------------------------------------------------ */
.reviews-filter-section {
  margin-top: -24px;
  position: relative;
  z-index: 15;
  margin-bottom: 16px;
}

.reviews-filter-card {
  width: fit-content;
  max-width: 100%;
  margin: 0 auto;
  padding: 6px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  box-shadow: 0 8px 26px rgba(15, 35, 55, 0.06);
  box-sizing: border-box;
}

.reviews-filter-scroll-wrap {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.reviews-filter-pills-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 50px;
  padding: 0;
}

.reviews-cat-btn {
  background: transparent;
  color: #475569;
  border: 1.5px solid transparent;
  padding: 9px 20px;
  border-radius: 50px;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  transition: all 0.22s ease;
  font-family: inherit;
}

.reviews-cat-btn:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.reviews-cat-btn.active {
  background: #14b8ae;
  color: #ffffff;
  border-color: #14b8ae;
  box-shadow: 0 4px 14px rgba(20, 184, 174, 0.35);
}

.reviews-cat-badge {
  background: rgba(0, 0, 0, 0.07);
  color: inherit;
  font-size: 0.78rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 50px;
  line-height: 1.2;
}

.reviews-cat-btn.active .reviews-cat-badge {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

/* ------------------------------------------------------------
   4. Reviews Board Section (Exact Landing Page Scrapbook Style)
   ------------------------------------------------------------ */
.reviews-board-section {
  position: relative;
  padding: 40px 0 95px;
  background: #f7fafc;
  overflow: hidden;
}

.testimonials-pattern {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(20, 184, 174, 0.12) 1.5px, transparent 1.5px);
  background-size: 28px 28px;
  opacity: 0.65;
  pointer-events: none;
}

/* Testimonials Grid (Desktop: 4 columns) */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 34px 24px;
  position: relative;
  z-index: 4;
  margin-top: 10px;
  padding-top: 14px;
}

/* Testimonial Scrapbook Card */
.testimonial-card {
  position: relative;
  background: transparent;
  border-radius: 16px;
  padding: 0;
  box-shadow: none;
  border: none;
  display: flex;
  flex-direction: column;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
  cursor: pointer;
}

.testimonial-card:hover {
  transform: translateY(-8px) scale(1.02) !important;
  z-index: 10;
}

/* Natural Rotations for Scrapbook Feel */
.testimonial-card.card-rot-1 {
  transform: rotate(-1.5deg);
}

.testimonial-card.card-rot-2 {
  transform: rotate(1.2deg);
}

.testimonial-card.card-rot-3 {
  transform: rotate(-1deg);
}

.testimonial-card.card-rot-4 {
  transform: rotate(1.8deg);
}

/* 3D Pushpins */
.pin-wrap {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 12;
  pointer-events: none;
}

.pushpin {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  position: relative;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.28), inset 0 -2px 5px rgba(0, 0, 0, 0.35), inset 0 2px 4px rgba(255, 255, 255, 0.85);
  cursor: default;
}

.pushpin::before {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 50%;
  width: 3px;
  height: 8px;
  background: rgba(0, 0, 0, 0.25);
  transform: translateX(-50%) rotate(20deg);
  border-radius: 2px;
}

.pushpin::after {
  content: '';
  position: absolute;
  top: 5px;
  left: 6px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  filter: blur(0.4px);
}

.pin-teal {
  background: radial-gradient(circle at 35% 30%, #3fe3d6 0%, #16a39a 55%, #0e635e 100%);
}

.pin-navy {
  background: radial-gradient(circle at 35% 30%, #34729e 0%, #15374e 55%, #0a1b27 100%);
}

.pin-pearl {
  background: radial-gradient(circle at 35% 30%, #ffffff 0%, #e2ecf0 55%, #9fb4be 100%);
}

.pin-coral {
  background: radial-gradient(circle at 35% 30%, #ff8a80 0%, #e11d48 55%, #881337 100%);
}

/* WhatsApp Screenshot Image Container */
.testimonial-img-box {
  position: relative;
  width: 100%;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(22, 163, 154, 0.16);
  background: transparent;
  box-shadow: 0 12px 28px rgba(21, 55, 78, 0.1), 0 3px 8px rgba(0, 0, 0, 0.04);
  margin-bottom: 0;
  transition: box-shadow 0.35s ease, border-color 0.35s ease;
}

.testimonial-card:hover .testimonial-img-box {
  box-shadow: 0 20px 45px rgba(22, 163, 154, 0.22), 0 6px 16px rgba(21, 55, 78, 0.08);
  border-color: rgba(22, 163, 154, 0.45);
}

.testimonial-img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
  transition: transform 0.35s ease;
}

.testimonial-card:hover .testimonial-img {
  transform: scale(1.02);
}

/* ------------------------------------------------------------
   5. Call to Action (CTA) Section (Matching Landing Page)
   ------------------------------------------------------------ */
.cta-section {
  padding: 85px 0 60px 0;
  text-align: center;
  background: linear-gradient(180deg, #ffffff 0%, #f0fbf9 55%, #e6f7f5 100%);
  position: relative;
}

.cta-title {
  font-size: clamp(1.8rem, 3.2vw, 2.6rem);
  font-weight: 900;
  color: #0c283c;
  line-height: 1.35;
  margin-bottom: 18px;
}

.cta-subtitle {
  font-size: clamp(1rem, 1.5vw, 1.18rem);
  color: #475569;
  max-width: 650px;
  margin: 0 auto 34px auto;
  line-height: 1.8;
}

.cta-btn-group {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
}

.btn-cta-green {
  background: linear-gradient(135deg, #1ec7bb 0%, #16a39a 50%, #118078 100%);
  color: #ffffff;
  font-size: 1.05rem;
  font-weight: 800;
  padding: 14px 38px;
  border-radius: 50px;
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  box-shadow: 0 8px 25px rgba(22, 163, 154, 0.35);
  transition: all 0.25s ease;
}

.btn-cta-green:hover {
  background: linear-gradient(135deg, #25d3c5 0%, #19b5aa 50%, #0d5c56 100%);
  color: #ffffff;
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(22, 163, 154, 0.45);
}

.btn-cta-dark {
  background: #15374e;
  color: #ffffff;
  font-size: 1.05rem;
  font-weight: 700;
  padding: 14px 36px;
  border-radius: 50px;
  border: 2px solid #16a39a;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  box-shadow: 0 8px 25px rgba(21, 55, 78, 0.2);
  transition: all 0.25s ease;
}

.btn-cta-dark:hover {
  background: #16a39a;
  border-color: #16a39a;
  color: #ffffff;
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(22, 163, 154, 0.4);
}

/* ------------------------------------------------------------
   6. Lightbox Modal for Screenshots (Significantly Enlarged)
   ------------------------------------------------------------ */
.reviews-lightbox-modal {
  position: fixed;
  inset: 0;
  z-index: 1050;
  background: rgba(8, 20, 30, 0.93);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 30px 20px;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.reviews-lightbox-modal.active {
  display: flex;
  opacity: 1;
}

.lightbox-dialog {
  background: transparent;
  max-width: 900px; /* Greatly enlarged for maximum legibility */
  width: 95vw;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: lightboxScaleIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes lightboxScaleIn {
  from {
    transform: scale(0.92);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.lightbox-close-btn {
  position: absolute;
  top: -50px;
  left: 0;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 1.25rem;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 10;
}

.lightbox-close-btn:hover {
  background: #ef4444;
  border-color: #ef4444;
  color: #ffffff;
  transform: scale(1.1);
}

.lightbox-body {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-img {
  max-width: 100%;
  width: auto;
  max-height: 88vh; /* Large height allocation */
  min-width: 280px;
  border-radius: 18px;
  object-fit: contain;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.7);
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  background: #0f172a;
}

/* ------------------------------------------------------------
   7. Responsive Adjustments (Matching Landing Page Exactly)
   ------------------------------------------------------------ */

/* Screens < 1200px (Tablet Landscape & small laptops) */
@media (max-width: 1199px) {
  .testimonials-grid {
    grid-template-columns: repeat(2, 1fr);
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
    gap: 30px;
  }
}

/* Screens < 768px (Mobile & Small Tablets) */
@media (max-width: 767.98px) {
  .reviews-simple-header {
    padding: 95px 0 40px;
  }

  .reviews-filter-section {
    margin-top: 14px;
    margin-bottom: 12px;
  }

  .reviews-filter-card {
    width: 100%;
    padding: 10px;
    border-radius: 16px;
  }

  .reviews-filter-scroll-wrap {
    width: 100%;
    display: flex;
    justify-content: flex-start;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    padding: 2px 2px 8px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .reviews-filter-scroll-wrap::-webkit-scrollbar {
    display: none;
  }

  .reviews-filter-pills-wrap {
    display: inline-flex;
    flex-shrink: 0;
    justify-content: flex-start;
    padding: 0;
    gap: 6px;
    overflow: visible;
  }

  .reviews-cat-btn {
    padding: 7px 13px;
    font-size: 0.8rem;
    gap: 6px;
  }

  .reviews-cat-badge {
    padding: 2px 7px;
    font-size: 0.72rem;
  }

  .reviews-board-section {
    padding: 30px 0 65px;
  }

  .testimonials-grid {
    grid-template-columns: repeat(2, 1fr);
    max-width: 580px;
    margin: 10px auto 0;
    gap: 24px 16px;
    padding-top: 14px;
  }

  /* Reset rotation on mobile to guarantee zero horizontal overflow */
  .testimonial-card {
    transform: none !important;
  }

  .testimonial-card:hover {
    transform: translateY(-4px) !important;
  }

  .pushpin {
    width: 24px;
    height: 24px;
  }

  .pin-wrap {
    top: -12px;
  }

  .cta-section {
    padding: 60px 0 50px;
  }

  .cta-btn-group {
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    gap: clamp(6px, 2vw, 12px);
    width: 100%;
    max-width: 440px;
    margin-left: auto;
    margin-right: auto;
  }

  .btn-cta-green,
  .btn-cta-dark {
    flex: 1 1 0;
    min-width: 0;
    padding: 12px clamp(6px, 2.5vw, 16px);
    font-size: clamp(0.78rem, 2.8vw, 0.92rem);
    gap: clamp(5px, 1.8vw, 8px);
    justify-content: center;
    white-space: nowrap;
    text-align: center;
  }

  .btn-cta-green i,
  .btn-cta-dark i {
    font-size: clamp(0.95rem, 3.2vw, 1.15rem);
    flex-shrink: 0;
  }

  .lightbox-dialog {
    max-width: 95vw;
  }

  .lightbox-close-btn {
    top: -42px;
    width: 36px;
    height: 36px;
    font-size: 1.1rem;
  }
}

/* Small Screens < 480px */
@media (max-width: 480px) {
  .testimonials-grid {
    gap: 20px 12px;
  }

  .pushpin {
    width: 22px;
    height: 22px;
  }

  .pin-wrap {
    top: -11px;
  }
}
