/* Base Styles */
:root {
  --primary: #1a56db;
  --secondary: #1e429f;
  --accent: #f59e0b;
  --dark: #1f2937;
  --light: #f9fafb;
  --text: #374151;
  --text-light: #6b7280;
  --success: #10b981;
  --error: #ef4444;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Responsive Typography */
html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

@media (min-width: 1024px) {
  html {
    font-size: 18px;
  }
}

/* Container Responsive Padding */
.container-padding {
  @apply px-4 sm:px-6 lg:px-8;
}

/* Responsive Grid */
.grid-responsive {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

/* Responsive Images */
.img-responsive {
  width: 100%;
  height: auto;
  object-fit: cover;
}

/* Responsive Spacing */
.section-padding {
  @apply py-12 md:py-16 lg:py-24;
}

/* Responsive Navigation */
.nav-link {
  @apply block px-4 py-2 text-sm font-medium text-gray-700 hover:bg-gray-100 rounded-lg transition-colors md:inline-block md:py-0 md:px-3 md:hover:bg-transparent md:hover:text-blue-600;
}

/* Responsive Buttons */
.btn {
  @apply inline-flex items-center justify-center px-6 py-3 text-base font-medium rounded-lg transition-all duration-300 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500;
}

.btn-primary {
  @apply bg-blue-600 text-white hover:bg-blue-700 shadow-lg hover:shadow-xl transform hover:-translate-y-0.5;
}

.btn-secondary {
  @apply bg-white text-gray-700 border border-gray-300 hover:bg-gray-50 shadow hover:shadow-md;
}

/* Card Hover Effects */
.card-hover {
  @apply transition-all duration-300 transform hover:-translate-y-2 hover:shadow-xl;
}

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

.animate-float-delay {
  animation: float 6s ease-in-out 0.5s infinite;
}

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

.animate-pulse-slow {
  animation: pulse 4s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse-slow {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.8; }
}

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

::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #555;
}

/* Form Elements */
.input-field {
  @apply w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500 transition-colors;
}

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

.animate-fadeInUp {
  animation: fadeInUp 0.6s ease-out forwards;
}

/* Responsive Tables */
.table-responsive {
  @apply block w-full overflow-x-auto;
}

/* Print Styles */
@media print {
  .no-print {
    display: none !important;
  }
  
  body {
    font-size: 12pt;
    line-height: 1.3;
  }
  
  .print-padding {
    padding: 1cm;
  }
}

/* Carousel Core Behavior */
.carousel-track {
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    display: flex;
    gap: 1.5rem; /* Better spacing than space-x utilities */
}

/* Desktop – show 3 cards */
.carousel-card {
    flex: 0 0 calc(33.33% - 1rem);
    scroll-snap-align: start;
}

/* MOBILE FIX – show 100% for perfect card view */
@media (max-width: 768px) {
    .carousel-card {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

/* Optional UX flourish */
.carousel-track:active {
    cursor: grabbing;
}