/* ==========================================================================
   Jurist Migration - Custom Instagram Feed Carousel Styles
   ========================================================================== */

.instagram-feed-section {
  position: relative;
  background: linear-gradient(180deg, #F8FAFC 0%, #FFFFFF 50%, #F1F5F9 100%);
  padding: 6rem 0;
  overflow: hidden;
  border-top: 1px solid #E2E8F0;
}

/* Header Section */
.insta-section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2.5rem;
  margin-bottom: 3.5rem;
  flex-wrap: wrap;
}

.insta-header-left {
  max-width: 680px;
}

.insta-tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.9rem;
  background: linear-gradient(135deg, rgba(225, 48, 108, 0.1) 0%, rgba(253, 29, 29, 0.1) 50%, rgba(245, 96, 64, 0.1) 100%);
  border: 1px solid rgba(225, 48, 108, 0.25);
  border-radius: 9999px;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #D62976;
  margin-bottom: 1rem;
}

.insta-gradient-icon {
  stroke: url(#instaGrad) #D62976;
}

.insta-section-heading {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 2.6rem;
  font-weight: 800;
  color: #0F1E36;
  line-height: 1.2;
  margin-bottom: 0.85rem;
}

.text-insta-gradient {
  background: linear-gradient(45deg, #F58529, #D62976, #962FBF, #4F5BD5);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.insta-section-subheading {
  font-size: 1.05rem;
  color: #64748B;
  line-height: 1.6;
  margin: 0;
}

/* Profile Badge Card */
.insta-profile-badge {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: #FFFFFF;
  padding: 0.85rem 1.25rem;
  border-radius: 100px;
  box-shadow: 0 10px 25px -5px rgba(15, 30, 54, 0.08), 0 0 0 1px rgba(226, 232, 240, 0.8);
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.insta-profile-badge:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 35px -10px rgba(214, 41, 118, 0.2), 0 0 0 1px rgba(214, 41, 118, 0.3);
}

.insta-avatar-ring {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  padding: 2px;
  background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
  flex-shrink: 0;
}

.insta-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #FFFFFF;
  display: block;
}

.insta-profile-meta {
  text-align: left;
}

.insta-profile-handle {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.95rem;
  font-weight: 800;
  color: #0F1E36;
}

.insta-profile-marn {
  font-size: 0.75rem;
  color: #64748B;
  font-weight: 600;
}

.btn-insta-follow {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.9rem;
  background: linear-gradient(45deg, #f09433 0%, #dc2743 50%, #bc1888 100%);
  color: #FFFFFF;
  font-size: 0.8125rem;
  font-weight: 700;
  border-radius: 9999px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.insta-profile-badge:hover .btn-insta-follow {
  transform: scale(1.04);
}

/* ==========================================================================
   Carousel Container & Controls
   ========================================================================== */
.insta-carousel-wrapper {
  position: relative;
  margin: 0 -0.5rem;
}

.insta-nav-btn {
  position: absolute;
  top: 45%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  color: #0F1E36;
  box-shadow: 0 10px 25px -5px rgba(15, 30, 54, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.insta-nav-btn:hover {
  background: #BC0109;
  color: #FFFFFF;
  border-color: #BC0109;
  transform: translateY(-50%) scale(1.08);
  box-shadow: 0 12px 30px -5px rgba(188, 1, 9, 0.35);
}

.insta-nav-btn.prev-btn {
  left: -22px;
}

.insta-nav-btn.next-btn {
  right: -22px;
}

.insta-carousel-viewport {
  overflow-x: auto;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none; /* Firefox */
  padding: 1rem 0.5rem 1.5rem;
}

.insta-carousel-viewport::-webkit-scrollbar {
  display: none; /* Chrome, Safari */
}

.insta-carousel-track {
  display: flex;
  gap: 1.5rem;
  width: max-content;
  cursor: grab;
}

.insta-carousel-track:active {
  cursor: grabbing;
}

/* Slide Cards */
.insta-card-slide {
  flex: 0 0 285px;
  scroll-snap-align: start;
  border-radius: 18px;
  background: #FFFFFF;
  box-shadow: 0 10px 30px -5px rgba(15, 30, 54, 0.08), 0 0 0 1px rgba(226, 232, 240, 0.7);
  overflow: hidden;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.insta-card-slide:hover {
  transform: translateY(-8px);
  box-shadow: 0 25px 45px -10px rgba(15, 30, 54, 0.15), 0 0 0 1px rgba(214, 41, 118, 0.3);
}

.insta-card-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  text-decoration: none;
  color: inherit;
}

.insta-card-media {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #0F1E36;
}

.insta-media-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.insta-card-slide:hover .insta-media-img {
  transform: scale(1.08);
}

/* Card Top Badges */
.insta-badge-group {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 2;
  pointer-events: none;
}

.insta-card-tag {
  background: rgba(15, 30, 54, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #FFFFFF;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.3rem 0.65rem;
  border-radius: 6px;
  letter-spacing: 0.02em;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.insta-type-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(15, 30, 54, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Hover Overlay */
.insta-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 30, 54, 0.4) 0%, rgba(15, 30, 54, 0.95) 100%);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 3;
}

.insta-card-slide:hover .insta-card-overlay {
  opacity: 1;
  visibility: visible;
}

.insta-overlay-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(45deg, #f09433 0%, #dc2743 50%, #bc1888 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 20px rgba(220, 39, 67, 0.4);
}

.insta-overlay-caption {
  font-size: 0.875rem;
  color: #FFFFFF;
  line-height: 1.45;
  font-weight: 500;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.insta-overlay-action {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8125rem;
  font-weight: 700;
  color: #FFD166;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Card Details Footer */
.insta-card-footer {
  padding: 1rem 1.15rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #FFFFFF;
  border-top: 1px solid #F1F5F9;
}

.insta-card-date {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  color: #64748B;
  font-weight: 500;
}

.insta-card-handle {
  font-size: 0.78rem;
  font-weight: 700;
  color: #BC0109;
}

/* Pagination Dots */
.insta-carousel-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

.insta-dot {
  width: 9px;
  height: 9px;
  border-radius: 9999px;
  background: #CBD5E1;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.insta-dot.active {
  width: 28px;
  background: linear-gradient(45deg, #f09433 0%, #dc2743 50%, #bc1888 100%);
}

/* Bottom CTA Banner */
.insta-bottom-cta {
  text-align: center;
  margin-top: 3rem;
}

.btn-insta-gradient-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.95rem 2rem;
  background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
  color: #FFFFFF;
  font-size: 1rem;
  font-weight: 700;
  border-radius: 9999px;
  text-decoration: none;
  box-shadow: 0 12px 30px -5px rgba(220, 39, 67, 0.4);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-insta-gradient-cta:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 18px 40px -5px rgba(220, 39, 67, 0.55);
  color: #FFFFFF;
}

.btn-insta-gradient-cta .insta-arrow-cta {
  transition: transform 0.25s ease;
}

.btn-insta-gradient-cta:hover .insta-arrow-cta {
  transform: translateX(4px);
}

/* Responsive Breakpoints */
@media (max-width: 1024px) {
  .insta-section-heading {
    font-size: 2.2rem;
  }
  .insta-card-slide {
    flex: 0 0 260px;
  }
}

@media (max-width: 768px) {
  .instagram-feed-section {
    padding: 4rem 0;
  }
  .insta-section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
    margin-bottom: 2rem;
  }
  .insta-section-heading {
    font-size: 1.85rem;
  }
  .insta-card-slide {
    flex: 0 0 240px;
  }
  .insta-nav-btn {
    display: none; /* Touch swipe on mobile */
  }
  .btn-insta-gradient-cta {
    width: 100%;
    justify-content: center;
    padding: 0.85rem 1.5rem;
    font-size: 0.92rem;
  }
}
