/* Focus ring untuk aksesibilitas */
:focus-visible {
  outline: 3px solid #E76F51;
  outline-offset: 3px;
}

/* Micro-animations */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.6s cubic-bezier(0.2, 0.75, 0.25, 1);
}

.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

.btn-pulse {
  animation: pulse 2s ease-out 1;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(231, 111, 81, 0.5);
  }
  100% {
    box-shadow: 0 0 0 28px rgba(231, 111, 81, 0);
  }
}

.badge-bounce {
  animation: bounce-in 0.6s ease-out;
}

@keyframes bounce-in {
  0% {
    transform: scale(0.9) translateY(10px);
    opacity: 0;
  }
  100% {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}

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

/* Carousel */
.carousel-container {
  overflow: hidden;
}

.carousel-track {
  display: flex;
  gap: 1.5rem;
  transition: transform 0.5s ease-in-out;
}

/* Product card image styling */
.product-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.product-card:hover .product-image {
  transform: scale(1.1);
}

.product-image-container {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #fed7aa 0%, #fecaca 100%);
  height: 16rem;
}

/* Certificate viewer */
.pdf-viewer {
  width: 100%;
  height: 600px;
  border: none;
  border-radius: 1rem;
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

@media (max-width: 768px) {
  .pdf-viewer {
    height: 400px;
  }
}

/* Gallery images */
.gallery-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Hide scrollbar for carousel but keep functionality */
.carousel-container::-webkit-scrollbar {
  display: none;
}

.carousel-container {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Lazy loading effect */
img[loading="lazy"] {
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
}

img[loading="lazy"].lazy-loaded,
img[loading="eager"] {
  opacity: 1;
}

/* Blur effect saat loading */
img[loading="lazy"]:not(.lazy-loaded) {
  filter: blur(5px);
}

/* Back to top button animation */
#back-to-top {
  animation: fadeInUp 0.3s ease-out;
}

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

/* Smooth padding for fixed header */
body {
  padding-top: 64px; /* Height of fixed header */
}

/* ==========================================
   MICRO-ANIMATIONS & SMOOTH EFFECTS
   ========================================== */

/* Floating Animation */
@keyframes float {
  0%, 100% {
    transform: translateY(0px) translateX(0px);
  }
  25% {
    transform: translateY(-20px) translateX(10px);
  }
  50% {
    transform: translateY(-10px) translateX(-10px);
  }
  75% {
    transform: translateY(-15px) translateX(5px);
  }
}

.animate-float {
  animation: float 8s ease-in-out infinite;
}

.animate-float-delayed {
  animation: float 8s ease-in-out infinite;
  animation-delay: -4s;
}

/* Hover Lift Effect */
.hover-lift {
  display: inline-block;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.hover-lift:hover {
  transform: translateY(-4px);
}

/* Hover Bounce Effect */
.hover-bounce {
  display: inline-block;
  transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.hover-bounce:hover {
  animation: bounce-gentle 0.6s ease;
}

@keyframes bounce-gentle {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

/* Highlight Word Animation */
.highlight-word {
  position: relative;
  transition: all 0.3s ease;
}

.highlight-word:hover {
  color: #E76F51;
  transform: scale(1.05);
}

.highlight-word::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #E76F51, #f4a261);
  transition: width 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.highlight-word:hover::after {
  width: 100%;
}

/* Animate Highlight (for "Artisan" word) */
@keyframes highlight {
  0%, 100% {
    text-shadow: 0 0 0 transparent;
  }
  50% {
    text-shadow: 0 0 20px rgba(231, 111, 81, 0.3);
  }
}

.animate-highlight {
  animation: highlight 3s ease-in-out infinite;
}

/* Soft Pulse Animation */
@keyframes pulse-soft {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.85;
    transform: scale(1.02);
  }
}

.animate-pulse-soft {
  animation: pulse-soft 2s ease-in-out infinite;
}

/* Slow Ping Animation for Badges */
@keyframes ping-slow {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  75%, 100% {
    transform: scale(2);
    opacity: 0;
  }
}

.animate-ping-slow {
  position: relative;
}

.animate-ping-slow::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: inherit;
  animation: ping-slow 2s cubic-bezier(0, 0, 0.2, 1) infinite;
}

/* Staggered Fade In */
.stagger-fade {
  opacity: 0;
  transform: translateY(20px);
  animation: stagger-fade-in 0.6s ease forwards;
}

@keyframes stagger-fade-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Gradient Shift Animation */
@keyframes gradient-shift {
  0%, 100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

.animate-gradient {
  background-size: 200% 200%;
  animation: gradient-shift 5s ease infinite;
}

/* Scale on Hover (Enhanced) */
.hover-scale-lg {
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.hover-scale-lg:hover {
  transform: scale(1.08);
}

/* Glow Effect */
.glow {
  position: relative;
}

.glow::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  background: linear-gradient(45deg, #E76F51, #f4a261, #9DBF7A);
  opacity: 0;
  z-index: -1;
  filter: blur(10px);
  transition: opacity 0.3s ease;
}

.glow:hover::before {
  opacity: 0.7;
}

/* Shimmer Effect */
@keyframes shimmer {
  0% {
    background-position: -1000px 0;
  }
  100% {
    background-position: 1000px 0;
  }
}

.shimmer {
  position: relative;
  overflow: hidden;
}

.shimmer::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  animation: shimmer 3s infinite;
}

/* Shadow Lift on Hover */
.shadow-lift {
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.shadow-lift:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* Custom Tailwind Extensions */
.shadow-3xl {
  box-shadow: 0 35px 60px -15px rgba(0, 0, 0, 0.3);
}

/* Smooth Color Transitions */
* {
  transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}

/* Mobile Menu Animations */
#mobile-menu {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.3s ease-in-out, opacity 0.3s ease-in-out;
}

#mobile-menu.menu-open {
  max-height: 500px;
  opacity: 1;
}

/* Mobile Menu Items Stagger Animation */
.mobile-menu-link {
  opacity: 0;
  transform: translateX(-10px);
  transition: all 0.3s ease-out;
}

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

#mobile-menu.menu-open .mobile-menu-link:nth-child(1) {
  transition-delay: 0.05s;
}

#mobile-menu.menu-open .mobile-menu-link:nth-child(2) {
  transition-delay: 0.1s;
}

#mobile-menu.menu-open .mobile-menu-link:nth-child(3) {
  transition-delay: 0.15s;
}

#mobile-menu.menu-open .mobile-menu-link:nth-child(4) {
  transition-delay: 0.2s;
}

#mobile-menu.menu-open .mobile-menu-link:nth-child(5) {
  transition-delay: 0.25s;
}
