/* ================================
    ICONIFY ICON STYLES
    ================================ */

/* Base styles for iconify-icon web component */
iconify-icon {
    display: inline-block;
    vertical-align: middle;
    flex-shrink: 0;
    width: 1em;
    height: 1em;
    min-width: 1em;
    min-height: 1em;
    box-sizing: border-box;
}

iconify-icon[inline] {
    vertical-align: -0.125em;
}

/* Show placeholder for icons not yet loaded - prevents invisible icons */
iconify-icon:not(:defined) {
    visibility: visible;
    background: rgba(234, 179, 8, 0.05);
    border: 1px dashed rgba(234, 179, 8, 0.2);
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    animation: iconPulse 2s ease-in-out infinite;
}

@keyframes iconPulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 0.8; }
}

/* Icons that loaded successfully - remove placeholder styling */
iconify-icon:defined {
    background: transparent;
    border: none;
    animation: none;
}

/* ================================
    GRADIENT EFFECTS
    ================================ */

/* Gold Gradient Text - Sama dengan index.html inline style */
.text-gold-gradient {
  background: linear-gradient(135deg, #fef3c7 0%, #d97706 40%, #92400e);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.border-gold-gradient {
  border-image: linear-gradient(
    135deg,
    rgba(var(--color-primary-100-rgb), 0.5) 0%,
    rgba(var(--color-primary-600-rgb), 0.5) 40%,
    rgba(var(--color-primary-800-rgb), 0.5) 100%
  );
  border-image-slice: 1;
}

/* ================================
   3D ANIMATIONS & KEYFRAMES
   ================================ */

@keyframes float {
  0% {
    transform: translateY(0px) rotateX(0deg) rotateY(0deg);
  }
  25% {
    transform: translateY(-15px) rotateX(1deg) rotateY(1deg);
  }
  50% {
    transform: translateY(-25px) rotateX(2deg) rotateY(-1deg);
  }
  75% {
    transform: translateY(-15px) rotateX(1deg) rotateY(-1deg);
  }
  100% {
    transform: translateY(0px) rotateX(0deg) rotateY(0deg);
  }
}

@keyframes float-delayed {
  0% {
    transform: translateY(0px) rotateX(0deg) rotateY(0deg);
  }
  33% {
    transform: translateY(-20px) rotateX(-1deg) rotateY(2deg);
  }
  66% {
    transform: translateY(-10px) rotateX(2deg) rotateY(-1deg);
  }
  100% {
    transform: translateY(0px) rotateX(0deg) rotateY(0deg);
  }
}

@keyframes float-front {
  0% {
    transform: translateY(0px) rotateX(0deg) rotateY(0deg) scale(1);
  }
  20% {
    transform: translateY(-18px) rotateX(1.5deg) rotateY(-1deg) scale(1.02);
  }
  40% {
    transform: translateY(-28px) rotateX(-1deg) rotateY(2deg) scale(1.03);
  }
  60% {
    transform: translateY(-18px) rotateX(1deg) rotateY(-1deg) scale(1.02);
  }
  80% {
    transform: translateY(-8px) rotateX(-0.5deg) rotateY(-0.5deg) scale(1.01);
  }
  100% {
    transform: translateY(0px) rotateX(0deg) rotateY(0deg) scale(1);
  }
}

@keyframes pulse-glow {
  0%,
  100% {
    box-shadow: 0 0 20px rgba(217, 119, 6, 0.1);
  }
  50% {
    box-shadow: 0 0 40px rgba(217, 119, 6, 0.3);
  }
}

@keyframes typing-dots {
  0%,
  60%,
  100% {
    opacity: 0.3;
  }
  30% {
    opacity: 1;
  }
}

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

/* Animation Classes - SELALU AKTIF */
.animate-float {
  animation: float 8s ease-in-out infinite;
}

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

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

.animate-pulse-glow {
  animation: pulse-glow 4s ease-in-out infinite;
}

.animate-typing-dots {
  animation: typing-dots 1.5s ease-in-out infinite;
}

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

/* ================================
   3D CARD COMPONENTS
   ================================ */

.card-3d {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  transform-style: preserve-3d;
}

.card-3d:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 20px 40px -15px rgba(180, 83, 9, 0.15);
}

/* Enhanced Hero Cards Animation */
.hero-card {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  transform-style: preserve-3d;
  backdrop-filter: blur(8px);
}

.hero-card:hover {
  transform: translateY(-8px) scale(1.03) rotateX(2deg) rotateY(2deg);
  box-shadow: 0 25px 50px -20px rgba(217, 119, 6, 0.3);
}

.hero-card-back {
  animation: float-delayed 9s ease-in-out infinite;
  filter: blur(0.5px) brightness(0.9);
}

.hero-card-middle {
  animation: float 8s ease-in-out infinite;
  filter: brightness(0.95);
}

