/**
 * 3M Industrial Adhesives & Tapes - Custom Styles
 * Compliant with CLAUDE.md specifications
 */

:root {
  --primary-color: #0066cc;
  --secondary-color: #6c757d;
  --success-color: #28a745;
  --danger-color: #dc3545;
  --warning-color: #ffc107;
  --info-color: #17a2b8;
}

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

ai-img::before {
  content: attr(alt);
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: rgba(255, 255, 255, 0.3);
  font-size: 11px;
  text-align: center;
  padding: 1rem;
  max-width: 90%;
  word-wrap: break-word;
  font-weight: 300;
  letter-spacing: 0.5px;
}

ai-img::after {
  content: '📷';
  position: absolute;
  top: 15px;
  right: 15px;
  font-size: 20px;
  opacity: 0.2;
}

/* Logo specific styling */
ai-img[logo="true"]::after {
  content: '🏢';
}

/* Rounded image variants */
ai-img.rounded-circle {
  border-radius: 50%;
}

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

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

ai-img.img-fluid {
  max-width: 100%;
  height: auto;
}

/* 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;
}

.product-card:hover,
.product-category-card:hover,
.solution-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 40px rgba(0, 102, 204, 0.2) !important;
}

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

.author-card:hover {
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  transform: translateX(5px);
}

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

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

/* Back to Top Button */
#backToTop {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

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

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

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

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

.promo-bar .btn-sm {
  padding: 0.25rem 0.75rem;
  font-size: 0.875rem;
}

/* Hero Carousel */
#heroCarousel {
  position: relative;
}

#heroCarousel .carousel-inner {
  min-height: 500px;
}

#heroCarousel .carousel-item {
  min-height: 500px;
  position: relative;
}

#heroCarousel .carousel-item ai-img {
  width: 100%;
  min-height: 500px;
  height: 700px;
  max-height: 700px;
  background: linear-gradient(135deg, #1a2332 0%, #2c3e50 50%, #34495e 100%);
}

/* Hero轮播图片特殊样式 - 深色背景 */
#heroCarousel .carousel-item ai-img::before {
  color: rgba(255, 255, 255, 0.15);
  font-size: 10px;
}

#heroCarousel .carousel-item ai-img::after {
  opacity: 0.1;
}

.carousel-caption {
  position: absolute;
  bottom: 15%;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.75);
  padding: 2.5rem 3rem;
  border-radius: 12px;
  max-width: 85%;
  z-index: 10;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.carousel-caption h1 {
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.9);
  color: #ffffff;
  margin-bottom: 1rem;
  font-weight: 700;
  line-height: 1.2;
}

.carousel-caption .lead {
  color: #e9ecef;
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
  line-height: 1.5;
}

.carousel-caption .btn-primary {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  box-shadow: 0 4px 12px rgba(0, 102, 204, 0.4);
}

.carousel-caption .btn-outline-light {
  border-color: rgba(255, 255, 255, 0.8);
}

.carousel-caption .btn-outline-light:hover {
  background-color: rgba(255, 255, 255, 0.9);
  color: #2c3e50;
}

/* Badge Styling */
.badge {
  padding: 0.4em 0.8em;
  font-weight: 500;
}

/* Form Validation Styles */
.was-validated .form-control:invalid {
  border-color: var(--danger-color);
}

.was-validated .form-control:valid {
  border-color: var(--success-color);
}

/* Accordion Customization */
.accordion-button:not(.collapsed) {
  background-color: #e7f3ff;
  color: var(--primary-color);
}

.accordion-button:focus {
  box-shadow: 0 0 0 0.25rem rgba(0, 102, 204, 0.25);
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  #heroCarousel .carousel-inner {
    min-height: 400px;
  }

  #heroCarousel .carousel-item {
    min-height: 400px;
  }

  #heroCarousel .carousel-item ai-img {
    min-height: 400px;
    height: 500px;
  }

  .carousel-caption {
    bottom: 10%;
    padding: 1.5rem;
  }

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

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

  .carousel-caption .btn {
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
  }

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

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

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

  .floating-buttons .btn {
    width: 45px;
    height: 45px;
  }
}

@media (max-width: 576px) {
  #heroCarousel .carousel-inner {
    min-height: 350px;
  }

  #heroCarousel .carousel-item {
    min-height: 350px;
  }

  #heroCarousel .carousel-item ai-img {
    min-height: 350px;
    height: 400px;
  }

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

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

  .carousel-caption .lead {
    font-size: 0.875rem;
    display: none; /* Hide on very small screens to save space */
  }

  .carousel-caption .btn {
    font-size: 0.75rem;
    padding: 0.4rem 0.8rem;
  }

  .promo-bar span {
    font-size: 12px;
  }

  .promo-bar .btn-sm {
    font-size: 0.75rem;
    padding: 0.2rem 0.5rem;
  }

  ai-img::before {
    font-size: 10px;
  }
}
