/* Custom animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { 
    opacity: 0;
    transform: translateY(30px);
  }
  to { 
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes bounce-gentle {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-10px);
  }
  60% {
    transform: translateY(-5px);
  }
}

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

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

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

::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Custom gradient backgrounds */
.gradient-hero {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.gradient-primary {
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
}

.gradient-secondary {
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
}

/* 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);
}

/* Button animations */
.btn-primary {
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  transition: all 0.3s ease;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(59, 130, 246, 0.4);
}

.btn-secondary {
  border: 2px solid #3b82f6;
  color: #3b82f6;
  transition: all 0.3s ease;
}

.btn-secondary:hover {
  background: #3b82f6;
  color: white;
  transform: translateY(-2px);
}

/* Navigation dropdown improvements */
.nav-dropdown {
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

/* Hero section improvements */
.hero-pattern {
  background-image: radial-gradient(circle, rgba(59, 130, 246, 0.1) 1px, transparent 1px);
  background-size: 30px 30px;
}

/* Feature card styles */
.feature-card {
  background: white;
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  border: 1px solid rgba(59, 130, 246, 0.1);
}

.feature-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(59, 130, 246, 0.15);
  border-color: rgba(59, 130, 246, 0.2);
}

/* Icon styles */
.icon-primary {
  color: #3b82f6;
}

.icon-secondary {
  color: #6366f1;
}

.icon-success {
  color: #10b981;
}

.icon-warning {
  color: #f59e0b;
}

/* Text gradient */
.text-gradient {
  background: linear-gradient(135deg, #3b82f6 0%, #6366f1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Loading states */
.loading {
  opacity: 0.6;
  pointer-events: none;
}

/* Responsive images */
img {
  max-width: 100%;
  height: auto;
}

/* Remove default focus outline for cleaner appearance */
button:focus,
a:focus,
button:focus-visible,
a:focus-visible,
input:focus,
textarea:focus,
select:focus {
  outline: none;
}

/* Optional: Add subtle focus indication for keyboard navigation only */
button:focus-visible,
a:focus-visible {
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

/* Remove tap highlight on mobile */
* {
  -webkit-tap-highlight-color: transparent;
}

/* Prevent blue highlight on click for all interactive elements */
button,
a,
input,
textarea,
select,
[role="button"],
[tabindex] {
  -webkit-tap-highlight-color: transparent;
  outline: none;
}

/* Remove focus outline from all elements by default */
*:focus {
  outline: none;
}

/* Mobile navigation improvements */
@media (max-width: 768px) {
  .mobile-nav {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }
  
  .mobile-nav.active {
    transform: translateX(0);
  }
}

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

/* Global site max width container */
:root {
  --site-max-width: 1520px;

  /* Global nav style tokens (can be overridden from backend one day) */
  --nav-text: #374151;           /* gray-700 */
  --nav-hover: #4f46e5;          /* indigo-600 */
  --nav-bg: rgba(255,255,255,0.95);
  --nav-border: #f3f4f6;         /* gray-100 */
}

/* Line clamp utilities for text truncation */
.line-clamp-1 {
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
}

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

.line-clamp-3 {
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.site-container {
  max-width: var(--site-max-width);
  margin-left: auto;
  margin-right: auto;
  width: 100%;
}

/* Global nav helpers */
.global-nav {
  background: var(--nav-bg);
  border-color: var(--nav-border);
}
.global-nav a.nav-link {
  color: var(--nav-text);
}
.global-nav a.nav-link:hover {
  color: var(--nav-hover);
}

/* Scroll to Top Button */
#scroll-to-top {
  transition: opacity 0.3s ease, transform 0.3s ease, background-color 0.3s ease;
}

#scroll-to-top:hover {
  transform: scale(1.1);
}

#scroll-to-top:active {
  transform: scale(0.95);
}

/* Smooth fade in/out transitions for the button */
#scroll-to-top.opacity-100 {
  opacity: 1;
}

#scroll-to-top.opacity-0 {
  opacity: 0;
}

/* Pointer events control */
#scroll-to-top.pointer-events-auto {
  pointer-events: auto;
}

#scroll-to-top.pointer-events-none {
  pointer-events: none;
}
