/* Custom styles for Heavy Equipment Sales website */

/* Custom animations and effects */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up {
  animation: fadeInUp 0.6s ease-out;
}

/* Custom hover effects */
.hover-scale {
  transition: transform 0.3s ease;
}

.hover-scale:hover {
  transform: scale(1.05);
}

/* Equipment category icons */
.equipment-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
}

/* Custom button styles */
.btn-primary {
  background: linear-gradient(135deg, #C53030 0%, #9B2C2C 100%);
  color: white;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #9B2C2C 0%, #742A2A 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(197, 48, 48, 0.3);
}

.btn-secondary {
  background: transparent;
  color: #1B365D;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  transition: all 0.3s ease;
  border: 2px solid #1B365D;
}

.btn-secondary:hover {
  background: #1B365D;
  color: white;
  transform: translateY(-2px);
}

/* Card hover effects */
.card {
  transition: all 0.3s ease;
  border-radius: 12px;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* Mobile menu styles */
@media (max-width: 768px) {
  .mobile-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #1E3A8A;
    padding: 1rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  }
  
  .mobile-menu.active {
    display: block;
  }
  
  .mobile-menu a {
    display: block;
    color: white;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    text-decoration: none;
  }
  
  .mobile-menu a:hover {
    color: #C53030;
  }
}

/* Hero section background pattern */
.hero-bg {
  background: linear-gradient(135deg, #1B365D 0%, #2C5AA0 50%, #1e40af 100%);
  position: relative;
  overflow: hidden;
}

.hero-bg::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="2" fill="rgba(255,255,255,0.1)"/><circle cx="60" cy="70" r="1.5" fill="rgba(255,255,255,0.1)"/><circle cx="80" cy="40" r="1" fill="rgba(255,255,255,0.1)"/></svg>');
  opacity: 0.3;
}

/* Form styles */
.form-input {
  transition: all 0.3s ease;
  border: 2px solid #e5e7eb;
}

.form-input:focus {
  border-color: #C53030;
  box-shadow: 0 0 0 3px rgba(197, 48, 48, 0.1);
  outline: none;
}

/* Equipment grid responsive layout */
.equipment-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

/* Price display styling */
.price {
  color: #C53030;
  font-size: 1.5rem;
  font-weight: bold;
}

/* Status badges */
.status-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-available {
  background: #10b981;
  color: white;
}

.status-pending {
  background: #f59e0b;
  color: white;
}

.status-sold {
  background: #ef4444;
  color: white;
}

/* Loading animation */
.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(197, 48, 48, 0.3);
  border-radius: 50%;
  border-top-color: #C53030;
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Print styles */
@media print {
  .no-print {
    display: none;
  }
  
  .print-only {
    display: block;
  }
  
  body {
    font-size: 12pt;
    line-height: 1.4;
  }
}

/* Accessibility improvements */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Focus states for keyboard navigation */
a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus {
  outline: 2px solid #C53030;
  outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .btn-primary {
    border: 2px solid currentColor;
  }

  .card {
    border: 1px solid currentColor;
  }
}

/* Form error highlighting */
.error-field {
  border-color: #dc2626 !important;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1) !important;
  background-color: #fef2f2 !important;
}

.field-error {
  animation: fadeInDown 0.3s ease-out;
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}