/**
 * RCS Images Tabs - Sistema de tabs para trocar imagens
 */

/* ============================================
   SEÇÃO PRINCIPAL
   ============================================ */
.rcs-transform-section {
  padding: 80px 0 60px;
  position: relative;
  overflow: visible;
}

.rcs-transform-background {
  display: none;
}

/* Conteúdo textual */
.rcs-transform-section .container.rcs-transform-text {
  width: 100%;
  position: relative;
  z-index: 10;
  pointer-events: none;
  margin-bottom: 40px;
}

.rcs-transform-title {
  font-size: 3rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 15px;
  background: linear-gradient(199deg, #7b2fff 0%, #3ac6ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  position: relative;
  z-index: 11;
  pointer-events: none;
}

.rcs-transform-subtitle {
  font-size: 1.25rem;
  text-align: center;
  color: #666;
  margin-bottom: 0;
  position: relative;
  z-index: 11;
  pointer-events: none;
}

/* ============================================
   SISTEMA DE TABS
   ============================================ */
.rcs-tabs-container {
  margin-bottom: 50px;
  pointer-events: auto;
}

.rcs-tabs-nav {
  display: flex;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 0;
  background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
  padding: 4px;
  border-radius: 50px;
  max-width: fit-content;
  margin-left: auto;
  margin-right: auto;
  box-shadow:
    0 4px 16px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(123, 47, 255, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
}

.rcs-tabs-nav::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(123, 47, 255, 0.1), transparent);
  animation: shimmer 3s infinite;
  pointer-events: none;
}

@keyframes shimmer {
  0% {
    left: -100%;
  }

  100% {
    left: 100%;
  }
}

.rcs-tab-btn {
  background: transparent;
  border: none;
  padding: 12px 32px;
  font-size: 0.95rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  font-family: inherit;
  border-radius: 50px;
  z-index: 1;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  overflow: hidden;
}

.rcs-tab-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, #7b2fff 0%, #9d4edd 50%, #c77dff 100%);
  border-radius: 50px;
  opacity: 0;
  transform: scale(0.85);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: -1;
  box-shadow:
    0 4px 20px rgba(123, 47, 255, 0.4),
    0 0 0 1px rgba(123, 47, 255, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.rcs-tab-btn::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
  transform: translate(-50%, -50%);
  transition: width 0.6s ease, height 0.6s ease;
  pointer-events: none;
}

.rcs-tab-btn:hover {
  color: rgba(255, 255, 255, 0.9);
  transform: translateY(-2px);
}

.rcs-tab-btn:hover::after {
  width: 200px;
  height: 200px;
}

.rcs-tab-btn.active {
  color: #ffffff;
  font-weight: 600;
  transform: translateY(0);
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.rcs-tab-btn.active::before {
  opacity: 1;
  transform: scale(1);
  animation: pulse 2s ease-in-out infinite;
}

.rcs-tab-btn.active::after {
  width: 200px;
  height: 200px;
}

@keyframes pulse {

  0%,
  100% {
    box-shadow:
      0 4px 20px rgba(123, 47, 255, 0.4),
      0 0 0 1px rgba(123, 47, 255, 0.2),
      inset 0 1px 0 rgba(255, 255, 255, 0.2);
  }

  50% {
    box-shadow:
      0 4px 30px rgba(123, 47, 255, 0.6),
      0 0 0 1px rgba(123, 47, 255, 0.4),
      inset 0 1px 0 rgba(255, 255, 255, 0.3);
  }
}

/* Container de imagens com tabs */
.rcs-images-tabs-container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
  position: relative;
}

.rcs-images-tabs-wrapper {
  position: relative;
  width: 100%;
}

.rcs-image-tab-item {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.rcs-image-tab-item.active {
  position: relative;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.rcs-image-tab-item.active .rcs-expand-image-btn {
  pointer-events: auto;
}

.rcs-tab-image {
  width: 85%;
  max-width: 1200px;
  height: auto;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

/* ============================================
   BOTÃO EXPANDIR IMAGEM (Mobile/Tablet)
   ============================================ */

.rcs-expand-image-btn {
  display: none;
  position: absolute;
  bottom: 10px;
  right: -10px;
  background: rgba(123, 47, 255, 0.9);
  border: none;
  border-radius: 50%;
  width: 35px;
  height: 35px;
  cursor: pointer;
  z-index: 10;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(123, 47, 255, 0.3);
  color: #ffffff;
  pointer-events: none;
}

.rcs-image-tab-item.active .rcs-expand-image-btn {
  pointer-events: auto;
}

.rcs-expand-image-btn:hover {
  background: rgba(123, 47, 255, 1);
  transform: scale(1.1);
  box-shadow: 0 6px 16px rgba(123, 47, 255, 0.4);
}

.rcs-expand-image-btn:active {
  transform: scale(0.95);
}

.rcs-expand-image-btn svg {
  width: 18px;
  height: 18px;
}

/* Mostrar botão apenas a partir de 768px */
@media (max-width: 768px) {
  .rcs-expand-image-btn {
    display: flex;
  }
}

/* ============================================
   MODAL DE IMAGEM EXPANDIDA
   ============================================ */

.rcs-image-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.rcs-image-modal.active {
  display: flex;
  opacity: 1;
}

.rcs-image-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgb(255 255 255 / 90%);
  backdrop-filter: blur(4px);
}

.rcs-image-modal-content {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 1;
}

.rcs-image-modal-img {
  max-width: 105%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
}

.rcs-image-modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgb(0 0 0 / 34%);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  width: 48px;
  height: 48px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  color: #ffffff;
  z-index: 10000;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.rcs-image-modal-close:hover {
  background: rgba(51, 51, 51, 0.3);
  border-color: rgba(255, 255, 255, 0.5);
  transform: rotate(90deg) scale(1.1);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.rcs-image-modal-close:active {
  transform: rotate(90deg) scale(0.95);
}

.rcs-image-modal-close svg {
  width: 24px;
  height: 24px;
  stroke-width: 2.5;
}

/* Garantir que o botão X seja sempre visível */
.rcs-image-modal.active .rcs-image-modal-close {
  display: flex !important;
  opacity: 1 !important;
  visibility: visible !important;
}

[data-theme="dark"] .rcs-image-modal-overlay {
  background: rgba(0, 0, 0, 0.95);
}

[data-theme="dark"] .rcs-image-modal-close {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.3);
}

[data-theme="dark"] .rcs-image-modal-close:hover {
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.5);
}

/* ============================================
   RESPONSIVO
   ============================================ */
@media (max-width: 768px) {
  .rcs-tabs-nav {
    gap: 6px;
    padding: 4px;
  }

  .rcs-tab-btn {
    font-size: 0.9rem;
    padding: 10px 24px;
  }

  .rcs-images-tabs-container {
    padding: 0 15px;
  }



  .rcs-tab-image {
    width: 85%;
    max-width: 100%;
  }
}



@media (max-width: 768px) {
  .rcs-transform-title {
    font-size: 2rem;
  }

  .rcs-transform-subtitle {
    font-size: 1.1rem;
  }
}

@media (max-width: 479px) {
  .rcs-transform-section {
    padding: 25px 0 100px;
  }

}

/* Acessibilidade */
@media (prefers-reduced-motion: reduce) {
  .rcs-image-tab-item {
    transition: none;
  }
}