/* ══════════════════════════════════════════════════════════
   THEKIWIS — SOCIAL PROOF STORIES & REVIEWS ENGINE
   Estilo Instagram Stories con alto contraste y Neón Kiwi
   ══════════════════════════════════════════════════════════ */

/* --- Contenedor de Historias Destacadas (Scroll Horizontal) --- */
.kiwi-stories-wrapper {
  position: relative;
  width: 100%;
  margin: 0 auto 2.5rem auto;
}

.kiwi-stories-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  padding: 0 0.5rem;
}

.kiwi-stories-track {
  display: flex;
  gap: 1.25rem;
  overflow-x: auto;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  padding: 0.75rem 0.5rem 1rem 0.5rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(47, 255, 47, 0.3) transparent;
}

.kiwi-stories-track::-webkit-scrollbar {
  height: 4px;
}

.kiwi-stories-track::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 999px;
}

.kiwi-stories-track::-webkit-scrollbar-thumb {
  background: rgba(47, 255, 47, 0.4);
  border-radius: 999px;
}

/* --- Ítem de Historia Individual --- */
.kiwi-story-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
  cursor: pointer;
  background: transparent;
  border: none;
  padding: 0;
  outline: none;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
  width: 82px;
}

.kiwi-story-item:hover,
.kiwi-story-item:focus-visible {
  transform: translateY(-3px) scale(1.04);
}

.kiwi-story-avatar-wrap {
  position: relative;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  padding: 3px;
  background: linear-gradient(135deg, #2FFF2F 0%, #008F11 50%, #2FFF2F 100%);
  background-size: 200% 200%;
  animation: kiwiGradientRotate 4s ease infinite;
  box-shadow: 0 0 16px rgba(47, 255, 47, 0.35);
  transition: box-shadow 0.3s ease;
}

.kiwi-story-item:hover .kiwi-story-avatar-wrap {
  box-shadow: 0 0 24px rgba(47, 255, 47, 0.6);
}

.kiwi-story-avatar-inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  background: #0A0A0A;
  border: 2px solid #0A0A0A;
  position: relative;
}

.kiwi-story-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.kiwi-story-badge {
  position: absolute;
  bottom: -2px;
  right: -2px;
  background: #0A0A0A;
  border: 1.5px solid #2FFF2F;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.8);
}

.kiwi-story-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  color: #FFFFFF;
  text-align: center;
  max-width: 82px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  letter-spacing: -0.2px;
}

.kiwi-story-sub {
  font-family: 'Inter', sans-serif;
  font-size: 0.65rem;
  color: #94A3B8;
  text-align: center;
  max-width: 82px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: -2px;
}

@keyframes kiwiGradientRotate {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* --- MODAL STORY VIEWER (Experiencia 9:16 Inmersiva) --- */
.kiwi-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease-out;
}

.kiwi-modal-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.kiwi-modal-container {
  position: relative;
  width: 100%;
  max-width: 440px;
  height: 88vh;
  max-height: 840px;
  background: #000000;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.95), 0 0 40px rgba(47, 255, 47, 0.15);
  border: 1px solid rgba(47, 255, 47, 0.25);
  display: flex;
  flex-direction: column;
  transform: scale(0.95);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.kiwi-modal-backdrop.active .kiwi-modal-container {
  transform: scale(1);
}

@media (max-width: 640px) {
  .kiwi-modal-container {
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
    border: none;
  }
}

/* Barras de progreso superiores (Instagram Stories) */
.kiwi-story-progress-bar {
  position: absolute;
  top: 14px;
  left: 14px;
  right: 14px;
  display: flex;
  gap: 5px;
  z-index: 30;
}

.kiwi-progress-seg {
  flex: 1;
  height: 3px;
  background: rgba(255, 255, 255, 0.25);
  border-radius: 3px;
  overflow: hidden;
  position: relative;
}

.kiwi-progress-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0%;
  background: #2FFF2F;
  box-shadow: 0 0 8px #2FFF2F;
  border-radius: 3px;
}

