/* ==========================================================================
   Graduates' testimonials carousel (about page)
   Ported from the MBA landing page "آراء الخريجين" section.
   Every rule is scoped under .gv-section so it cannot clash with the theme.
   ========================================================================== */

.gv-section {
  --gv-title: #004B75;
  --gv-accent: #107E7D;
  --gv-text: #64748B;
  --gv-bg: #F4F8FB;
  --gv-border: #F1F5F9;
  --gv-card-width: 315px;

  scroll-margin-top: 80px;
  padding: 80px 0 40px;
  background-color: var(--gv-bg);
  position: relative;
  overflow: hidden;
}

/* ---------- Header ---------- */
.gv-section .gv-header {
  max-width: 1056px;
  margin: 0 auto;
  padding: 0 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.gv-section .gv-title {
  font-size: 36px;
  line-height: 40px;
  font-weight: 700;
  color: var(--gv-title);
  text-align: center;
  margin: 0 auto;
  display: block;
}

.gv-section .gv-title::after {
  content: '';
  display: block;
  width: 96px;
  height: 6px;
  border-radius: 9999px;
  background-color: var(--gv-accent);
  margin: 14px auto 16px;
}

.gv-section .gv-subtitle {
  font-size: 16px;
  line-height: 24px;
  font-weight: 400;
  color: var(--gv-text);
  text-align: center;
  margin: 0 auto;
  max-width: 472px;
  width: 100%;
}

/* ---------- Track ---------- */
.gv-section .gv-carousel {
  position: relative;
  width: 100%;
  max-width: 1440px;
  margin: 24px auto 0;
}

.gv-section .gv-track {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding: 4px 0 48px;
  scrollbar-width: none;
  -ms-overflow-style: none;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x pan-y;
}

.gv-section .gv-track::-webkit-scrollbar {
  display: none;
}

/* Centre the cards when they all fit, scroll normally when they overflow */
.gv-section .gv-track > .gv-card:first-child {
  margin-inline-start: auto;
}

.gv-section .gv-track > .gv-card:last-child {
  margin-inline-end: auto;
}

.gv-section .gv-track.is-dragging {
  cursor: grabbing;
  scroll-behavior: auto;
  scroll-snap-type: none;
  touch-action: none;
}

/* ---------- Cards ---------- */
.gv-section .gv-card {
  flex: 0 0 var(--gv-card-width);
  width: var(--gv-card-width);
  aspect-ratio: 9 / 16;
  border-radius: 24px;
  border: 1px solid var(--gv-border);
  overflow: hidden;
  position: relative;
  background-color: #0d131a;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.06), 0 4px 6px -4px rgba(0, 0, 0, 0.03);
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.3, 1), box-shadow 0.3s ease;
  cursor: grab;
  box-sizing: border-box;
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
}

.gv-section .gv-track.is-dragging .gv-card {
  cursor: grabbing;
  transition: none;
}

.gv-section .gv-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 30px rgba(0, 75, 117, 0.12);
}

.gv-section .gv-card iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
  display: block;
  z-index: 1;
  pointer-events: none;
}

.gv-section .gv-logo-card {
  background-color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}

.gv-section .gv-logo-card img {
  max-width: 190px;
  width: 80%;
  height: auto;
  object-fit: contain;
  pointer-events: none;
}

/* ---------- Sound button (top corner of each card) ---------- */
.gv-section .gv-sound-btn {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 15;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(11, 19, 32, 0.82);
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  color: #ffffff;
  cursor: pointer;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
  transition: all 0.2s ease;
  user-select: none;
}

.gv-section .gv-sound-btn:hover {
  background: rgba(11, 19, 32, 0.96);
  border-color: rgba(255, 255, 255, 0.65);
  transform: scale(1.08);
}

.gv-section .gv-sound-btn:active {
  transform: scale(0.95);
}

.gv-section .gv-sound-btn:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 3px;
}

.gv-section .gv-sound-btn.is-unmuted {
  background: #0d6e6e;
  border-color: #2dd4bf;
  box-shadow: 0 0 16px rgba(45, 212, 191, 0.6);
}

.gv-section .gv-sound-btn.is-unmuted:hover {
  background: #0f766e;
}

.gv-section .gv-sound-btn svg {
  pointer-events: none;
}