.hero-card-front {
  animation: float-front 7s ease-in-out infinite;
  filter: brightness(1.1);
}

/* Card glow effects */
.hero-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    135deg,
    rgba(217, 119, 6, 0.1) 0%,
    transparent 50%,
    rgba(217, 119, 6, 0.1) 100%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: inherit;
  pointer-events: none;
}

.hero-card:hover::before {
  opacity: 1;
}

/* ================================
   CARD LAYOUT IMPROVEMENTS
   ================================ */

.perspective-container {
  perspective: 1200px;
}

.hero-card-back {
  margin-left: 20px;
  margin-top: -20px;
  animation: float-delayed 9s ease-in-out infinite;
  z-index: 8;
  opacity: 0.7;
}

.hero-card-middle {
  margin-left: -150px;
  animation: float 8s ease-in-out infinite !important;
  z-index: 12;
  opacity: 0.85;
}

.hero-card-front {
  margin-top: 40px;
  animation: float-front 7s ease-in-out infinite;
  z-index: 16;
  opacity: 1;
}

/* ================================
   RESPONSIVE DESIGN
   ================================ */

@media (max-width: 1024px) {
  .hero-card:not(.mobile-card) {
    position: relative !important;
    top: auto !important;
    right: auto !important;
    transform: none !important;
    margin: 20px 0;
    filter: none !important;
    opacity: 1 !important;
  }
  .perspective-container {
    display: none;
  }
}

/* Additional spacing for better separation */
.hero-section {
  min-height: 100vh;
  padding-bottom: 8rem;
}

/* Mobile card improvements */
.mobile-card {
  transition: all 0.3s ease;
}

.mobile-card:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 10px 25px -10px rgba(217, 119, 6, 0.3);
}

/* ================================
   PROGRESS BARS
   ================================ */

.progress-bar {
  position: relative;
  overflow: hidden;
}

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

.gold-glow {
  box-shadow: 0 0 60px -20px rgba(217, 119, 6, 0.3);
}

/* ================================
   FOOTER LINKS CONSISTENCY
   ================================ */

/* Pastikan footer links tidak terpengaruh FAQ styles */
footer a[data-link="faq"],
footer a[data-link="faq"]:hover,
footer a[data-link="faq"]:visited,
footer a[data-link="faq"]:active {
  color: #71717a !important; /* text-neutral-500 */
}

footer a[data-link="faq"]:hover {
  color: #eab308 !important; /* text-yellow-500 */
}

/* Reset FAQ styles untuk footer */
footer .faq-item,
footer .faq-content,
footer .faq-icon {
  all: unset;
}

/* ================================
   MODAL ANIMATIONS
   ================================ */

.modal-enter {
  opacity: 0;
  transform: scale(0.9) translateY(20px);
}

.modal-enter-active {
  opacity: 1;
  transform: scale(1) translateY(0);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-exit {
  opacity: 0;
  transform: scale(0.9) translateY(20px);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ================================
   MODAL MOBILE OPTIMIZATIONS
   ================================ */

#orderModal {
  -webkit-overflow-scrolling: touch;
}

#orderModal input:not([type="checkbox"]),
#orderModal button {
  height: 40px;
  font-size: 14px;
}

#orderModal input[type="checkbox"] {
  height: 16px;
  width: 16px;
}

/* Safe area for iOS */
@supports (-webkit-touch-callout: none) {
  #orderModal {
    padding: env(safe-area-inset-top) env(safe-area-inset-right)
      env(safe-area-inset-bottom) env(safe-area-inset-left);
  }
}
/* ================================
   NAVIGATION & SCROLL
   ================================ */

/* Smooth scrolling for anchor links */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 100px; /* Account for fixed header height */
}

/* Active navigation state */
.nav-active {
  color: #fbbf24 !important;
}

/* ================================
   ADDITIONAL ANIMATIONS
   ================================ */

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
  20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.animate-shake {
  animation: shake 0.5s cubic-bezier(.36,.07,.19,.97) both;
}

/* Force animations to work and override reduced motion */
.hero-card-back,
.hero-card-middle,
.hero-card-front,
.animate-float,
.animate-float-delayed,
.animate-float-front,
.animate-pulse-glow {
  animation-play-state: running !important;
}

@media (prefers-reduced-motion: reduce) {
  .hero-card-back,
  .hero-card-middle,
  .hero-card-front,
  .animate-float,
  .animate-float-delayed,
  .animate-float-front,
  .animate-pulse-glow {
    animation-play-state: running !important;
  }
}

/* ================================
    LAZY LOADING IMAGE STYLES
    ================================ */

/* Images waiting to be loaded */
img[data-src] {
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
  background-color: #262626;
}

/* Images that have been loaded */
img[data-src].loaded,
img.loaded {
  opacity: 1;
}

/* Placeholder/loading state */
img[data-src]:not(.loaded) {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 0.5;
  }
  50% {
    opacity: 0.8;
  }
}
