/**
 * Additional Custom Styles for PATRUL Theme
 *
 * @package PATRUL
 */

/* Hide WordPress admin bar */
#wpadminbar {
  display: none !important;
}

/* Icon Animations */
.lucide-icon {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.icon-animated {
  animation: iconFadeIn 0.6s ease-out forwards;
}

@keyframes iconFadeIn {
  from {
    opacity: 0;
    transform: scale(0.5) rotate(-10deg);
  }
  to {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }
}

/* Hover animations for icons in cards */
.pillar-card:hover .lucide-icon {
  transform: scale(1.2) rotate(5deg);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-product-card:hover .lucide-icon,
.card:hover .lucide-icon {
  transform: scale(1.15);
  transition: transform 0.3s ease;
}

/* Pulse animation for chain icons */
.pulse-glow .lucide-icon {
  animation: iconPulse 2s ease-in-out infinite;
}

@keyframes iconPulse {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.15);
    opacity: 0.9;
  }
}

/* Stagger animation for multiple icons */
.lucide-icon:nth-child(1) { animation-delay: 0ms; }
.lucide-icon:nth-child(2) { animation-delay: 100ms; }
.lucide-icon:nth-child(3) { animation-delay: 200ms; }
.lucide-icon:nth-child(4) { animation-delay: 300ms; }

/* Rotate animation for loading states */
.icon-loading {
  animation: iconRotate 1s linear infinite;
}

@keyframes iconRotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Bounce animation for scroll indicator */
.lucide-icon[data-icon="ChevronDown"] {
  animation: iconBounce 2s ease-in-out infinite;
}

@keyframes iconBounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(10px);
  }
}

body.admin-bar {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

body.admin-bar .site-header {
  top: 0 !important;
}

/* Ensure header is always on top */
.site-header {
  position: fixed !important;
  top: 0 !important;
  z-index: 9999 !important;
}

/* Additional animations and effects */
@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

.shimmer {
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.1),
        transparent
    );
    background-size: 200% 100%;
    animation: shimmer 2s linear infinite;
}

/* Product carousel enhancements */
.products-carousel {
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: var(--primary) var(--muted);
}

.products-carousel::-webkit-scrollbar {
    height: 8px;
}

.products-carousel::-webkit-scrollbar-track {
    background: var(--muted);
    border-radius: 4px;
}

.products-carousel::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 4px;
}

.products-carousel.active {
    cursor: grabbing;
}

/* Form enhancements */
.patrul-contact-form input:focus,
.patrul-contact-form textarea:focus,
.patrul-contact-form select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px hsl(var(--primary) / 0.1);
}

#contact-form-message.success {
    background-color: hsl(142, 76%, 36% / 0.1);
    border: 1px solid hsl(142, 76%, 36%);
    color: hsl(142, 76%, 36%);
}

#contact-form-message.error {
    background-color: hsl(var(--destructive) / 0.1);
    border: 1px solid var(--destructive);
    color: var(--destructive);
}

/* Loading states */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid var(--muted);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive improvements */
@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr !important;
    }
    
    .contact-section > .container > div {
        grid-template-columns: 1fr !important;
    }
    
    .products-carousel {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)) !important;
    }
}

/* Print styles */
@media print {
    .site-header,
    .site-footer,
    .btn,
    .mobile-menu-toggle {
        display: none !important;
    }
}
