:root {
  --primary-color: #2563eb;
  --primary-dark: #1e40af;
  --primary-light: #3b82f6;
  --secondary-color: #64748b;
  --success-color: #10b981;
  --warning-color: #f59e0b;
  --danger-color: #ef4444;
  --dark-color: #1e293b;
  --light-gray: #f8fafc;
  --medium-gray: #e2e8f0;
  --text-color: #334155;
  --border-radius: 8px;
  --box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --box-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Global Styles */
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: var(--text-color);
  line-height: 1.6;
}

/* Bootstrap Overrides */
.btn-primary {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  transition: all 0.3s ease;
}

.btn-primary:hover {
  background-color: var(--primary-dark);
  border-color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--box-shadow);
}

.btn-outline-primary {
  color: var(--primary-color);
  border-color: var(--primary-color);
  transition: all 0.3s ease;
}

.btn-outline-primary:hover {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  transform: translateY(-2px);
}

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

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

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

/* AI Image Placeholder Styling */
ai-img {
  display: block;
  background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
  position: relative;
  width: 100%;
  overflow: hidden;
}

ai-img::before {
  content: attr(alt);
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #6c757d;
  font-size: 12px;
  text-align: center;
  padding: 1rem;
  max-width: 80%;
  word-wrap: break-word;
}

ai-img::after {
  content: '📦';
  position: absolute;
  top: 10px;
  right: 10px;
  opacity: 0.5;
  font-size: 24px;
}

ai-img.rounded-circle {
  border-radius: 50%;
}

ai-img.card-img-top {
  border-radius: var(--border-radius) var(--border-radius) 0 0;
}

/* Navigation */
.navbar {
  padding: 1rem 0;
  transition: all 0.3s ease;
}

.navbar-brand ai-img {
  height: 45px;
  width: 150px;
}

.nav-link {
  font-weight: 500;
  color: var(--text-color);
  transition: color 0.3s ease;
  padding: 0.5rem 1rem !important;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary-color);
}

/* Promo Bar */
.promo-bar {
  font-size: 0.9rem;
  font-weight: 500;
}

.promo-bar .btn {
  font-size: 0.85rem;
  padding: 0.25rem 0.75rem;
  font-weight: 600;
}

/* Top Bar */
.top-bar {
  font-size: 0.875rem;
}

.top-bar a {
  transition: opacity 0.3s ease;
}

.top-bar a:hover {
  opacity: 0.8;
}

/* Hero Carousel */
.hero-carousel .carousel-item {
  min-height: 500px;
}

.hero-carousel ai-img {
  height: 600px;
  object-fit: cover;
}

.carousel-caption {
  background: rgba(30, 41, 59, 0.85);
  backdrop-filter: blur(10px);
  padding: 3rem;
  border-radius: var(--border-radius);
  bottom: 3rem;
  left: 10%;
  right: 10%;
}

.carousel-caption h1,
.carousel-caption h2 {
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

/* Stats Section */
.stat-card {
  padding: 2rem 1rem;
  transition: transform 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-5px);
}

.stat-card i {
  display: block;
}

/* Product Cards */
.product-card {
  transition: all 0.3s ease;
  border: 1px solid var(--medium-gray);
  border-radius: var(--border-radius);
  overflow: hidden;
}

.product-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--box-shadow-lg);
  border-color: var(--primary-light);
}

.product-card ai-img {
  height: 250px;
  transition: transform 0.3s ease;
}

.product-card:hover ai-img {
  transform: scale(1.05);
}

.product-card .card-body {
  padding: 1.5rem;
}

.product-card .card-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--dark-color);
  margin-bottom: 0.5rem;
}

/* Solution Cards */
.card {
  transition: all 0.3s ease;
  border: none;
  border-radius: var(--border-radius);
  overflow: hidden;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--box-shadow-lg);
}

.card ai-img {
  height: 250px;
  transition: transform 0.3s ease;
}

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

/* Testimonial Cards */
.card-body p {
  font-style: italic;
  color: var(--secondary-color);
}

/* Why Choose Section */
.bg-primary h2,
.bg-primary h6,
.bg-primary p,
.bg-primary .lead {
  color: #ffffff;
}

.bg-primary i {
  flex-shrink: 0;
}

/* Forms */
.form-control,
.form-select {
  border-radius: var(--border-radius);
  border: 1px solid var(--medium-gray);
  padding: 0.75rem 1rem;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.25);
}

.form-label {
  font-weight: 500;
  color: var(--dark-color);
  margin-bottom: 0.5rem;
}

/* Footer */
footer {
  background-color: var(--dark-color);
}

footer h5 {
  color: #ffffff;
  font-weight: 600;
  margin-bottom: 1.5rem;
}

footer a {
  transition: color 0.3s ease;
}

footer a:hover {
  color: var(--primary-light) !important;
}

/* Floating Buttons */
.floating-buttons {
  z-index: 1000;
}

.floating-buttons .btn {
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  box-shadow: var(--box-shadow);
}

.floating-buttons .btn:hover {
  transform: scale(1.1);
  box-shadow: var(--box-shadow-lg);
}

#backToTop {
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

#backToTop.visible {
  opacity: 1;
  visibility: visible;
}

/* Modal */
.modal-content {
  border-radius: var(--border-radius);
  border: none;
}

.modal-header {
  border-top-left-radius: var(--border-radius);
  border-top-right-radius: var(--border-radius);
  padding: 1.5rem;
}

.modal-body {
  padding: 2rem;
}

/* Badges */
.badge {
  padding: 0.5rem 1rem;
  font-weight: 600;
  border-radius: 50px;
}

/* Section Spacing */
section {
  padding: 5rem 0;
}

@media (max-width: 768px) {
  section {
    padding: 3rem 0;
  }

  .carousel-caption {
    padding: 1.5rem;
    left: 5%;
    right: 5%;
    bottom: 1rem;
  }

  .carousel-caption h1 {
    font-size: 1.75rem;
  }

  .carousel-caption h2 {
    font-size: 1.5rem;
  }
}

/* Breadcrumb */
.breadcrumb {
  background-color: transparent;
  padding: 1rem 0;
  margin-bottom: 0;
}

.breadcrumb-item + .breadcrumb-item::before {
  content: "›";
  color: var(--secondary-color);
}

.breadcrumb-item a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

.breadcrumb-item a:hover {
  color: var(--primary-dark);
}

.breadcrumb-item.active {
  color: var(--text-color);
}

/* Author Card */
.author-card {
  border-left: 4px solid var(--primary-color);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.author-card:hover {
  transform: translateX(5px);
  box-shadow: var(--box-shadow);
}

.author-card ai-img {
  width: 150px;
  height: 150px;
  border: 3px solid var(--primary-color);
}

/* Utility Classes */
.shadow-sm {
  box-shadow: var(--box-shadow) !important;
}

.rounded-3 {
  border-radius: var(--border-radius) !important;
}

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

.fade-in {
  animation: fadeIn 0.6s ease-out;
}

/* Print Styles */
@media print {
  .navbar,
  .promo-bar,
  .top-bar,
  .floating-buttons,
  footer,
  .modal {
    display: none !important;
  }
}

/* Accessibility */
.btn:focus,
.form-control:focus,
.form-select:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
  :root {
    --primary-color: #0047ab;
    --text-color: #000000;
  }
}

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