/* ==========================================================================
   TMU INSTAGRAM REELS 3D SHOWCASE - STYLESHEET
   Sleek dark-mode 3D carousel with realistic smartphone frame & interactive navigation
   ========================================================================== */

:root {
  --tmu-gold: #ffc107;
  --tmu-gold-glow: rgba(255, 193, 7, 0.4);
  --tmu-dark-bg: #002147;
  --tmu-card-bg: #001733;
  --tmu-border-subtle: rgba(255, 255, 255, 0.12);
  --tmu-text-primary: #ffffff;
  --tmu-text-secondary: #9ca3af;
}

/* Page Container */
.tmu-reels-page {
  background-color: var(--tmu-dark-bg);
  color: var(--tmu-text-primary);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  padding-bottom: 60px;
}

.tmu-reels-page.tmu-reels-embedded {
  min-height: auto;
  padding-top: 30px;
  padding-bottom: 32px;
  background-color: #001a38;
}

.tmu-reels-page.tmu-reels-embedded .tmu-reels-hero {
  padding: 10px 20px 8px;
}

.tmu-reels-page.tmu-reels-embedded .tmu-reels-hero-title {
  margin-bottom: 12px;
}

.tmu-reels-page.tmu-reels-embedded .tmu-reels-cta-bar {
  margin-bottom: 6px;
}

/* Background Ambient Lighting */
.tmu-reels-ambient {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.tmu-reels-ambient .glow-top {
  position: absolute;
  top: -120px;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 480px;
  background: radial-gradient(ellipse at center, rgba(255, 193, 7, 0.14) 0%, rgba(234, 179, 8, 0.04) 45%, transparent 70%);
  filter: blur(70px);
}

.tmu-reels-ambient .glow-center {
  position: absolute;
  top: 520px;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 950px;
  height: 650px;
  background: radial-gradient(ellipse at center, rgba(59, 130, 246, 0.07) 0%, rgba(139, 92, 246, 0.05) 50%, transparent 75%);
  filter: blur(90px);
}

/* ==========================================================================
   HERO HEADER
   ========================================================================== */

.tmu-reels-hero {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 50px 20px 20px;
}

.tmu-reels-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 193, 7, 0.08);
  border: 1px solid rgba(255, 193, 7, 0.3);
  border-radius: 50px;
  padding: 6px 20px;
  color: var(--tmu-gold);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 16px;
  backdrop-filter: blur(10px);
}

.tmu-reels-hero-title {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 10px;
  color: #fff;
  line-height: 1.15;
}

.tmu-reels-hero-title span {
  background: linear-gradient(135deg, #ffc107 0%, #ff9800 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.tmu-reels-hero-desc {
  max-width: 660px;
  margin: 0 auto 20px;
  font-size: 14.5px;
  color: var(--tmu-text-secondary);
  line-height: 1.6;
}

.tmu-reels-cta-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}

.tmu-insta-btn {
  align-items: center;
  gap: 8px;
  background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
  color: #fff !important;
  font-size: 13.5px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 50px;
  text-decoration: none;
  box-shadow: 0 4px 18px rgba(220, 39, 67, 0.35);
  transition: all 0.3s ease;
}

.tmu-insta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(220, 39, 67, 0.5);
  color: #fff;
}

.tmu-view-all-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #ffffff !important;
  font-size: 13.5px;
  font-weight: 600;
  padding: 9px 22px;
  border-radius: 50px;
  text-decoration: none;
  backdrop-filter: blur(10px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.tmu-view-all-btn:hover {
  background: rgba(255, 193, 7, 0.15);
  border-color: var(--tmu-gold);
  color: var(--tmu-gold) !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 193, 7, 0.25);
}

.tmu-hero-stat {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--tmu-text-secondary);
}

/* Category Filter Pills */
.tmu-reels-filters {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 0 16px;
  margin-bottom: 25px;
  position: relative;
  z-index: 2;
}

.tmu-filter-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #d1d5db;
  padding: 7px 16px;
  border-radius: 30px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
  outline: none;
}

.tmu-filter-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.tmu-filter-btn.active {
  background: var(--tmu-gold);
  color: #000;
  border-color: var(--tmu-gold);
  box-shadow: 0 0 14px rgba(255, 193, 7, 0.4);
}

/* ==========================================================================
   3D CAROUSEL SECTION
   ========================================================================== */

