@import url("https://fonts.googleapis.com/css2?family=Lato:wght@300;400;700;900&display=swap");
@tailwind base;
@tailwind components;
@tailwind utilities;

@layer base {
  * {
    @apply border-border;
  }
  body {
    @apply bg-background text-foreground;
    font-family: "Lato", sans-serif;
  }
}

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

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

::-webkit-scrollbar-thumb {
  background: #e9ecef;
  border-radius: 3px;
}

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

/* Smooth transitions */
* {
  transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow,
    transform;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 200ms;
}

/* Focus styles */
button:focus-visible,
input:focus-visible,
a:focus-visible {
  outline: 2px solid #f97316;
  outline-offset: 2px;
}

/* Consistent rounded corners */
.rounded-xl {
  border-radius: 0.75rem;
}

.rounded-lg {
  border-radius: 0.5rem;
}

/* Modern card hover effects */
.group:hover .group-hover\:shadow-lg {
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Orange theme colors */
:root {
  --orange-50: #fff7ed;
  --orange-100: #ffedd5;
  --orange-200: #fed7aa;
  --orange-300: #fdba74;
  --orange-400: #fb923c;
  --orange-500: #f97316;
  --orange-600: #ea580c;
  --orange-700: #c2410c;
  --orange-800: #9a3412;
  --orange-900: #7c2d12;
}

/* Dropdown menu styles */
.dropdown-menu {
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
}

.dropdown-menu.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Mobile menu animation */
.mobile-menu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.mobile-menu.show {
  max-height: 500px;
}

/* Loading animation */
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.animate-spin {
  animation: spin 1s linear infinite;
}

/* Pulse animation */
@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

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

/* Text truncation */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Custom button styles */
.btn-primary {
  @apply inline-flex items-center px-4 py-2 bg-orange-500 text-white font-medium rounded-lg hover:bg-orange-600 transition-colors;
}

.btn-secondary {
  @apply inline-flex items-center px-4 py-2 bg-gray-100 text-gray-700 font-medium rounded-lg hover:bg-gray-200 transition-colors;
}

/* Card styles */
.card {
  @apply bg-white rounded-xl p-6 border border-gray-100;
}

.card-hover {
  @apply hover:shadow-lg transition-all duration-300 group-hover:border-orange-200;
}

/* Responsive image container */
.img-container {
  position: relative;
  overflow: hidden;
}

.img-container img {
  transition: transform 0.3s ease;
}

.img-container:hover img {
  transform: scale(1.05);
}

/* Custom form styles */
.form-input {
  @apply w-full px-4 py-2 bg-gray-100 border-0 rounded-lg focus:outline-none focus:ring-2 focus:ring-orange-500 focus:bg-white transition-all;
}

.form-button {
  @apply px-6 py-2 bg-orange-500 text-white font-medium rounded-lg hover:bg-orange-600 transition-colors;
}

/* Breadcrumb styles */
.breadcrumb {
  @apply flex items-center space-x-1 text-sm text-gray-500 overflow-x-auto;
}

.breadcrumb a {
  @apply hover:text-orange-500 transition-colors whitespace-nowrap;
}

/* Share button styles */
.share-button {
  @apply flex items-center justify-center px-3 py-2 rounded-lg transition-colors text-sm font-medium;
}

.share-facebook {
  @apply bg-blue-600 text-white hover:bg-blue-700;
}

.share-twitter {
  @apply bg-black text-white hover:bg-gray-800;
}

.share-whatsapp {
  @apply bg-green-500 text-white hover:bg-green-600;
}

.share-telegram {
  @apply bg-blue-500 text-white hover:bg-blue-600;
}

.share-reddit {
  @apply bg-orange-600 text-white hover:bg-orange-700;
}

/* Utility classes */
.text-truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bg-pattern {
  background-image: radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.15) 1px, transparent 0);
  background-size: 20px 20px;
}

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

/* High contrast mode support */
@media (prefers-contrast: high) {
  .card {
    @apply border-2 border-gray-300;
  }

  .btn-primary {
    @apply border-2 border-orange-700;
  }
}

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