/* ===== Reels Grid Testimonials (reelup.io style) ===== */
.reels-section {
  padding: 80px 0 60px;
  background: #2b4a7b;
  overflow: hidden;
  position: relative;
}

/* Header */
.reels-section .section_header {
  text-align: center;
  margin-bottom: 48px;
}

.reels-section .section_header .title {
  color: #fff;
  font-size: 36px;
}

.reels-section .section_header .highlight {
  color: #FFC631;
}

.reels-subtitle {
  color: rgba(255,255,255,0.6);
  font-family: 'Roboto', sans-serif;
  font-size: 16px;
  margin-top: 10px;
}

/* Viewport wrapper for scroll + nav */
.reels-viewport {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 56px;
}

/* Scrollable track — shows multiple cards */
.reels-track {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding: 10px 0 20px;
  scrollbar-width: none;
}

.reels-track::-webkit-scrollbar {
  display: none;
}

/* Single Reel Card — portrait 9:16 */
.reel-card {
  position: relative;
  min-width: 260px;
  width: 260px;
  aspect-ratio: 9 / 16;
  border-radius: 18px;
  overflow: hidden;
  flex-shrink: 0;
  cursor: pointer;
  scroll-snap-align: start;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
  box-shadow: 0 6px 24px rgba(0,0,0,0.35);
}

.reel-card:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 12px 40px rgba(0,0,0,0.45), 0 0 20px rgba(255,198,49,0.08);
}

/* Background image */
.reel-bg {
  position: absolute;
  inset: 0;
  z-index: 1;
  background-size: cover;
  background-position: center;
  transition: transform 8s ease;
}

.reel-card:hover .reel-bg,
.reel-card.playing .reel-bg {
  transform: scale(1.1);
}

/* Dark gradient overlay */
.reel-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(
    180deg,
    rgba(0,0,0,0.05) 0%,
    rgba(0,0,0,0.08) 40%,
    rgba(0,0,0,0.72) 100%
  );
  transition: background 0.3s ease;
}

.reel-card:hover .reel-overlay {
  background: linear-gradient(
    180deg,
    rgba(0,0,0,0.02) 0%,
    rgba(0,0,0,0.05) 40%,
    rgba(0,0,0,0.65) 100%
  );
}

/* Progress bar at top */
.reel-progress {
  position: absolute;
  top: 10px;
  left: 12px;
  right: 12px;
  height: 3px;
  background: rgba(255,255,255,0.2);
  border-radius: 3px;
  z-index: 5;
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.reel-card.playing .reel-progress {
  opacity: 1;
}

.reel-progress-bar {
  height: 100%;
  background: #FFC631;
  border-radius: 3px;
  width: 0%;
}

.reel-card.playing .reel-progress-bar {
  animation: reelProgress 6s linear forwards;
}

.reel-card.paused .reel-progress-bar {
  animation-play-state: paused;
}

@keyframes reelProgress {
  from { width: 0%; }
  to   { width: 100%; }
}

/* Pause icon (center of card) */
.reel-pause-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  z-index: 6;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 16px;
  letter-spacing: 2px;
  pointer-events: none;
  opacity: 0;
  transition: transform 0.3s cubic-bezier(0.34,1.56,0.64,1), opacity 0.3s ease;
}

.reel-card.paused .reel-pause-icon {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
}

/* Content — quote + author */
.reel-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 22px 18px;
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.reel-quote {
  font-family: 'Roboto', sans-serif;
  font-size: 14px;
  font-style: italic;
  line-height: 1.55;
  color: rgba(255,255,255,0.92);
  text-shadow: 0 1px 4px rgba(0,0,0,0.5);
}

.reel-author {
  display: flex;
  align-items: center;
  gap: 10px;
}

.reel-author-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, #FFC631, #e6a800);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Archivo', sans-serif;
  font-weight: 700;
  font-size: 13px;
  color: #fff;
  flex-shrink: 0;
}

.reel-author-name {
  font-family: 'Archivo', sans-serif;
  font-weight: 700;
  font-size: 14px;
  color: #fff;
  text-shadow: 0 1px 4px rgba(0,0,0,0.4);
}

/* Navigation arrows */
.reels-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 20;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.25s, transform 0.25s, opacity 0.25s;
  padding: 0;
  opacity: 0.8;
}

.reels-nav:hover {
  background: rgba(255,198,49,0.2);
  transform: translateY(-50%) scale(1.1);
  opacity: 1;
}

.reels-nav.prev { left: 4px; }
.reels-nav.next { right: 4px; }

.reels-nav.hidden {
  opacity: 0;
  pointer-events: none;
}

/* ===== Responsive — Tablet landscape ===== */
@media (max-width: 1100px) {
  .reels-viewport {
    padding: 0 48px;
  }
  .reel-card {
    min-width: 230px;
    width: 230px;
  }
  .reels-track { gap: 16px; }
}

/* ===== Responsive — Tablet portrait ===== */
@media (max-width: 768px) {
  .reels-section {
    padding: 60px 0 48px;
  }
  .reels-section .section_header {
    margin-bottom: 36px;
  }
  .reels-section .section_header .title {
    font-size: 28px;
  }
  .reels-subtitle { font-size: 14px; }
  .reels-viewport { padding: 0 44px; }
  .reel-card {
    min-width: 200px;
    width: 200px;
    border-radius: 14px;
  }
  .reels-track { gap: 14px; }
  .reel-quote { font-size: 13px; }
  .reel-author-name { font-size: 13px; }
  .reel-author-avatar { width: 30px; height: 30px; font-size: 12px; }
  .reel-content { padding: 16px 14px; gap: 8px; }
  .reels-nav { width: 38px; height: 38px; font-size: 16px; }
  .reels-nav.prev { left: 2px; }
  .reels-nav.next { right: 2px; }
}

/* ===== Responsive — Mobile ===== */
@media (max-width: 480px) {
  .reels-section {
    padding: 48px 0 36px;
  }
  .reels-section .section_header {
    margin-bottom: 24px;
  }
  .reels-section .section_header .title {
    font-size: 22px;
  }
  .reels-subtitle { font-size: 13px; }
  .reels-viewport { padding: 0 12px; }
  .reel-card {
    min-width: 170px;
    width: 170px;
    border-radius: 12px;
  }
  .reels-track { gap: 12px; padding: 6px 0 14px; }
  .reel-quote { font-size: 12px; line-height: 1.45; }
  .reel-author-name { font-size: 12px; }
  .reel-author-avatar { width: 26px; height: 26px; font-size: 10px; }
  .reel-content { padding: 12px 10px; gap: 6px; }
  .reel-progress { top: 8px; left: 8px; right: 8px; height: 2px; }
  .reel-pause-icon { width: 40px; height: 40px; font-size: 13px; }
  .reels-nav { width: 34px; height: 34px; font-size: 14px; }
  .reels-nav.prev { left: 0; }
  .reels-nav.next { right: 0; }
}

/* ===== Responsive — Very small phones ===== */
@media (max-width: 360px) {
  .reels-section { padding: 36px 0 28px; }
  .reels-section .section_header .title { font-size: 20px; }
  .reels-viewport { padding: 0 8px; }
  .reel-card {
    min-width: 150px;
    width: 150px;
    border-radius: 10px;
  }
  .reels-track { gap: 10px; }
  .reel-quote { font-size: 11px; }
  .reel-content { padding: 10px 8px; }
  .reels-nav { display: none; }
}
