/* ==========================================================
   Yüksel Garage — Ana Sayfa | Instagram Reels tam ekran görüntüleyici
   ========================================================== */

/* Instagram Desktop/Mobile Reels Modal Styles */
.insta-reels-modal {
  position: fixed;
  inset: 0;
  z-index: 9999999;
  background: #000000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  touch-action: none;
  overscroll-behavior: contain;
}
.insta-reels-modal.active {
  opacity: 1;
  pointer-events: auto;
}
.insta-close-btn {
  position: fixed;
  top: 24px;
  right: 32px;
  background: transparent;
  border: none;
  color: #ffffff;
  cursor: pointer;
  z-index: 1000;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.2s, transform 0.2s;
}
.insta-close-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: scale(1.1);
}
.insta-reels-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  height: 92vh;
  max-height: 860px;
  touch-action: none;
}
.insta-reel-viewport {
  position: relative;
  height: 100%;
  aspect-ratio: 9 / 16;
  border-radius: 16px;
  overflow: hidden;
  background: #000000;
  box-shadow: 0 10px 45px rgba(0, 0, 0, 0.9);
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}
/* Underlying Slide (Next/Prev peek layer - True Instagram Reels Dual Layer) */
.insta-under-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: none;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  z-index: 2;
  background: #000000;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
  will-change: transform;
}
.insta-under-dim {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 4;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.insta-reel-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  will-change: transform;
  z-index: 3;
  background: #000000;
}
/* Silik / Gri Dimmer overlay while dragging active reel */
.insta-drag-dim {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 5;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease;
}
.insta-slide-bg {
  position: absolute;
  inset: -15px;
  width: calc(100% + 30px);
  height: calc(100% + 30px);
  object-fit: cover;
  filter: blur(28px) brightness(0.35);
  z-index: 1;
  pointer-events: none;
  touch-action: none;
}
.insta-slide-media {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  touch-action: none;
  pointer-events: auto;
}
/* Bottom Left Profile & Caption */
.insta-caption-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 70px;
  z-index: 15;
  padding: 20px 16px 24px 16px;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.5) 65%, transparent 100%);
  pointer-events: auto;
}
.insta-profile-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.insta-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
  padding: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.insta-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: #111;
  padding: 2px;
}
.insta-username {
  color: #ffffff;
  font-size: 0.88rem;
  font-weight: 700;
}
.insta-follow-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 6px;
  margin-left: 6px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.15s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1.2;
}
.insta-follow-btn:hover {
  background: #ffffff;
  color: #000000;
  border-color: #ffffff;
}
.insta-follow-btn:active {
  transform: scale(0.92);
}
.insta-caption-text {
  color: #ffffff;
  font-size: 0.82rem;
  line-height: 1.4;
  margin: 0 0 6px 0;
  text-shadow: 0 1px 4px rgba(0,0,0,0.8);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.insta-audio-row {
  display: flex;
  align-items: center;
  gap: 6px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.72rem;
}
.insta-sound-pill {
  position: absolute;
  bottom: 20px;
  right: 16px;
  z-index: 20;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}
.insta-sound-pill:hover {
  background: #e10600;
  border-color: #e10600;
  transform: scale(1.1);
}

/* Right-Side Vertical Action Column */
.insta-side-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  user-select: none;
}
.insta-chevron-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
  margin-bottom: 6px;
}
.insta-chevron-btn.down {
  margin-top: 6px;
  margin-bottom: 0;
}
.insta-chevron-btn:hover {
  background: #e10600;
  border-color: #e10600;
  transform: scale(1.12);
}
.insta-action-btn {
  background: transparent;
  border: none;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  transition: transform 0.2s;
  text-decoration: none;
  user-select: none;
  -webkit-user-select: none;
}
.insta-action-btn:hover {
  transform: scale(1.15);
}
.insta-action-btn.passive,
.insta-audio-cover.passive {
  pointer-events: none;
  cursor: default;
}
.insta-action-btn.passive:hover {
  transform: none;
}
.insta-action-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.insta-action-count {
  font-size: 0.72rem;
  font-weight: 700;
  color: #ffffff;
}
.insta-action-btn.liked svg {
  fill: #e10600;
  stroke: #e10600;
  animation: heartPop 0.32s cubic-bezier(0.17, 0.89, 0.32, 1.49);
}
@keyframes heartPop {
  0% { transform: scale(1); }
  50% { transform: scale(1.35); }
  100% { transform: scale(1); }
}
.insta-audio-cover {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: #111;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: spinVinyl 6s linear infinite;
}
@keyframes spinVinyl {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Slide Transition Animations (True Instagram Reels Fluid Vertical Motion - Fixed Dimensions) */
@keyframes reelSlideUpIn {
  0% {
    transform: translate3d(0, 100%, 0);
    opacity: 0.85;
  }
  100% {
    transform: translate3d(0, 0, 0);
    opacity: 1;
  }
}

@keyframes reelSlideDownIn {
  0% {
    transform: translate3d(0, -100%, 0);
    opacity: 0.85;
  }
  100% {
    transform: translate3d(0, 0, 0);
    opacity: 1;
  }
}

.slide-up-in {
  animation: reelSlideUpIn 0.38s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.slide-down-in {
  animation: reelSlideDownIn 0.38s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.slide-up-in .insta-caption-overlay,
.slide-down-in .insta-caption-overlay {
  animation: reelCaptionFadeIn 0.35s ease forwards;
}
@keyframes reelCaptionFadeIn {
  0% { opacity: 0; transform: translateY(14px); }
  100% { opacity: 1; transform: translateY(0); }
}

@media (max-width: 1200px) {
  .workshop-reel-track {
    grid-template-rows: repeat(2, 210px);
    grid-auto-columns: calc((100% - 2 * 20px) / 3);
    gap: 20px;
  }
}
@media (max-width: 768px) {
  .workshop-reel-viewport {
    border-radius: 16px;
    margin-top: 20px;
  }
  .workshop-reel-track {
    grid-template-rows: repeat(2, 190px);
    grid-auto-columns: calc((100% - 12px) / 2);
    gap: 12px;
    padding: 2px 2px 10px 2px;
  }
  .gallery-item-card {
    border-radius: 14px;
  }
  .video-play-badge {
    top: 8px;
    right: 8px;
    padding: 3px 7px;
    font-size: 0.52rem;
    letter-spacing: 0.5px;
    border-radius: 12px;
    gap: 4px;
    background: rgba(0, 0, 0, 0.72);
  }
  .video-play-badge svg {
    width: 9px;
    height: 9px;
  }
  .gallery-caption-overlay {
    padding: 8px 10px 10px 10px;
    background: linear-gradient(180deg, transparent 0%, transparent 35%, rgba(0, 0, 0, 0.55) 65%, rgba(0, 0, 0, 0.94) 100%);
  }
  .gallery-badge-chip {
    font-size: 0.52rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    padding: 2px 6px;
    border-radius: 4px;
    margin-bottom: 4px;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: inline-block;
  }
  .gallery-caption-text {
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9);
  }
  .reel-counter-badge {
    font-size: 0.68rem;
    padding: 6px 11px;
    gap: 6px;
  }
  .reel-arrow-btn {
    width: 36px;
    height: 36px;
  }
  .reel-arrow-btn svg {
    width: 18px;
    height: 18px;
  }
  .insta-reels-wrapper {
    width: 100vw;
    height: 100vh;
    max-height: 100vh;
    gap: 0;
  }
  .insta-reel-viewport {
    border-radius: 0;
    width: 100vw;
  }
  .insta-side-actions {
    position: absolute;
    right: 12px;
    bottom: 80px;
    z-index: 50;
  }
  .insta-chevron-btn {
    display: none;
  }
}

@media (max-width: 480px) {
  .workshop-reel-track {
    grid-template-rows: repeat(2, 185px);
    grid-auto-columns: calc((100% - 10px) / 2);
    gap: 10px;
  }
  .gallery-caption-overlay {
    padding: 6px 8px 8px 8px;
  }
  .gallery-badge-chip {
    font-size: 0.48rem;
    padding: 2px 5px;
    margin-bottom: 3px;
    letter-spacing: 0.3px;
  }
  .gallery-caption-text {
    font-size: 0.68rem;
    line-height: 1.22;
  }
}
