/**
 * YüFin - Estilos de Navegação (Scroll Indicator e Back to Top)
 */

/* ===== INDICADOR LATERAL MAIS DISCRETO ===== */
.scroll-indicator {
  position: fixed;
  top: 50%;
  right: 1.2rem;
  transform: translateY(-50%);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.scroll-indicator.visible {
  opacity: 0.4;
}

.scroll-indicator:hover {
  opacity: 0.8;
}

.scroll-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  backdrop-filter: blur(8px);
}

.scroll-dot.active {
  background: rgba(255, 140, 66, 0.7);
  border-color: rgba(255, 140, 66, 0.9);
  transform: scale(1.2);
  box-shadow: 0 0 0 1px rgba(255, 140, 66, 0.2);
}

.scroll-dot:hover {
  background: rgba(255, 140, 66, 0.5);
  border-color: rgba(255, 140, 66, 0.7);
  transform: scale(1.1);
}

.scroll-dot::after {
  content: attr(data-section);
  position: absolute;
  right: 1.2rem;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 0.3rem 0.6rem;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  backdrop-filter: blur(10px);
}

.scroll-dot:hover::after {
  opacity: 1;
}

/* ===== BOTÃO "VOLTAR AO TOPO" AJUSTADO ===== */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, #ee9116 0%, #ffb300 100%);
  border: 2px solid #ee9116;
  border-radius: 50%;
  color: white;
  font-size: 0.8rem;
  cursor: pointer;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1001;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 12px rgba(238, 145, 22, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  visibility: hidden;
}

.back-to-top.visible {
  opacity: 0.7;
  transform: translateY(0);
  visibility: visible;
}

.back-to-top:hover {
  opacity: 1;
  transform: translateY(-2px) scale(1.1);
  box-shadow: 0 6px 16px rgba(238, 145, 22, 0.4);
}

.back-to-top:active {
  transform: translateY(0) scale(1.05);
}

/* ===== RESPONSIVIDADE ===== */
@media (max-width: 768px) {
  .scroll-indicator {
    right: 1rem;
    gap: 0.5rem;
  }
  
  .scroll-dot {
    width: 5px;
    height: 5px;
  }
  
  .scroll-dot::after {
    right: 1rem;
    padding: 0.2rem 0.4rem;
    font-size: 0.65rem;
  }
  
  .back-to-top {
    bottom: 1.5rem;
    right: 1.5rem;
    width: 30px;
    height: 30px;
    font-size: 0.75rem;
  }
}

@media (max-width: 480px) {
  .scroll-indicator {
    right: 0.8rem;
  }
  
  .back-to-top {
    bottom: 1rem;
    right: 1rem;
    width: 28px;
    height: 28px;
    font-size: 0.7rem;
  }
}

/* ===== GARANTIR QUE NÃO INTERFIRA COM O FOOTER ===== */
.footer {
  margin-bottom: 0;
  padding-bottom: 2rem;
}

/* ===== AJUSTES PARA EVITAR SOBREPOSIÇÃO ===== */
@media (max-width: 768px) {
  .back-to-top {
    bottom: calc(1.5rem + env(safe-area-inset-bottom));
  }
  
  .scroll-indicator {
    right: calc(1rem + env(safe-area-inset-right));
  }
}

/* ===== ESTADOS ESPECIAIS ===== */
.back-to-top.hidden {
  opacity: 0 !important;
  visibility: hidden !important;
  transform: translateY(20px) !important;
}

.scroll-indicator.hidden {
  opacity: 0 !important;
  visibility: hidden !important;
}

/* ===== RESPONSIVIDADE MELHORADA ===== */
@media (max-width: 1199px) and (min-width: 992px) {
  .scroll-indicator {
    right: 1.5rem;
  }
  
  .back-to-top {
    right: 1.5rem;
    bottom: 1.5rem;
  }
}

@media (max-width: 991px) and (min-width: 769px) {
  .scroll-indicator {
    right: 1.25rem;
    gap: 0.6rem;
  }
  
  .scroll-dot {
    width: 6px;
    height: 6px;
  }
  
  .back-to-top {
    right: 1.25rem;
    bottom: 1.25rem;
    width: 30px;
    height: 30px;
  }
}

@media (max-width: 575px) and (min-width: 481px) {
  .scroll-indicator {
    right: 0.75rem;
    gap: 0.4rem;
  }
  
  .scroll-dot {
    width: 4px;
    height: 4px;
  }
  
  .scroll-dot::after {
    right: 0.75rem;
    padding: 0.2rem 0.4rem;
    font-size: 0.6rem;
  }
  
  .back-to-top {
    right: 0.75rem;
    bottom: 0.75rem;
    width: 26px;
    height: 26px;
    font-size: 0.65rem;
  }
}

@media (max-width: 479px) {
  .scroll-indicator {
    right: 0.5rem;
    gap: 0.3rem;
  }
  
  .scroll-dot {
    width: 3px;
    height: 3px;
  }
  
  .scroll-dot::after {
    right: 0.5rem;
    padding: 0.15rem 0.3rem;
    font-size: 0.55rem;
  }
  
  .back-to-top {
    right: 0.5rem;
    bottom: 0.5rem;
    width: 24px;
    height: 24px;
    font-size: 0.6rem;
  }
}
