/* Custom styles for Deja Vu - Eivissa */

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
  background: #94a3b8;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #64748b;
}

/* Header scroll state */
#header.scrolled {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* Navigation link underline animation */
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: #0d9488;
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: 100%;
}

/* Mobile menu */
.mobile-link {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s ease;
}

#mobile-menu.open .mobile-link {
  opacity: 1;
  transform: translateY(0);
}

#mobile-menu.open .mobile-link:nth-child(1) { transition-delay: 0.1s; }
#mobile-menu.open .mobile-link:nth-child(2) { transition-delay: 0.15s; }
#mobile-menu.open .mobile-link:nth-child(3) { transition-delay: 0.2s; }
#mobile-menu.open .mobile-link:nth-child(4) { transition-delay: 0.25s; }
#mobile-menu.open .mobile-link:nth-child(5) { transition-delay: 0.3s; }

/* Hamburger animation */
#menu-toggle.active #bar1 {
  transform: translateY(8px) rotate(45deg);
}
#menu-toggle.active #bar2 {
  opacity: 0;
  transform: scaleX(0);
}
#menu-toggle.active #bar3 {
  transform: translateY(-8px) rotate(-45deg);
}

/* Tab buttons */
.tab-btn {
  color: #64748b;
  background: transparent;
}
.tab-btn:hover {
  color: #0d9488;
}
.tab-btn.active {
  color: #0d9488;
  background: #f0fdfa;
  box-shadow: 0 1px 3px rgba(13, 148, 136, 0.15);
}

/* Tab content animation */
.tab-content {
  animation: fadeInUp 0.4s ease;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Scroll reveal animation */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Image hover effect */
.rounded-2xl.overflow-hidden {
  overflow: hidden;
}
.rounded-2xl.overflow-hidden img {
  transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.rounded-2xl.overflow-hidden:hover img {
  transform: scale(1.05);
}

/* Hero parallax subtle */
#inicio {
  perspective: 1px;
}

/* Selection color */
::selection {
  background: #99f6e4;
  color: #042f2e;
}

/* Focus visible */
:focus-visible {
  outline: 2px solid #0d9488;
  outline-offset: 2px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
  .rounded-2xl.overflow-hidden img {
    transform: none;
  }
}
