:root {
  --primary-color: #4d148c;
  --secondary-color: #ff6200;
  --dark-bg: #2d2d2d;
  --light-bg: #f8f9fa;
  --text-muted: #6c757d;
}

/* 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: 14px;
  text-align: center;
  padding: 1rem;
  max-width: 80%;
  font-weight: 500;
}

ai-img::after {
  content: '\1F4F7';
  position: absolute;
  top: 15px;
  right: 15px;
  opacity: 0.5;
  font-size: 24px;
}

ai-img[size^="1920x"] { aspect-ratio: 1920/600; }
ai-img[size^="800x"] { aspect-ratio: 800/600; }
ai-img[size^="400x"] { aspect-ratio: 400/300; }
ai-img[size^="180x"] { aspect-ratio: 180/50; height: 50px; }
ai-img[size^="150x"] { aspect-ratio: 1/1; height: 150px; }
ai-img[size^="60x"], ai-img[size^="80x"] { aspect-ratio: 1/1; }

ai-img.rounded-circle { border-radius: 50%; }
ai-img.card-img-top { border-radius: 8px 8px 0 0; }
ai-img.rounded { border-radius: 12px; }

/* Primary Color Override */
.bg-primary {
  background-color: var(--primary-color) !important;
}

.btn-primary {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

.btn-primary:hover {
  background-color: #3d0f6f;
  border-color: #3d0f6f;
}

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

.btn-outline-primary {
  color: var(--primary-color);
  border-color: var(--primary-color);
}

.btn-outline-primary:hover {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
}

/* Carousel Customization */
.carousel-caption {
  background: rgba(0, 0, 0, 0.6);
  padding: 2rem;
  border-radius: 10px;
  backdrop-filter: blur(5px);
}

/* Service Cards */
.service-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border-radius: 12px;
  overflow: hidden;
}

.service-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 40px rgba(77, 20, 140, 0.2) !important;
}

/* Stat Items */
.stat-item {
  padding: 1.5rem;
  transition: transform 0.3s ease;
}

.stat-item:hover {
  transform: scale(1.05);
}

/* Solution Icons */
.solution-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
}

.solution-icon i {
  color: white !important;
}

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

.author-card:hover {
  transform: translateX(10px);
}

/* Card Hover Effects */
.card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: none;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15) !important;
}

/* Floating Buttons */
.floating-buttons .btn {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease;
}

.floating-buttons .btn:hover {
  transform: scale(1.1);
}

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

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

/* Navigation Active State */
.navbar-nav .nav-link.active {
  color: var(--primary-color) !important;
  font-weight: 600;
}

.navbar-nav .nav-link:hover {
  color: var(--primary-color) !important;
}

/* Footer Links */
footer a:hover {
  color: var(--secondary-color) !important;
}

/* Promo Bar */
.promo-bar {
  font-weight: 500;
  letter-spacing: 0.5px;
}

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

.breadcrumb-item + .breadcrumb-item::before {
  color: var(--text-muted);
}

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

/* Filter Sidebar */
.filter-sidebar {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
}

.filter-group {
  border-bottom: 1px solid #e9ecef;
  padding-bottom: 1rem;
  margin-bottom: 1rem;
}

.filter-group:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

/* Timeline */
.timeline {
  position: relative;
  padding-left: 40px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 10px;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(to bottom, var(--primary-color), var(--secondary-color));
}

.timeline-item {
  position: relative;
  padding-bottom: 2rem;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -34px;
  top: 5px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: white;
  border: 3px solid var(--primary-color);
  box-shadow: 0 0 0 4px rgba(77, 20, 140, 0.1);
}

/* Form Styling */
.form-control:focus,
.form-select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.25rem rgba(77, 20, 140, 0.25);
}

/* Modal */
.modal-header {
  border-bottom: none;
}

.modal-content {
  border-radius: 12px;
  overflow: hidden;
}

/* Badge Custom */
.badge {
  padding: 0.5em 1em;
  font-weight: 500;
}

/* Blog Cards */
.blog-card {
  overflow: hidden;
  border-radius: 12px;
  transition: all 0.3s ease;
}

.blog-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.15);
}

.blog-meta {
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* CTA Section */
.cta-section {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  padding: 4rem 0;
  border-radius: 12px;
}

/* Product Grid */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

@media (max-width: 768px) {
  .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
  }
}

/* Price Tag */
.price-tag {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--secondary-color);
}

/* Feature List */
.feature-list {
  list-style: none;
  padding-left: 0;
}

.feature-list li {
  padding: 0.5rem 0;
  position: relative;
  padding-left: 2rem;
}

.feature-list li::before {
  content: '\2713';
  position: absolute;
  left: 0;
  color: var(--primary-color);
  font-weight: bold;
  font-size: 1.2rem;
}

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

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

/* Responsive Adjustments */
@media (max-width: 992px) {
  .carousel-caption h1 {
    font-size: 2rem;
  }

  .carousel-caption p {
    font-size: 1rem;
  }

  .display-4 {
    font-size: 2.5rem;
  }

  .display-5 {
    font-size: 2rem;
  }
}

@media (max-width: 576px) {
  .carousel-caption {
    padding: 1rem;
  }

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

  .stat-item h2 {
    font-size: 2rem;
  }

  .floating-buttons {
    margin-bottom: 1rem !important;
    margin-right: 1rem !important;
  }
}
