/* ===================================
   JD International - Custom Styles
   =================================== */

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* CSS Variables for Consistent Theming */
:root {
  /* JD International Color Palette */
  --primary: #0A1F44; /* Navy Blue */
  --primary-light: #1a2f54;
  --primary-dark: #051022;
  
  /* Accent Colors */
  --accent: #F97316; /* Saffron/Orange */
  --accent-light: #fb923c;
  --accent-dark: #ea580c;
  
  /* Neutral Colors */
  --white: #FFFFFF;
  --light-gray: #F3F4F6;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  
  /* Success Colors */
  --success: #10b981;
  --success-light: #34d399;
  
  /* Typography */
  --font-display: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  
  /* Spacing Scale */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  
  /* Border Radius */
  --radius-sm: 0.25rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;
  --radius-full: 9999px;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  
  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-normal: 300ms ease;
  --transition-slow: 500ms ease;
}

/* Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  line-height: 1.6;
  color: var(--gray-900);
  background-color: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Typography Classes */
.font-inter {
  font-family: var(--font-body);
}

/* Glassmorphism Effect */
.glass-morphism {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: var(--shadow-md);
}

/* Navigation Styles */
#navigation {
  transition: all var(--transition-normal);
}

#navigation.scrolled {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--shadow-md);
}

/* Dropdown Menu Styles */
.dropdown-menu {
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all var(--transition-normal);
}

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

/* Dropdown Arrow Animation */
.dropdown-arrow {
  transition: transform var(--transition-normal);
}

.dropdown-arrow.rotate {
  transform: rotate(180deg);
}

/* Popup Modal Styles */
#quote-popup {
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
}

#quote-popup.show {
  opacity: 1;
  visibility: visible;
}

#quote-popup.show #popup-content {
  transform: scale(1);
  opacity: 1;
}

#popup-backdrop {
  transition: all var(--transition-normal);
}

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

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.05);
    opacity: 0.8;
  }
}

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

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

@keyframes spin-slow {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes spin-reverse {
  from {
    transform: rotate(360deg);
  }
  to {
    transform: rotate(0deg);
  }
}

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

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

/* File Upload Area */
.file-upload-area {
  cursor: pointer;
  transition: all var(--transition-normal);
}

.file-upload-area:hover {
  border-color: var(--accent);
  background-color: rgba(59, 130, 246, 0.05);
}

.file-upload-area.dragover {
  border-color: var(--accent);
  background-color: rgba(59, 130, 246, 0.1);
  transform: scale(1.02);
}

/* Mobile Menu Styles */
#mobile-menu {
  transition: all var(--transition-normal);
  transform-origin: top;
}

#mobile-menu.hidden {
  opacity: 0;
  transform: translateY(-10px);
}

#mobile-menu.show {
  opacity: 1;
  transform: translateY(0);
}

/* Navigation Link Active State */
.nav-link.active {
  background: var(--white);
  color: var(--primary);
  font-weight: 600;
}

/* Magnetic Button Effect */
.magnetic-button {
  position: relative;
  transition: all var(--transition-fast);
  transform-origin: center;
}

.magnetic-button:hover {
  transform: scale(1.05);
}

.magnetic-button:active {
  transform: scale(0.98);
}

/* Hover Lift Effect */
.hover-lift {
  transition: all var(--transition-normal);
  cursor: pointer;
}

.hover-lift:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}

/* Fade In Animation */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: all var(--transition-slow);
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Industry Cards */
.industry-card {
  border: 1px solid var(--gray-200);
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.industry-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--accent), var(--accent-dark));
  transform: scaleX(0);
  transition: transform var(--transition-normal);
}

.industry-card:hover::before {
  transform: scaleX(1);
}

.industry-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-lg);
}

/* Product Cards */
.product-card {
  border: 1px solid var(--gray-200);
  transition: all var(--transition-normal);
}

.product-card:hover {
  box-shadow: var(--shadow-xl);
  border-color: var(--accent);
}

/* Form Styles */
.label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gray-700);
  margin-bottom: 0.5rem;
}

input, textarea, select {
  transition: all var(--transition-fast);
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Button Styles */
button {
  transition: all var(--transition-normal);
  cursor: pointer;
}

button:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

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

::-webkit-scrollbar-track {
  background: var(--gray-100);
}

::-webkit-scrollbar-thumb {
  background: var(--gray-400);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--gray-500);
}

/* Selection Color */
::selection {
  background-color: var(--accent);
  color: var(--white);
}