.tmu-reels-showcase-section {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 12px 10px 10px;
  overflow: hidden;
  user-select: none;
}

/* 3D Perspective Stage */
.tmu-3d-stage {
  position: relative;
  width: 100%;
  height: 520px;
  perspective: 1200px;
  perspective-origin: 50% 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 8px;
}

.tmu-3d-track {
  position: relative;
  width: 300px;
  height: 484px;
  transform-style: preserve-3d;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* ==========================================================================
   REALISTIC SMARTPHONE FRAME (CENTER ACTIVE TILE USING mobile.B__Dul3C.webp)
   True aspect ratio 1080:1742 (300px x 484px) to prevent horizontal shrink
   ========================================================================== */

.tmu-phone-frame {
  position: absolute;
  top: 0;
  left: 0;
  width: 300px;
  height: 484px;
  z-index: 10;
  transform: translate3d(0, 0, 18px) scale(1.05);
  transition: transform 0.4s ease;
  cursor: pointer;
  border-radius: 40px;
  background: transparent;
}

/* Inner Screen Cutout Area - Seamless gapless fit behind phone bezel */
.tmu-phone-screen {
  position: absolute;
  top: 2.2%;
  left: 14.2%;
  right: 14.2%;
  bottom: 4.2%;
  background: #000;
  border-radius: 40px;
  overflow: hidden;
  z-index: 5;
}

/* Video inside phone screen — clean fullscreen presentation with seamless fit */
.tmu-phone-screen video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: #000;
  border-radius: 38px;
  transform: scale(1.02);
}

/* Transparent Phone Graphic Overlay (mobile.B__Dul3C.webp) - Natural Fit */
.tmu-phone-overlay-graphic {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  z-index: 15;
}

/* Top-Right Audio Mute/Unmute Button */
.tmu-audio-btn {
  position: absolute;
  top: 22px;
  right: 25px;
  width: 35px;
  height: 35px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.65);
  border: 1.5px solid rgba(255, 193, 7, 0.6);
  color: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  z-index: 20;
  backdrop-filter: blur(8px);
  transition: all 0.25s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  outline: none;
}

.tmu-audio-btn:hover {
  background: var(--tmu-gold);
  color: #000;
  border-color: var(--tmu-gold);
  transform: scale(1.1);
  box-shadow: 0 0 16px rgba(255, 193, 7, 0.6);
}

.tmu-audio-btn i {
  font-size: 13px;
}

/* ==========================================================================
   FLANKING CARDS (LEFT & RIGHT)
   ========================================================================== */

.tmu-reel-card {
  position: absolute;
  top: 26px;
  left: 42px;
  width: 216px;
  height: 432px;
  border-radius: 24px;
  background: #000;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1),
              opacity 0.6s cubic-bezier(0.23, 1, 0.32, 1),
              box-shadow 0.6s cubic-bezier(0.23, 1, 0.32, 1),
              filter 0.6s cubic-bezier(0.23, 1, 0.32, 1);
  will-change: transform, opacity;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
}

/* The slot-0 card in the list is hidden because .tmu-phone-frame represents the center */
.tmu-reel-card.slot-0 {
  display: none !important;
}

/* Image & Media Layers */
.tmu-reel-media {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
}

.tmu-reel-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Dark Gradient Overlays on Flanking Cards */
.tmu-reel-gradient {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.65) 0%, rgba(0, 0, 0, 0.1) 40%, rgba(0, 0, 0, 0.2) 60%, rgba(0, 0, 0, 0.8) 100%);
  pointer-events: none;
  z-index: 2;
}

/* Card Header: Title & Subtitle */
.tmu-reel-card-header {
  position: absolute;
  top: 20px;
  left: 18px;
  right: 18px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  z-index: 3;
  pointer-events: none;
}

.tmu-reel-title-box {
  max-width: 80%;
}

.tmu-reel-card-title {
  font-size: 14.5px;
  font-weight: 700;
  color: #fff;
  line-height: 1.25;
  margin: 0 0 3px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tmu-reel-card-subtitle {
  font-size: 11px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.75);
  margin: 0;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
}

.tmu-reel-logo-watermark {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  padding: 2px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  flex-shrink: 0;
}

.tmu-reel-logo-watermark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 50%;
}

/* Center Play Button for Side/Flanking Cards */
.tmu-reel-play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  z-index: 4;
  transition: transform 0.25s ease, background 0.25s ease;
  pointer-events: none;
}

