:root {
  --primary-color: #dc3545;
  --primary-hover: #bb2d3b;
  --secondary-color: #6c757d;
  --success-color: #198754;
  --danger-color: #dc3545;
}

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

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

ai-img::after {
  content: '⚠️';
  position: absolute;
  top: 10px;
  right: 10px;
  opacity: 0.6;
  font-size: 20px;
}

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

ai-img.card-img-top {
  border-radius: 8px 8px 0 0;
}

ai-img.rounded {
  border-radius: 8px;
}

/* Logo specific styling */
ai-img[logo="true"] {
  background: linear-gradient(135deg, #dc3545 0%, #bb2d3b 100%);
}

ai-img[logo="true"]::before {
  content: 'LABELMASTER';
  color: white;
  font-weight: bold;
  font-size: 14px;
  letter-spacing: 2px;
}

ai-img[logo="true"]::after {
  content: '⚠️';
  color: white;
}

/* Author Card Styling */
.author-card {
  border-left: 4px solid var(--primary-color);
}

/* 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(220, 53, 69, 0.15);
}

/* Floating Buttons */
.floating-buttons .btn {
  width: 50px;
  height: 50px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

#backToTop {
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

#backToTop.visible {
  opacity: 1;
  pointer-events: all;
}

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

/* Navigation */
.navbar {
  padding-top: 1rem;
  padding-bottom: 1rem;
}

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

.nav-link {
  font-weight: 500;
  padding: 0.5rem 1rem;
  transition: color 0.3s ease;
}

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

/* Primary Button */
.btn-danger {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn-danger:hover {
  background-color: var(--primary-hover);
  border-color: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

/* Hero Carousel Banner */
.carousel-item {
  position: relative;
  height: 600px;
}

.carousel-item ai-img {
  width: 100%;
  height: 600px;
  object-fit: cover;
}

.carousel-caption {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  background: rgba(0, 0, 0, 0.5);
  padding: 3rem;
  border-radius: 10px;
  backdrop-filter: blur(10px);
  width: 80%;
  max-width: 800px;
}

.carousel-caption h1,
.carousel-caption h2 {
  color: white;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8);
  margin-bottom: 1rem;
}

.carousel-caption p {
  color: white;
  text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.8);
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
  width: 3rem;
  height: 3rem;
}

.carousel-indicators button {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: var(--primary-color);
}

/* Page Banner */
.page-banner {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.bg-gradient-danger {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
}

/* Timeline (About Page) */
.timeline-item {
  position: relative;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: 80px;
  top: 20px;
  bottom: -20px;
  width: 2px;
  background: linear-gradient(to bottom, var(--primary-color), transparent);
}

.timeline-item:last-child::before {
  display: none;
}

/* Badge Styling */
.badge {
  font-weight: 600;
  padding: 0.5rem 0.75rem;
}

/* Alert Styling */
.alert {
  border-left: 4px solid;
}

.alert-danger {
  border-left-color: var(--danger-color);
}

.alert-warning {
  border-left-color: #ffc107;
}

/* Form Styling */
.form-label {
  font-weight: 600;
  color: #495057;
  margin-bottom: 0.5rem;
}

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

.was-validated .form-control:invalid,
.was-validated .form-select:invalid {
  border-color: var(--danger-color);
}

/* Footer */
footer a {
  text-decoration: none;
  transition: color 0.3s ease;
}

footer a:hover {
  color: white !important;
}

/* Blog Article Content */
.article-content h2 {
  margin-top: 2rem;
  margin-bottom: 1rem;
  color: #212529;
  font-weight: 700;
}

.article-content h3 {
  margin-top: 1.5rem;
  margin-bottom: 1rem;
  color: #495057;
  font-weight: 600;
}

.article-content p {
  line-height: 1.8;
  margin-bottom: 1rem;
}

.article-content ul,
.article-content ol {
  line-height: 1.8;
  margin-bottom: 1rem;
}

.article-content blockquote {
  font-style: italic;
  color: #6c757d;
}

.article-content table {
  margin-bottom: 1.5rem;
}

.article-content a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
}

.article-content a:hover {
  text-decoration: underline;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .timeline-item::before {
    display: none;
  }

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

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

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

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

  .carousel-item ai-img {
    height: 500px;
  }

  .carousel-caption {
    padding: 2rem 1.5rem;
    width: 90%;
  }

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

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

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

/* Loading animation for ai-img */
@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

ai-img {
  animation: pulse 2s ease-in-out infinite;
}