/* Focus Visible for Accessibility */
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Loading State */
.loading {
  opacity: 0;
  animation: fadeIn 0.6s ease-out forwards;
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

/* Responsive Design Helpers */
@media (max-width: 768px) {
  .fade-in {
    transform: translateY(20px);
  }
  
  .hover-lift:hover {
    transform: translateY(-2px);
  }
}

/* Print Styles */
@media print {
  .glass-morphism {
    background: var(--white);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  
  #navigation {
    position: static;
    background: var(--white);
  }
  
  .magnetic-button {
    transform: none;
  }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
  .glass-morphism {
    background: var(--white);
    border: 2px solid var(--gray-900);
  }
  
  .industry-card,
  .product-card {
    border: 2px solid var(--gray-900);
  }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Dark Mode Support (Future Enhancement) */
@media (prefers-color-scheme: dark) {
  :root {
    --white: #0f172a;
    --gray-900: #ffffff;
    --gray-800: #f1f5f9;
    --gray-700: #e2e8f0;
    --gray-600: #cbd5e1;
    --gray-500: #94a3b8;
    --gray-400: #64748b;
    --gray-300: #475569;
    --gray-200: #334155;
    --gray-100: #1e293b;
    --gray-50: #0f172a;
  }
  
  .glass-morphism {
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.1);
  }
  
  #navigation.scrolled {
    background: rgba(15, 23, 42, 0.95);
  }
}

/* Utility Classes */
.text-gradient {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.bg-gradient-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
}

.border-gradient {
  position: relative;
  background: linear-gradient(var(--white), var(--white)) padding-box,
              linear-gradient(135deg, var(--accent), var(--accent-dark)) border-box;
  border: 2px solid transparent;
}

/* Performance Optimizations */
.will-change-transform {
  will-change: transform;
}

.gpu-accelerated {
  transform: translateZ(0);
  backface-visibility: hidden;
  perspective: 1000px;
}

/* Error States */
.error {
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1) !important;
}

.error-message {
  color: #ef4444;
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

/* Success States */
.success {
  border-color: var(--success) !important;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1) !important;
}

.success-message {
  color: var(--success);
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

/* ===================================
   JD International Color Classes
   =================================== */

/* Header Styling */
.header-navy {
  background-color: var(--primary) !important;
}

.header-navy .nav-link {
  color: var(--white) !important;
}

.header-navy .nav-link:hover {
  background-color: rgba(255, 255, 255, 0.1) !important;
}

/* Button Styling */
.btn-saffron {
  background-color: var(--accent) !important;
  color: var(--white) !important;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn-saffron:hover {
  background-color: var(--accent-dark) !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3);
}

/* Product Section Styling */
.product-section {
  background-color: var(--white) !important;
}

.product-heading {
  color: var(--primary) !important;
}

.product-card {
  background-color: var(--light-gray) !important;
  border: 1px solid var(--gray-200);
}

/* Footer Styling */
.footer-navy {
  background-color: var(--primary) !important;
  color: var(--white) !important;
}

.footer-navy a {
  color: var(--white) !important;
}

.footer-navy a:hover {
  color: var(--accent) !important;
}

.footer-saffron-accent {
  color: var(--accent) !important;
}

/* Glass Morphism with Navy */
.glass-morphism-navy {
  background: rgba(10, 31, 68, 0.95) !important;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Override existing blue colors */
.bg-blue-600 {
  background-color: var(--primary) !important;
}

.bg-blue-500 {
  background-color: var(--primary) !important;
}

.text-blue-600 {
  color: var(--primary) !important;
}

.text-blue-500 {
  color: var(--primary) !important;
}

.hover\:bg-blue-700:hover {
  background-color: var(--primary-dark) !important;
}

.hover\:bg-blue-800:hover {
  background-color: var(--primary-dark) !important;
}

.hover\:text-blue-600:hover {
  color: var(--primary) !important;
}

/* Override orange/saffron colors */
.bg-orange-500 {
  background-color: var(--accent) !important;
}

.bg-orange-600 {
  background-color: var(--accent) !important;
}

.text-orange-600 {
  color: var(--accent) !important;
}

.hover\:bg-orange-700:hover {
  background-color: var(--accent-dark) !important;
}

/* Footer specific overrides */
.bg-slate-900 {
  background-color: var(--primary) !important;
}

.bg-gray-50 {
  background-color: var(--light-gray) !important;
}