.tmu-reel-play-btn i {
  color: #0f172a;
  font-size: 20px;
  margin-left: 3px;
}

/* Card Bottom Badge */
.tmu-reel-card-footer {
  position: absolute;
  bottom: 22px;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 3;
  pointer-events: none;
}

.tmu-reel-category-pill {
  background: rgba(0, 0, 0, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.5px;
  padding: 7px 20px;
  border-radius: 50px;
  text-transform: uppercase;
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.6);
}

/* ==========================================================================
   3D SLOTS (5 TILES DISPLAY AT ONCE)
   ========================================================================== */

/* Immediate Left (Slot -1) */
.tmu-reel-card.slot-neg-1 {
  transform: translate3d(calc(-100% - 24px), 0, -40px) rotateY(16deg) scale(0.90);
  z-index: 8;
  opacity: 0.95;
  filter: brightness(0.85);
}

.tmu-reel-card.slot-neg-1:hover {
  filter: brightness(1);
  transform: translate3d(calc(-100% - 24px), 0, -20px) rotateY(12deg) scale(0.92);
}

/* Immediate Right (Slot 1) */
.tmu-reel-card.slot-pos-1 {
  transform: translate3d(calc(100% + 24px), 0, -40px) rotateY(-16deg) scale(0.90);
  z-index: 8;
  opacity: 0.95;
  filter: brightness(0.85);
}

.tmu-reel-card.slot-pos-1:hover {
  filter: brightness(1);
  transform: translate3d(calc(100% + 24px), 0, -20px) rotateY(-12deg) scale(0.92);
}

/* Far Left (Slot -2) */
.tmu-reel-card.slot-neg-2 {
  transform: translate3d(calc(-190% - 32px), 0, -110px) rotateY(26deg) scale(0.75);
  z-index: 6;
  opacity: 0.65;
  filter: brightness(0.65);
}

.tmu-reel-card.slot-neg-2:hover {
  opacity: 0.85;
  filter: brightness(0.85);
}

/* Far Right (Slot 2) */
.tmu-reel-card.slot-pos-2 {
  transform: translate3d(calc(190% + 32px), 0, -110px) rotateY(-26deg) scale(0.75);
  z-index: 6;
  opacity: 0.65;
  filter: brightness(0.65);
}

.tmu-reel-card.slot-pos-2:hover {
  opacity: 0.85;
  filter: brightness(0.85);
}

/* Hidden cards beyond visible 5 */
.tmu-reel-card.slot-hidden-left {
  transform: translate3d(calc(-280% - 50px), 0, -220px) rotateY(32deg) scale(0.5);
  z-index: 1;
  opacity: 0;
  pointer-events: none;
}

.tmu-reel-card.slot-hidden-right {
  transform: translate3d(calc(280% + 50px), 0, -220px) rotateY(-32deg) scale(0.5);
  z-index: 1;
  opacity: 0;
  pointer-events: none;
}

/* ==========================================================================
   NAVIGATION BAR & TIMELINE
   ========================================================================== */

.tmu-reels-nav-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  position: relative;
  z-index: 20;
  margin-top: 8px;
}

.tmu-reels-nav-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  max-width: 90vw;
}

/* Circular Arrow Buttons */
.tmu-nav-arrow {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1.5px solid rgba(255, 255, 255, 0.22);
  color: #f3f4f6;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  outline: none;
  transition: all 0.25s ease;
  backdrop-filter: blur(8px);
}

.tmu-nav-arrow:hover {
  background: rgba(255, 255, 255, 0.22);
  border-color: #fff;
  color: #fff;
  transform: scale(1.08);
}

.tmu-nav-arrow:active {
  transform: scale(0.96);
}

.tmu-nav-arrow i {
  font-size: 15px;
}

/* Dotted Timeline Track */
.tmu-timeline-track {
  display: none !important;
}

/* Counter Text: 01 / 08 */
.tmu-reels-counter {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 2px;
  color: #9ca3af;
  font-variant-numeric: tabular-nums;
  display: flex;
  align-items: center;
  gap: 4px;
}

.tmu-reels-counter .current-num {
  color: var(--tmu-gold);
}

/* ==========================================================================
   ALL REELS EXPLORER GRID SECTION
   ========================================================================== */

