/* ============================================
   ArtForever - Custom Styles
   (Supplements Tailwind CDN)
   ============================================ */

/* Base responsive font sizes */
html {
  font-size: 14px;
  scroll-behavior: smooth;
}

@media (min-width: 640px) {
  html {
    font-size: 16px;
  }
}

/* Custom Animations */
@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@keyframes pulse-glow {
  0%, 100% {
    box-shadow: 0 0 20px rgba(22, 163, 74, 0.3);
  }
  50% {
    box-shadow: 0 0 40px rgba(22, 163, 74, 0.6);
  }
}

/* Utility Classes */
.animate-fade-in-up {
  animation: fade-in-up 0.8s ease-out forwards;
}

.delay-200 {
  animation-delay: 200ms;
}

.delay-400 {
  animation-delay: 400ms;
}

.delay-600 {
  animation-delay: 600ms;
}

.delay-800 {
  animation-delay: 800ms;
}

.delay-1000 {
  animation-delay: 1000ms;
}

.delay-2000 {
  animation-delay: 2000ms;
}

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

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

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
}

@media (min-width: 640px) {
  ::-webkit-scrollbar {
    width: 8px;
  }
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(to bottom, #16a34a, #22c55e);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(to bottom, #15803d, #16a34a);
}

/* Form Focus States */
input:focus,
textarea:focus,
select:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.1);
}

/* Button Hover Effects */
.btn-gradient {
  background: linear-gradient(135deg, #16a34a, #22c55e);
  transition: all 0.3s ease;
}

.btn-gradient:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(22, 163, 74, 0.3);
}

/* Card Hover Effects */
.card-hover {
  transition: all 0.3s ease;
}

.card-hover:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* Text Gradient */
.text-gradient {
  background: linear-gradient(135deg, #16a34a, #22c55e);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Header scroll state */
.header-scrolled {
  background: rgba(255, 255, 255, 0.95) !important;
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Gallery filter animation */
.gallery-item {
  transition: all 0.4s ease;
}

.gallery-item.hidden-item {
  opacity: 0;
  transform: scale(0.8);
  position: absolute;
  pointer-events: none;
  height: 0;
  overflow: hidden;
  margin: 0;
  padding: 0;
}

/* Gallery filter active state */
.gallery-filter.active {
  background: linear-gradient(to right, #16a34a, #fde047) !important;
  color: white !important;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1) !important;
}

.gallery-filter:not(.active) {
  background: white;
  color: #4b5563;
}

.gallery-filter:not(.active):hover {
  background: #f9fafb;
}

/* Loading Animation */
.loading-dots {
  display: inline-block;
}

.loading-dots::after {
  content: '';
  animation: loading-dots 1.5s infinite;
}

@keyframes loading-dots {
  0%, 20% { content: ''; }
  40% { content: '.'; }
  60% { content: '..'; }
  80%, 100% { content: '...'; }
}

/* Responsive Design Helpers */
@media (max-width: 640px) {
  .text-responsive {
    font-size: clamp(1.25rem, 5vw, 2rem);
  }
  
  /* Ensure touch targets are at least 44px */
  button, a {
    min-height: 44px;
  }
  
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

/* Improve text readability on mobile */
@media (max-width: 640px) {
  body {
    line-height: 1.6;
  }
  
  p, li {
    line-height: 1.7;
  }
}

/* Print Styles */
@media print {
  .no-print {
    display: none !important;
  }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Mobile-specific improvements */
@media (max-width: 640px) {
  input, textarea, select {
    font-size: 16px; /* Prevents zoom on iOS */
  }
}

/* Tablet optimizations */
@media (min-width: 641px) and (max-width: 1024px) {
  .container {
    padding-left: 2rem;
    padding-right: 2rem;
  }
}