/* Header del modal */
.kiwi-modal-header {
  position: absolute;
  top: 26px;
  left: 14px;
  right: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 30;
  pointer-events: auto;
}

.kiwi-modal-user {
  display: flex;
  align-items: center;
  gap: 10px;
}

.kiwi-modal-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1.5px solid #2FFF2F;
  background: #0A0A0A;
  object-fit: cover;
}

.kiwi-modal-info {
  display: flex;
  flex-direction: column;
}

.kiwi-modal-name {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.85rem;
  font-weight: 800;
  color: #FFFFFF;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  gap: 6px;
}

.kiwi-modal-tag {
  font-size: 0.65rem;
  background: #2FFF2F;
  color: #050706;
  padding: 1px 7px;
  border-radius: 999px;
  font-weight: 800;
  letter-spacing: 0.3px;
}

.kiwi-modal-time {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.7);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9);
}

.kiwi-modal-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.kiwi-modal-btn {
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #FFFFFF;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 15px;
  backdrop-filter: blur(8px);
  transition: all 0.2s ease;
}

.kiwi-modal-btn:hover {
  background: rgba(47, 255, 47, 0.2);
  border-color: #2FFF2F;
  color: #2FFF2F;
  transform: scale(1.08);
}

/* Contenido del medio (Video / Imagen) */
.kiwi-modal-media-wrap {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: #050706;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.kiwi-modal-media {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000000;
}

/* Áreas de toque izquierda / derecha para avanzar o retroceder */
.kiwi-nav-zone {
  position: absolute;
  top: 75px;
  bottom: 100px;
  width: 40%;
  z-index: 25;
  cursor: pointer;
}

.kiwi-nav-zone.left {
  left: 0;
}

.kiwi-nav-zone.right {
  right: 0;
}

/* Barra de sonido flotante para historias de audio */
.kiwi-sound-notice {
  position: absolute;
  top: 75px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(10, 15, 10, 0.85);
  border: 1px solid #2FFF2F;
  color: #2FFF2F;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 999px;
  z-index: 35;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.8), 0 0 12px rgba(47, 255, 47, 0.3);
  pointer-events: none;
  animation: kiwiPulseNotice 2s infinite;
}

@keyframes kiwiPulseNotice {
  0%, 100% { opacity: 1; transform: translateX(-50%) scale(1); }
  50% { opacity: 0.85; transform: translateX(-50%) scale(0.97); }
}

/* Footer del modal con llamado a la acción */
.kiwi-modal-footer {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px 16px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.85) 40%, rgba(0, 0, 0, 0.98) 100%);
  z-index: 30;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.kiwi-modal-quote {
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  color: #E2E8F0;
  line-height: 1.35;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.95);
  background: rgba(15, 20, 15, 0.6);
  border: 1px solid rgba(47, 255, 47, 0.2);
  padding: 8px 12px;
  border-radius: 10px;
  backdrop-filter: blur(8px);
}

.kiwi-modal-cta-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  background: #2FFF2F;
  color: #050706;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.95rem;
  font-weight: 800;
  padding: 13px 20px;
  border-radius: 999px;
  text-decoration: none;
  box-shadow: 0 0 20px rgba(47, 255, 47, 0.45);
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.kiwi-modal-cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 28px rgba(47, 255, 47, 0.7);
  background: #25E025;
}

/* --- TARJETAS DE RESEÑAS VERIFICADAS MEJORADAS --- */
.kiwi-verified-card {
  position: relative;
  transition: all 0.25s ease;
}

.kiwi-verified-card:hover {
  border-color: rgba(47, 255, 47, 0.35) !important;
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7), 0 0 15px rgba(47, 255, 47, 0.1);
}

.kiwi-card-trigger-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(47, 255, 47, 0.12);
  border: 1px solid rgba(47, 255, 47, 0.3);
  color: #2FFF2F;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 999px;
  cursor: pointer;
  margin-top: 10px;
  transition: all 0.2s ease;
}

.kiwi-card-trigger-btn:hover {
  background: #2FFF2F;
  color: #050706;
  box-shadow: 0 0 12px rgba(47, 255, 47, 0.4);
}
