/* ========================================
   Hallmark Packaging Custom Styles
   Primary Color: #8B2F7C (Purple-Red)
   ======================================== */

:root {
  --primary-color: #8B2F7C;
  --primary-dark: #6B1F5C;
  --primary-light: #AB4F9C;
  --secondary-color: #6c757d;
  --success-color: #25d366;
  --gradient-primary: linear-gradient(135deg, #8B2F7C 0%, #AB4F9C 100%);
  --gradient-secondary: linear-gradient(135deg, #6B1F5C 0%, #8B2F7C 100%);
}

/* ========================================
   Global Overrides
   ======================================== */

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

.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: 0 4px 12px rgba(139, 47, 124, 0.3);
}

.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);
}

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

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

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

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

/* ========================================
   AI Image Placeholder Styles
   ======================================== */

ai-img {
  display: block;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  position: relative;
  overflow: hidden;
  width: 100%;
  height: auto;
}

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: 90%;
  word-wrap: break-word;
  z-index: 2;
}

ai-img::after {
  content: '\1F4F7';
  position: absolute;
  top: 10px;
  right: 10px;
  opacity: 0.3;
  font-size: 24px;
  z-index: 1;
}

ai-img[logo="true"] {
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary-color) 100%);
}

ai-img[logo="true"]::before {
  color: #ffffff;
  font-weight: 600;
  font-size: 12px;
}

ai-img[logo="true"]::after {
  color: rgba(255, 255, 255, 0.3);
}

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

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

ai-img.rounded-3 {
  border-radius: 0.5rem;
}

/* ========================================
   Gradient Backgrounds
   ======================================== */

.bg-gradient {
  background: var(--gradient-primary);
  color: #ffffff;
}

.bg-gradient-secondary {
  background: var(--gradient-secondary);
  color: #ffffff;
}

.bg-gradient-light {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

/* ========================================
   Card Styles
   ======================================== */

.card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  border-radius: 8px;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 32px rgba(139, 47, 124, 0.15);
}

.card-img-top {
  transition: transform 0.3s ease;
}

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

/* Product Card */
.product-card {
  position: relative;
  overflow: hidden;
}

.product-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--gradient-primary);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 1;
}

.product-card:hover::before {
  opacity: 0.1;
}

.product-card .card-body {
  position: relative;
  z-index: 2;
}

.product-card .btn-primary {
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s ease;
}

.product-card:hover .btn-primary {
  opacity: 1;
  transform: translateY(0);
}

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

.solution-card:hover {
  border-left-width: 8px;
  padding-left: calc(1.25rem - 4px);
}

.solution-card .card-title {
  color: var(--primary-color);
  transition: color 0.3s ease;
}

.solution-card:hover .card-title {
  color: var(--primary-dark);
}

/* ========================================
   Author Card
   ======================================== */

.author-card {
  border-left: 4px solid var(--primary-color);
  background: #ffffff;
  transition: all 0.3s ease;
}

.author-card:hover {
  border-left-width: 6px;
  box-shadow: 0 8px 24px rgba(139, 47, 124, 0.15);
}

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

.author-card .badge {
  background-color: var(--primary-color);
}

.author-card .badge.bg-secondary {
  background-color: var(--secondary-color) !important;
}

/* ========================================
   Navigation Styles
   ======================================== */

.navbar {
  transition: all 0.3s ease;
}

.navbar-brand ai-img {
  transition: transform 0.3s ease;
}

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

.nav-link {
  position: relative;
  font-weight: 500;
  color: #333 !important;
  transition: color 0.3s ease;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background-color: var(--primary-color);
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 80%;
}

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

/* ========================================
   Floating Buttons
   ======================================== */

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

.floating-buttons .btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.floating-buttons .btn-success {
  background-color: var(--success-color);
  border-color: var(--success-color);
}

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

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

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

/* ========================================
   Promo Bar
   ======================================== */

.promo-bar {
  font-size: 14px;
  background: var(--gradient-primary) !important;
}

