/* Owl Nav: show provided SVG icons and hide the default text */
.owl-nav .owl-prev,
.owl-nav .owl-next {
  position: relative;
  color: inherit; /* keep theme color */
}
.owl-nav .owl-prev span,
.owl-nav .owl-next span {
  display: none; /* hide the built-in text glyph */
}
.owl-nav button.owl-prev svg,
.owl-nav button.owl-next svg {
  width: 18px;
  height: 18px;
  display: inline-block;
  vertical-align: middle;
  fill: currentColor; /* use button color */
}
/* Sparkle Members Shortcode Styles */
.sparkle-members-container {
  /* max-width: 1200px; */
  margin: 0 auto;
  padding: 40px 0px;
}

.sparkle-section-title {
  text-align: center;
  font-size: 2.5rem;
  font-weight: 700;
  color: #2c3e50;
  margin-bottom: 50px;
  font-family: "Playfair Display", serif;
}

.sparkle-members-grid {
  display: grid;
  gap: 30px;
  margin-bottom: 40px;
}

/* Responsive grid columns */
.sparkle-members-grid[data-columns="1"] {
  grid-template-columns: 1fr;
}
.sparkle-members-grid[data-columns="2"] {
  grid-template-columns: repeat(2, 1fr);
}
.sparkle-members-grid[data-columns="3"] {
  grid-template-columns: repeat(3, 1fr);
}
.sparkle-members-grid[data-columns="4"] {
  grid-template-columns: repeat(4, 1fr);
}

.sparkle-member-card {
  background: white;
  border-radius: 16px;
  margin: 0px;
  padding: 20px;
  text-align: center;
  box-shadow: none;
  border: 1px solid #e9509b;
  background-clip: padding-box;
  position: relative;
  /* flex: 0 0 calc(33.333% - 17px); */
  transition: all 0.3s ease;
}

/* Membership-level specific card styling */
.sparkle-member-card {
  width: calc(100% - 10px);
}

.sparkle-member-card.sparkle-card {
  /* Add custom Sparkle styling here if needed */
}

.sparkle-member-card.twinkle-card {
  /* Add custom Twinkle styling here if needed */
}

/* Owl nav arrows for sparkle members slider */
.sparkle-members-owl {
  position: relative;
}
.sparkle-members-owl .owl-nav {
  margin: 0;
}
.sparkle-members-owl .owl-nav button.owl-prev,
.sparkle-members-owl .owl-nav button.owl-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: linear-gradient(180deg, #e9509b 0%, #f58f7d 100%) !important;
  border: none;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(233, 80, 155, 0.35);
  z-index: 2;
}
.sparkle-members-owl .owl-nav button.owl-prev {
  left: -55px;
}
.sparkle-members-owl .owl-nav button.owl-next {
  right: -55px;
}
.sparkle-members-owl .owl-nav button span {
  font-size: 24px;
  line-height: 1;
  color: #fff;
}
.sparkle-members-owl .owl-nav button:hover {
  filter: brightness(1.06);
}
.sparkle-members-owl .owl-dots {
  display: none;
}

@media (max-width: 1024px) {
  .sparkle-members-owl .owl-nav button.owl-prev {
    left: -8px;
  }
  .sparkle-members-owl .owl-nav button.owl-next {
    right: -8px;
  }
}
@media (max-width: 600px) {
  .sparkle-members-owl .owl-nav button.owl-prev,
  .sparkle-members-owl .owl-nav button.owl-next {
    width: 44px;
    height: 44px;
  }
  .sparkle-members-owl .owl-nav button span {
    font-size: 20px;
  }
}

.sparkle-member-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 16px;
  padding: 1px;
  background: linear-gradient(135deg, #ff6b9d, #ffa500);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  -webkit-mask-composite: xor;
  z-index: -1;
}

.sparkle-member-card:hover {
  transform: translateY(0px);
  border: none;
  box-shadow: none;
}