.tmu-reels-grid-section {
  position: relative;
  z-index: 2;
  max-width: 1280px;
  margin: 50px auto 30px;
  padding: 0 20px;
}

.tmu-section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 30px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 16px;
}

.tmu-section-title {
  font-size: 24px;
  font-weight: 800;
  color: #fff;
  margin: 0;
}

.tmu-section-title span {
  color: var(--tmu-gold);
}

.tmu-grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}

.tmu-grid-card {
  position: relative;
  aspect-ratio: 9 / 16;
  border-radius: 20px;
  overflow: hidden;
  background: #11131a;
  border: 1px solid var(--tmu-border-subtle);
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: block;
}

.tmu-grid-card:hover {
  transform: translateY(-6px);
  border-color: rgba(255, 193, 7, 0.5);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
}

.tmu-grid-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.tmu-grid-card:hover img {
  transform: scale(1.05);
}

.tmu-grid-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.2) 0%, transparent 40%, rgba(0, 0, 0, 0.85) 100%);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 14px;
  color: #fff;
  z-index: 3;
}

.tmu-grid-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.tmu-grid-badge {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  background: rgba(0, 0, 0, 0.7);
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.tmu-grid-play-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(5px);
  display: flex;
  justify-content: center;
  align-items: center;
  color: #fff;
  font-size: 14px;
}

.tmu-grid-bottom h4 {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
  margin: 0 0 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: #fff;
}

.tmu-grid-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: #9ca3af;
}

/* ==========================================================================
   RESPONSIVE DESIGN (MOBILE & TABLET ADJUSTMENTS)
   Preserving 0.62 (1080/1742) phone aspect ratio across all screen sizes
   ========================================================================== */

@media (max-width: 1200px) {
  .tmu-reels-showcase-section {
    padding: 12px 10px 8px;
  }
  .tmu-3d-stage {
    height: 460px;
  }
  .tmu-3d-track,
  .tmu-phone-frame {
    width: 265px;
    height: 428px;
  }
  .tmu-reel-card {
    width: 190px;
    height: 380px;
    top: 24px;
    left: 38px;
  }
  .tmu-reel-card.slot-neg-1 {
    transform: translate3d(calc(-100% - 18px), 0, -40px) rotateY(16deg) scale(0.88);
  }
  .tmu-reel-card.slot-pos-1 {
    transform: translate3d(calc(100% + 18px), 0, -40px) rotateY(-16deg) scale(0.88);
  }
  .tmu-reel-card.slot-neg-2 {
    transform: translate3d(calc(-185% - 22px), 0, -110px) rotateY(26deg) scale(0.72);
  }
  .tmu-reel-card.slot-pos-2 {
    transform: translate3d(calc(185% + 22px), 0, -110px) rotateY(-26deg) scale(0.72);
  }
}

@media (max-width: 860px) {
  .tmu-reels-hero {
    padding-top: 15px;
  }
  .tmu-reels-showcase-section {
    padding: 12px 10px 8px;
  }
  .tmu-3d-stage {
    height: 410px;
  }
  .tmu-3d-track,
  .tmu-phone-frame {
    width: 235px;
    height: 380px;
  }
  .tmu-reel-card {
    width: 170px;
    height: 340px;
    top: 20px;
    left: 32px;
  }
  .tmu-reel-card.slot-neg-1 {
    transform: translate3d(calc(-92% - 10px), 0, -40px) rotateY(14deg) scale(0.84);
    opacity: 0.85;
  }
  .tmu-reel-card.slot-pos-1 {
    transform: translate3d(calc(92% + 10px), 0, -40px) rotateY(-14deg) scale(0.84);
    opacity: 0.85;
  }
  .tmu-reel-card.slot-neg-2,
  .tmu-reel-card.slot-pos-2 {
    opacity: 0;
    pointer-events: none;
    transform: translate3d(0, 0, -200px) scale(0.5);
  }
}

@media (max-width: 480px) {
  .tmu-reels-showcase-section {
    padding: 10px 5px 8px;
  }
  .tmu-3d-stage {
    height: 370px;
  }
  .tmu-3d-track,
  .tmu-phone-frame {
    width: 210px;
    height: 340px;
  }
  .tmu-reel-card {
    width: 150px;
    height: 300px;
    top: 20px;
    left: 30px;
  }
  .tmu-timeline-track {
    max-width: 220px;
  }
}