.promo-bar .btn-light {
  font-size: 13px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.promo-bar .btn-light:hover {
  transform: scale(1.05);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* ========================================
   Top Bar
   ======================================== */

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

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

/* ========================================
   Footer
   ======================================== */

footer h5 {
  color: var(--primary-light);
  font-weight: 600;
  margin-bottom: 1rem;
}

footer a {
  color: rgba(255, 255, 255, 0.7);
  transition: all 0.3s ease;
}

footer a:hover {
  color: var(--primary-light);
  padding-left: 4px;
}

footer .bi {
  color: var(--primary-light);
}

/* ========================================
   Forms
   ======================================== */

.form-control:focus,
.form-select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.25rem rgba(139, 47, 124, 0.25);
}

.form-label {
  font-weight: 500;
  color: #333;
}

.was-validated .form-control:invalid,
.was-validated .form-select:invalid {
  border-color: #dc3545;
}

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

/* ========================================
   Modal
   ======================================== */

.modal-header.bg-primary {
  background: var(--gradient-primary) !important;
}

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

/* ========================================
   Hero Section
   ======================================== */

.hero-section {
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(139, 47, 124, 0.8) 0%, rgba(171, 79, 156, 0.6) 100%);
  z-index: 1;
}

.hero-section .container {
  position: relative;
  z-index: 2;
}

/* ========================================
   Carousel
   ======================================== */

.carousel-item {
  position: relative;
  height: 600px;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

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

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

.carousel-caption h1,
.carousel-caption h2 {
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7);
  color: #ffffff;
}

.carousel-caption p {
  text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.7);
  color: #f8f9fa;
}

.carousel-control-prev,
.carousel-control-next {
  width: 5%;
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
  opacity: 1;
}

.carousel-indicators button {
  background-color: var(--primary-color);
}

/* ========================================
   Stats Section
   ======================================== */

.stats-section .stat-item {
  text-align: center;
  padding: 2rem 1rem;
  transition: transform 0.3s ease;
}

.stats-section .stat-item:hover {
  transform: translateY(-5px);
}

.stats-section .stat-number {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.stats-section .stat-label {
  font-size: 1rem;
  color: #6c757d;
}

/* ========================================
   Timeline
   ======================================== */

.timeline-item {
  position: relative;
  padding-left: 3rem;
  padding-bottom: 2rem;
  border-left: 2px solid var(--primary-light);
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -8px;
  top: 0;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background-color: var(--primary-color);
  border: 3px solid #fff;
  box-shadow: 0 0 0 2px var(--primary-color);
}

.timeline-item:last-child {
  border-left-color: transparent;
}

/* ========================================
   Blog Post
   ======================================== */

.blog-post-content h2 {
  color: var(--primary-color);
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.blog-post-content h3 {
  color: var(--primary-dark);
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

.blog-post-meta {
  color: #6c757d;
  font-size: 0.9rem;
}

.blog-post-meta .bi {
  color: var(--primary-color);
}

/* ========================================
   Breadcrumb
   ======================================== */

.breadcrumb {
  background-color: transparent;
  padding: 0;
  margin-bottom: 1.5rem;
}

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

.breadcrumb-item.active {
  color: #6c757d;
}

/* ========================================
   Certifications
   ======================================== */

.certification-badge {
  padding: 1rem;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  text-align: center;
}

.certification-badge:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(139, 47, 124, 0.15);
}

/* ========================================
   Responsive Styles
   ======================================== */

@media (max-width: 768px) {
  .promo-bar {
    font-size: 12px;
  }

  .promo-bar .btn-light {
    font-size: 11px;
    padding: 0.25rem 0.5rem;
  }

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

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

  .stats-section .stat-number {
    font-size: 2rem;
  }

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

  /* Carousel responsive */
  .carousel-item {
    height: 400px;
  }

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

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

  .carousel-caption h1,
  .carousel-caption h2 {
    font-size: 1.5rem !important;
  }

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

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

/* ========================================
   Utility Classes
   ======================================== */

.shadow-primary {
  box-shadow: 0 4px 12px rgba(139, 47, 124, 0.2) !important;
}

.border-start-primary {
  border-left: 4px solid var(--primary-color) !important;
}

.min-vh-100 {
  min-height: 100vh;
}

/* ========================================
   Animations
   ======================================== */

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

.pulse {
  animation: pulse 2s infinite;
}