.gv-section .gv-sound-btn .gv-icon-unmuted,
.gv-section .gv-sound-btn.is-unmuted .gv-icon-muted {
  display: none;
}

.gv-section .gv-sound-btn.is-unmuted .gv-icon-unmuted {
  display: inline-flex;
}

/* ---------- Play / pause toggle (centre of each card) ---------- */
.gv-section .gv-play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 46px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.86);
  color: #ffffff;
  cursor: pointer;
  transform: translate(-50%, -50%);
  touch-action: manipulation;
}

.gv-section .gv-play-btn:hover,
.gv-section .gv-play-btn:focus-visible {
  background: rgba(0, 0, 0, 0.96);
}

.gv-section .gv-play-btn:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 3px;
}

.gv-section .gv-play-btn svg {
  width: 25px;
  height: 25px;
  fill: currentColor;
}

.gv-section .gv-play-btn .gv-icon-play,
.gv-section .gv-card.is-paused .gv-icon-pause {
  display: none;
}

.gv-section .gv-card.is-paused .gv-icon-play {
  display: block;
}

/* ---------- Desktop arrows ---------- */
.gv-section .gv-nav {
  width: 100%;
  max-width: 1056px;
  margin: 18px auto 0;
  padding: 0 20px;
  box-sizing: border-box;
}

.gv-section .gv-nav-inner {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid var(--gv-border);
  direction: ltr;
}

.gv-section .gv-nav-btn {
  width: 40px;
  height: 40px;
  border-radius: 9999px;
  border: none;
  padding: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  transition: all 0.25s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.gv-section .gv-nav-btn:focus-visible {
  outline: 2px solid var(--gv-title);
  outline-offset: 3px;
}

.gv-section .gv-nav-left {
  background-color: #004B75;
}

.gv-section .gv-nav-left:hover {
  background-color: #003656;
  transform: scale(1.08);
}

.gv-section .gv-nav-right {
  background-color: #107E7D;
}

.gv-section .gv-nav-right:hover {
  background-color: #0d6867;
  transform: scale(1.08);
}

/* ---------- Mobile dots ---------- */
.gv-section .gv-dots {
  display: none;
}

/* ---------- Tablet & mobile ---------- */
@media (max-width: 768px) {
  .gv-section {
    padding: 30px 0 22px;
  }

  .gv-section .gv-title {
    font-size: 1.95rem;
  }

  .gv-section .gv-subtitle {
    font-size: 0.98rem;
  }

  .gv-section .gv-header {
    margin-bottom: 16px;
  }

  .gv-section .gv-carousel {
    margin: 0 auto;
  }

  .gv-section .gv-track {
    gap: 16px;
    scroll-snap-type: x mandatory;
    padding: 4px 20px 36px;
  }

  .gv-section .gv-card {
    --gv-card-width: min(calc(100vw - 76px), 270px);
    max-width: 270px;
    scroll-snap-align: start;
  }

  .gv-section .gv-nav {
    display: none;
  }

  .gv-section .gv-dots {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 14px;
    direction: ltr;
  }

  .gv-section .gv-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background-color: #94A3B8;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: all 0.25s ease;
  }

  .gv-section .gv-dot.active {
    width: 18px;
    height: 6px;
    border-radius: 9999px;
    background-color: #004B75;
  }
}

@media (max-width: 576px) {
  .gv-section {
    padding: 30px 0 20px;
  }

  .gv-section .gv-title {
    font-size: 1.65rem;
  }

  .gv-section .gv-title::after {
    width: 64px;
    height: 5px;
    margin: 12px auto 20px;
  }

  .gv-section .gv-subtitle {
    font-size: 0.92rem;
    line-height: 1.6;
  }

  .gv-section .gv-track {
    padding-left: max(20px, calc((100% - min(calc(100vw - 76px), 270px)) / 2));
    padding-right: max(20px, calc((100% - min(calc(100vw - 76px), 270px)) / 2));
  }

  .gv-section .gv-card {
    scroll-snap-align: center;
  }

  .gv-section .gv-sound-btn {
    top: 10px;
    left: 10px;
    width: 32px;
    height: 32px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .gv-section .gv-track {
    scroll-behavior: auto;
  }

  .gv-section .gv-card,
  .gv-section .gv-sound-btn,
  .gv-section .gv-nav-btn {
    transition: none;
  }
}
