/* General Body Styling */
html,
body {
  height: 100%;
}
body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #f4f4f4;
}

/* Navbar Styling */
.navbar {
  transition: background-color 0.5s ease;
  padding-top: 0.25rem; /* Reduced padding */
  padding-bottom: 0.1rem; /* Reduced padding */
}

.navbar-brand {
  font-weight: bold;
  font-size: 2rem;
}

/* Hero Section */
.hero-section {
  background:
    linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)),
    url("https://images.unsplash.com/photo-1523961131990-5ea7c61b2107?q=80&w=1974&auto=format&fit=crop")
      no-repeat center center/cover;
  height: 30vh;
  animation: fadeIn 2s ease-in-out;
}

.hero-section h1 {
  animation: slideInDown 1s ease-out 0.5s;
  animation-fill-mode: backwards;
}

.hero-section p {
  animation: slideInUp 1s ease-out 0.5s;
  animation-fill-mode: backwards;
}

/* Section Styling */
section {
  padding: 60px 0;
}

h2 {
  font-weight: 600;
  margin-bottom: 40px;
  position: relative;
  padding-bottom: 15px;
}

h2::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  width: 50px;
  height: 3px;
  background-color: #0d6efd;
}

/* Card Styling */
.card {
  border: none;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-10px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

/* Footer Styling */
footer {
  padding: 20px 0;
}

/* Keyframe Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideInDown {
  from {
    transform: translateY(-50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

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

/* New Sidebar and Carousel Styles */
.sidebar {
  padding: 20px;
  background-color: #f8f9fa;
  position: sticky;
  top: 0;
  height: 100%; /* Make sidebar take full height of its parent (flex container) */
  overflow-y: auto; /* Enable scrolling if content overflows */
  display: flex; /* Make it a flex container */
  flex-direction: column; /* Stack children vertically */
}

.carousel-container {
  height: 100%; /* Make carousel container take full height of its parent (sidebar) */
  overflow: hidden;
  position: relative;
}

.carousel-item {
  position: relative;
  width: 100%;
  transition: transform 1s ease-in-out;
}

.carousel-item img {
  width: 100%;
  height: auto;
  display: block;
}

@media (max-width: 768px) {
  .sidebar {
    display: none;
  }
}

/* STL Viewer Box Styling */
.stl-viewer-box {
  border: 1px solid #ddd;
  border-radius: 8px;
  background-color: #ffffff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  overflow: hidden; /* Ensure model doesn't overflow rounded corners */
}

/* ===== MOBILE FIXES ===== */
@media (max-width: 768px) {
  /* Fix hero section text on mobile */
  .hero-section h1.display-4 {
    font-size: 2.5rem !important;
    line-height: 1.2;
    hyphens: none;
    word-break: normal;
  }

  /* Adjust hero section height for mobile */
  .hero-section {
    height: 40vh;
  }

  /* Adjust lead text size */
  .hero-section p.lead {
    font-size: 1.1rem;
  }

  /* Hide sidebar on mobile (existing rule) */
  .sidebar {
    display: none;
  }
}