.member-avatar {
  width: 100%;
  height: 250px;
  border-radius: 20px;
  margin: 0 auto 20px;
  overflow: hidden;
  /* border: 3px solid #ff6b9d; */
  position: relative;
}

.member-avatar img {
  width: 100%;
  height: 100% !important;
  object-fit: cover;
  border-radius: 20px;
}
.stat-badge,
.stat-badge.views {
  border: 2px solid #e9509b;
  background-color: #ffcd003b !important;
  background: #ffcd003b !important;
  color: #e9509b !important;
  fill: #e9509b !important;
}
.member-info {
  margin-bottom: 12px;
}

.member-name {
  font-size: 1.25rem;
  font-weight: 600;
  color: #2c3e50;
  margin: 0 0 8px 0;
  line-height: 1.3;
}

.member-designation {
  font-size: 0.95rem;
  color: #7f8c8d;
  margin: 0 0 5px !important;
  font-weight: 500;
}

/* Location moved before button (backward compat) */
.member-location {
  font-size: 1rem;
  color: #d4af37;
  font-weight: 600;
  margin: 8px 0 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

/* New location class positioned before button */
.member-location-footer {
  font-size: 1rem;
  color: #d4af37;
  font-weight: 600;
  margin: 7px 0 7px 0 !important;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

/* Stats Badges - Positioned right after image */
.member-stats {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin: 12px 0 8px 0;
}

.stat-badge {
  background: linear-gradient(135deg, #ffd700 0%, #ffa500 100%);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 90px;
  justify-content: center;
  color: #fff;
  box-shadow: 0 2px 8px rgba(255, 215, 0, 0.3);
  transition: all 0.3s ease;
}

.stat-badge.likes {
  background: linear-gradient(135deg, #ffd700 0%, #ffa500 100%);
  color: #fff;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.stat-badge.likes:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 215, 0, 0.4);
}

.stat-badge.likes::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.stat-badge.likes.animate::before {
  width: 300px;
  height: 300px;
}

/* Heart icon: outlined by default, solid when liked */
.stat-badge.likes svg.cd-heart {
  flex-shrink: 0;
  display: inline-block;
}
.stat-badge.likes svg.cd-heart path {
  fill: transparent;
  stroke: #e9509b;
  stroke-width: 2.5;
  transition: fill 0.2s ease, stroke 0.2s ease;
}
.stat-badge.likes.liked svg.cd-heart path,
.stat-badge.likes[aria-pressed="true"] svg.cd-heart path {
  fill: #e9509b;
  stroke: #e9509b;
}

/* Optional visual for already liked state */
.stat-badge.likes.liked {
  filter: saturate(1.1);
  opacity: 1;
}

.stat-badge.views {
  background: linear-gradient(135deg, #ffd700 0%, #ffa500 100%);
  color: #fff;
}

.stat-badge.views svg.cd-eye {
  flex-shrink: 0;
  display: inline-block;
}

.stat-badge.views svg.cd-eye path {
  fill: #e9509b;
}

.stat-count {
  font-weight: 700;
  font-size: 0.9rem;
}

.stat-label {
  font-weight: 600;
  font-size: 0.85rem;
}

.member-action {
  margin-top: 20px;
}

.sparkle-btn {
  font-family: "Sofia Sans", Sans-serif;
  font-size: 18px;
  background: #fff !important;
  font-weight: 700;
  /* background-image: linear-gradient(180deg, #E9509B 0%, #F58F7D 100%); */
  border-style: solid;
  border-width: 1px 1px 1px 1px;
  border-color: #e9509b !important;
  border-radius: 7px 7px 7px 7px;
  padding: 12px 40px;
  color: #e9509b !important;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none !important;
  display: inline-block;
  position: relative;
  overflow: hidden;
}
.sparkle-btn:hover {
  color: #fff !important;
  background: linear-gradient(180deg, #e9509b 0%, #f58f7d 100%) !important;
}
.sparkle-btn-primary {
  color: white;
}

.sparkle-btn-primary:hover {
  background-color: transparent;
  color: #e9509b;
  background-image: linear-gradient(180deg, #ffffff 0%, #ffffff 100%);
}

.sparkle-btn-secondary {
  color: white;
}

.sparkle-btn-secondary:hover {
  background-color: transparent;
  color: #e9509b;
  background-image: linear-gradient(180deg, #ffffff 0%, #ffffff 100%);
}

/* Slider Navigation */
.slider-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 45px;
  height: 45px;
  background: #ff6b9d;
  border: none;
  border-radius: 50%;
  color: white;
  font-size: 1.1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(255, 107, 157, 0.3);
}

.slider-nav:hover {
  background: #ff5a8f;
  transform: translateY(-50%) scale(1.05);
  box-shadow: 0 6px 16px rgba(255, 107, 157, 0.4);
}

.slider-nav.prev {
  left: 15px;
}

.slider-nav.next {
  right: 15px;
}

.slider-nav::before {
  font-size: 1.3rem;
  font-weight: bold;
}

.slider-nav.prev::before {
  content: "‹";
}

.slider-nav.next::before {
  content: "›";
}

/* Ensure arrows are vertically centered */
.sparkle-members-slider {
  position: relative;
  overflow: hidden;
  padding: 0 60px;
  margin-bottom: 50px;
  display: flex;
  align-items: center;
}

/* Center the grid within the slider */
.sparkle-members-grid {
  display: flex;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  gap: 25px;
  width: 100%;
}

/* Simple Grid Layout (No Slider) - Always 3 columns */
.sparkle-members-grid-simple {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.sparkle-members-grid-simple .sparkle-member-card {
  margin: 0;
  flex: none;
}

/* For single member, keep 3-column layout with empty spaces */
.sparkle-members-grid-simple:has(.sparkle-member-card:only-child) {
  grid-template-columns: repeat(3, 1fr);
}

/* Responsive adjustments for simple grid */
@media (max-width: 900px) {
  .sparkle-members-grid-simple {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 20px;
  }
}

@media (max-width: 600px) {
  .sparkle-members-grid-simple {
    grid-template-columns: 1fr !important;
    gap: 20px;
    padding: 0 15px;
  }
}

/* See All Button */
.sparkle-see-all-container {
  text-align: center;
  margin-top: 40px;
}

.sparkle-btn-see-all {
  font-family: "Sofia Sans", Sans-serif;
  font-size: 18px;
  font-weight: 700;
  background-image: linear-gradient(180deg, #e9509b 0%, #f58f7d 100%);
  border-style: solid;
  border-width: 1px 1px 1px 1px;
  border-color: #e9509b;
  border-radius: 7px 7px 7px 7px;
  padding: 12px 40px;
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none !important;
  display: inline-block;
  position: relative;
  overflow: hidden;
}

.sparkle-btn-see-all:hover {
  background-color: transparent;
  color: #e9509b;
  background-image: linear-gradient(180deg, #ffffff 0%, #ffffff 100%);
}

/* Popup Styles - COMPACT REFERENCE DESIGN */
.sparkle-popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.sparkle-popup-overlay.active {
  opacity: 1;
  visibility: visible;
}

.sparkle-popup-content {
  background: white;
  border-radius: 12px;
  width: 90%;
  max-width: 50%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.sparkle-popup-overlay.active .sparkle-popup-content {
  transform: scale(1);
}

.sparkle-popup-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: #fff;
  color: #000;
  border: none;
  border-radius: 50%;
  width: 15px;
  height: 15px;
  padding: 0;
  cursor: pointer;
  font-size: 25px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 10;
  box-shadow: none;
  /* backdrop-filter: blur(10px); */
}

.sparkle-popup-close:hover {
  background: #fff;
  color: #000;
  transform: rotate(90deg);
}

.sparkle-popup-user-info {
  display: flex;
  align-items: flex-start;
  padding: 8px;
  gap: 16px;
}

.sparkle-popup-user-avatar {
  width: 40%;
  height: auto;
  border-radius: 12px;
  overflow: hidden;
  background: #f8f9fa;
  flex-shrink: 0;
  border: 1px solid #e9ecef;
}

.sparkle-popup-user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sparkle-popup-user-content {
  flex: 1;
  text-align: left;
  padding-top: 5px;
}

.sparkle-popup-user-name {
  font-size: 1.7rem;
  font-weight: 600;
  color: #333;
  margin: 0 0 6px 0;
  line-height: 1.2;
  display: block;
}

.sparkle-popup-user-designation {
  font-size: 0.7rem;
  font-weight: 500;
  color: #667eea;
  background: rgba(102, 126, 234, 0.08);
  padding: 3px 8px;
  border-radius: 10px;
  margin: 0 0 12px 6px;
  line-height: 1.3;
  border: 1px solid rgba(102, 126, 234, 0.15);
  vertical-align: middle;
}

.sparkle-popup-user-description {
  font-size: 0.8rem;
  line-height: 1.4;
  color: #666;
  margin: 0 0 16px 0;
  font-weight: 400;
  height: 160px; /* fixed height as requested */
  overflow: auto; /* enable scroll when content exceeds height */
  -webkit-overflow-scrolling: touch; /* smooth scroll on iOS */
}

.sparkle-popup-upgrade {
  font-family: "Sofia Sans", Sans-serif;
  font-size: 18px;
  font-weight: 700;
  background-image: linear-gradient(180deg, #e9509b 0%, #f58f7d 100%);
  border-style: solid;
  border-width: 1px 1px 1px 1px;
  border-color: #e9509b;
  border-radius: 7px 7px 7px 7px;
  padding: 12px 40px;
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none !important;
  display: inline-block;
  position: relative;
  overflow: hidden;
}

.sparkle-popup-upgrade:hover {
  background-color: transparent;
  color: #e9509b;
  background-image: linear-gradient(180deg, #ffffff 0%, #ffffff 100%);
}

/* Profile Option Styling */
.sparkle-popup-profile-option {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.sparkle-popup-profile-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  text-decoration: none;
  color: #667eea;
  font-size: 14px;
  transition: all 0.3s ease;
}

.sparkle-popup-profile-btn:hover {
  color: #5a6fd8;
  transform: scale(1.1);
}

.sparkle-popup-profile-option:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.sparkle-popup-stats {
  display: flex;
  gap: 12px;
  margin: 12px 0 16px 0;
}

.sparkle-popup-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 0.75rem;
  color: #666;
}

.sparkle-popup-stat span:first-child {
  font-size: 0.9rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 2px;
}

/* Responsive Design */
@media (max-width: 1200px) {
  .sparkle-member-card {
    /* flex: 0 0 calc(33.333% - 12px); */
    min-width: 100%;
  }
}

@media (max-width: 900px) {
  .sparkle-members-grid {
    gap: 20px;
  }

  .sparkle-member-card {
    /* flex: 0 0 calc(50% - 10px); */
    /* min-width: 200px; */
    padding: 25px 15px;
  }

  .sparkle-section-title {
    font-size: 2rem;
  }
}

@media (max-width: 600px) {
  .sparkle-members-container {
    padding: 20px 0px;
  }

  .sparkle-members-slider {
    padding: 0 50px;
  }

  .sparkle-members-grid {
    flex-direction: column;
    align-items: center;
    gap: 20px;
  }

  .sparkle-member-card {
    /* flex: 0 0 100%; */
    max-width: 320px;
    width: 100%;
    padding: 20px;
  }

  .sparkle-section-title {
    font-size: 1.8rem;
  }

  .slider-nav {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }

  .slider-nav.prev {
    left: 10px;
  }

  .slider-nav.next {
    right: 10px;
  }
}

.sparkle-loading {
  text-align: center;
  padding: 40px;
  color: #6c757d;
}

.sparkle-loading::before {
  content: "";
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid #ff6b9d;
  border-radius: 50%;
  border-top-color: transparent;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}
