/* Bubble Wrap - Custom Styles */
/* Brand Colors and Variables */
:root {
  --primary-color: #0066cc;
  --secondary-color: #0052a3;
  --accent-color: #00a3ff;
  --success-color: #28a745;
  --warning-color: #ffc107;
  --danger-color: #dc3545;
  --light-bg: #f8f9fa;
  --dark-bg: #212529;
  --text-muted: #6c757d;
}

/* AI Image Placeholder Styles */
ai-img {
  display: block;
  background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
  position: relative;
  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%;
}

ai-img::after {
  content: '';
  position: absolute;
  top: 10px;
  right: 10px;
  width: 24px;
  height: 24px;
  background: rgba(108, 117, 125, 0.3);
  border-radius: 4px;
}

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

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

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

ai-img.shadow {
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

ai-img.w-100 {
  width: 100%;
}

ai-img.mb-3 {
  margin-bottom: 1rem !important;
}

ai-img.mb-4 {
  margin-bottom: 1.5rem !important;
}

ai-img.me-3 {
  margin-right: 1rem !important;
}

/* Set dimensions based on size attribute */
ai-img[size="1920x700"] {
  width: 100%;
  height: 700px;
}

ai-img[size="800x450"],
ai-img[size="800x400"] {
  width: 100%;
  height: auto;
  aspect-ratio: 16/9;
}

ai-img[size="700x400"] {
  width: 100%;
  height: auto;
  aspect-ratio: 7/4;
}

ai-img[size="600x450"],
ai-img[size="600x400"] {
  width: 100%;
  height: auto;
  aspect-ratio: 4/3;
}

ai-img[size="400x300"],
ai-img[size="400x250"] {
  width: 100%;
  height: auto;
  aspect-ratio: 4/3;
}

ai-img[size="300x300"] {
  width: 300px;
  height: 300px;
  margin: 0 auto;
}

ai-img[size="150x150"] {
  width: 150px;
  height: 150px;
}

ai-img[size="150x45"] {
  width: 150px;
  height: 45px;
}

ai-img[size="120x120"] {
  width: 120px;
  height: 120px;
  margin: 0 auto;
}

ai-img[size="80x80"] {
  width: 80px;
  height: 80px;
}

ai-img[size="50x50"] {
  width: 50px;
  height: 50px;
}

ai-img[size="1200x400"] {
  width: 100%;
  height: 400px;
}

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

/* Top Bar */
.top-bar a {
  text-decoration: none;
}

.top-bar a:hover {
  text-decoration: underline;
}

/* Navigation */
.navbar {
  padding: 0.75rem 0;
}

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

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

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

/* Hero Carousel */
.carousel-item ai-img {
  object-fit: cover;
}

.carousel-caption {
  background: rgba(0, 0, 0, 0.5);
  padding: 2rem;
  border-radius: 10px;
  bottom: 10%;
}

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

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

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

  ai-img[size="1920x700"] {
    height: 400px;
  }
}

/* Page Banner */
.page-banner {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}

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

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

.product-card .card-img-top {
  height: 250px;
  object-fit: cover;
}

.product-card ai-img.card-img-top {
  height: 250px;
}

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

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

/* Stats Section */
.stats-section .display-4 {
  font-weight: 700;
}

/* Certification Badges */
.certification-badge {
  width: 80px;
  height: 80px;
  object-fit: contain;
  filter: grayscale(0);
  transition: filter 0.3s ease;
}

.certification-badge:hover {
  filter: grayscale(0);
}

/* Floating Buttons */
.floating-buttons .btn {
  width: 50px;
  height: 50px;
  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: auto;
}

/* Timeline */
.timeline .card {
  border-top: 3px solid var(--primary-color);
}

/* Progress Bars */
.progress {
  border-radius: 50px;
}

.progress-bar {
  border-radius: 50px;
}

/* Accordion */
.accordion-button:not(.collapsed) {
  background-color: rgba(0, 102, 204, 0.1);
  color: var(--primary-color);
}

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

/* Article Content */
.article-content h2 {
  color: var(--primary-color);
  border-bottom: 2px solid var(--primary-color);
  padding-bottom: 0.5rem;
}

.article-content h3 {
  color: var(--secondary-color);
}

.article-content a {
  color: var(--primary-color);
}

.article-content a:hover {
  color: var(--secondary-color);
}

.article-content ul li,
.article-content ol li {
  margin-bottom: 0.5rem;
}

/* Form Styles */
.form-control:focus,
.form-select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.25rem rgba(0, 102, 204, 0.25);
}

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

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

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

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

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

/* Badge Styles */
.badge {
  font-weight: 500;
}

/* Footer */
footer h5 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

footer ul li {
  margin-bottom: 0.5rem;
}

footer a {
  transition: color 0.3s ease;
}

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

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

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

/* Breadcrumb */
.breadcrumb {
  margin-bottom: 0;
  background: transparent;
}

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

.breadcrumb-item a:hover {
  text-decoration: underline;
}

/* Responsive Adjustments */
@media (max-width: 992px) {
  .navbar-collapse {
    padding: 1rem 0;
  }

  .navbar-nav .nav-link {
    padding: 0.75rem 0 !important;
  }

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

@media (max-width: 768px) {
  .display-4 {
    font-size: 2rem;
  }

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

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

  .page-banner {
    padding: 2rem 0 !important;
  }

  section {
    padding: 3rem 0 !important;
  }

  ai-img[size="300x300"] {
    width: 200px;
    height: 200px;
  }
}

@media (max-width: 576px) {
  .promo-bar {
    font-size: 0.8rem;
  }

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

  .carousel-caption {
    display: none;
  }

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

/* Animation Classes */
.fade-in {
  animation: fadeIn 0.5s ease-in;
}

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

/* Utility Classes */
.min-vh-50 {
  min-height: 50vh;
}

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

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

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

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

  .navbar {
    position: static !important;
  }

  a[href]:after {
    content: " (" attr(href) ")";
  }
}
