/* ==========================================================================
   Instagram Reels Interactive Showcase Component
   ========================================================================== */

.ig-feed-section {
  position: relative;
  padding: clamp(60px, 8vw, 100px) 0;
  background: var(--paper, #090c12);
  overflow: hidden;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.ig-feed-header {
  text-align: center;
  margin-bottom: clamp(2rem, 4vw, 3rem);
  padding: 0 20px;
}

.ig-feed-title {
  font-family: var(--f-display, 'Outfit', sans-serif);
  font-size: clamp(1.85rem, 3.8vw, 2.75rem);
  font-weight: 700;
  color: var(--fg, #f1f4f8);
  margin: 0 0 1.25rem 0;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

[data-theme="light"] .ig-feed-title {
  color: var(--ink, #07090e);
}

.ig-follow-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--orange, #f26a1d);
  color: #07090e !important;
  font-family: var(--f-body, 'Plus Jakarta Sans', sans-serif);
  font-size: 0.9rem;
  font-weight: 700;
  padding: 9px 24px;
  border-radius: 9999px;
  text-decoration: none;
  box-shadow: 0 4px 16px rgba(242, 106, 29, 0.35);
  transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.ig-follow-btn:hover {
  background: #ff8645;
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(242, 106, 29, 0.55);
  color: #07090e !important;
}

.ig-follow-btn svg {
  transition: transform 0.2s ease;
}

.ig-follow-btn:hover svg {
  transform: translateX(4px);
}

/* Track & Carousel */
.ig-carousel-wrapper {
  position: relative;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 30px;
}

.ig-cards-track {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  padding: 12px 6px 24px 6px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.ig-cards-track::-webkit-scrollbar {
  display: none;
}

/* Card Styling */
.ig-reel-card {
  flex: 0 0 260px;
  width: 260px;
  height: 460px;
  border-radius: 20px;
  overflow: hidden;
  position: relative;
  background: #0d1118;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.35s ease, border-color 0.3s ease;
  scroll-snap-align: start;
  cursor: pointer;
  user-select: none;
}

@media (min-width: 1400px) {
  .ig-reel-card {
    flex: 0 0 calc(16.666% - 14px);
    width: calc(16.666% - 14px);
    min-width: 230px;
    height: 480px;
  }
}

[data-theme="light"] .ig-reel-card {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.1);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
}

.ig-reel-card:not(.playing):hover {
  transform: translateY(-6px);
  border-color: rgba(242, 106, 29, 0.5);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.55), 0 0 20px rgba(242, 106, 29, 0.15);
}

.ig-reel-card.playing {
  cursor: default;
  border-color: rgba(242, 106, 29, 0.6);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.6);
}

.ig-card-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.ig-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
  display: block;
}

.ig-reel-card:not(.playing):hover .ig-card-media img {
  transform: scale(1.06);
}

/* Top Overlays */
.ig-card-top {
  position: absolute;
  top: 14px;
  left: 14px;
  right: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 3;
  pointer-events: none;
}

.ig-stats-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--f-mono, monospace);
  font-size: 0.74rem;
  font-weight: 600;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 4px 10px;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.ig-stat-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.ig-brand-badge {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 0.85rem;
}

/* Center Play Button */
.ig-card-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 3;
  pointer-events: none;
}

.ig-play-circle {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1.5px solid rgba(255, 255, 255, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  transition: all 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.ig-play-circle svg {
  width: 20px;
  height: 20px;
  margin-left: 3px;
  fill: currentColor;
}

.ig-reel-card:hover .ig-play-circle {
  background: var(--orange, #f26a1d);
  border-color: #ff8838;
  transform: scale(1.15);
  box-shadow: 0 10px 30px rgba(242, 106, 29, 0.6);
}

.ig-reel-iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background: #000;
}

/* Hide any bottom captions */
.ig-card-bottom {
  display: none !important;
}

/* Navigation Arrow Controls */
.ig-nav-ctrl {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  border: none;
  color: #11151e;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  cursor: pointer;
  z-index: 10;
  transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.ig-nav-ctrl.prev {
  left: 6px;
}

.ig-nav-ctrl.next {
  right: 6px;
}

.ig-nav-ctrl:hover {
  background: #ffffff;
  transform: translateY(-50%) scale(1.12);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
  color: var(--orange, #f26a1d);
}

.ig-nav-ctrl svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

@media (max-width: 768px) {
  .ig-carousel-wrapper {
    padding: 0 16px;
  }
  .ig-nav-ctrl {
    display: none;
  }
  .ig-reel-card {
    flex: 0 0 240px;
    width: 240px;
    height: 420px;
  }
}
