#wlcm {
  position: relative;
  height: 600px;
  width: 100%;
}
#wlcm .absolute {
  position: absolute;
  bottom: 70px;
  left: 50%;
  transform: translateX(-50%);
}
#wlcm div {
  position: relative; /* Ensure relative positioning */
  z-index: 1;
  padding-top: 40px;
  text-align: center;
}
#wlcm button {
  display: grid;
  place-content: center;
  background-color: #fff;
  border: none;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  padding-top: 2px;
  cursor: pointer;
}
#wlcm button:hover {
  background-color: #f0f0f0;
}
#wlcm button span {
  font-size: 2rem;
}

#wlcm::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url(/img/proizvodiWlcm.png);
  background-size: cover;
  background-position: center;
  z-index: 0; /* Set lower z-index than the content */
  filter: brightness(0.6);
  border-radius: 50px;
}

#wlcm div {
  max-width: 800px;
  margin-inline: auto;
}
#wlcm h2 {
  font-size: 3.5rem;
  color: #fff;
  font-weight: bold;
}
#wlcm p {
  font-size: 1.2rem;
  color: #fff;
}
.section-design {
  width: 100%;
  max-width: 1100px;
  text-align: center;
  margin-inline: auto;
}
.section-design h3 {
  font-size: 2.5rem;
  margin-bottom: 40px;
  font-weight: bold;
  text-transform: uppercase;
}
.section-design .flex-c {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 35px;
}
.section-design {
  margin-top: 150px;
}
.section-design img {
  width: 30%;
  height: 300px;
  border-radius: 20px;
  object-fit: cover;
}

/* Section Navigation Styles */
.section-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  top: auto;
  transform: none;
  z-index: 100;
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  gap: 5px;
  background-color: rgba(255, 255, 255, 0.95);
  padding: 12px 15px;
  border-radius: 0;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
  overflow-x: auto;
  min-width: auto;
}

.section-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: #333;
  font-weight: 500;
  transition: all 0.3s ease;
  padding: 8px 10px;
  border-radius: 20px;
  text-align: center;
  width: 80px; /* Fixed width for all navigation items */
}

.section-nav a span.nav-dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  background-color: #ccc;
  border-radius: 50%;
  margin-right: 0;
  margin-bottom: 5px;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.section-nav a span.nav-text {
  opacity: 1;
  font-size: 0.75rem;
  max-width: 60px; /* Consistent max width for all screen sizes */
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
  white-space: nowrap;
  width: 100%; /* Ensure text takes full width of parent */
}

/* Active button styling - only the dot is blue */
.section-nav a:hover {
  background-color: #f5f5f5;
}

.section-nav a.active {
  /* Remove blue background */
  background-color: transparent;
  color: #333; /* Keep text color consistent */
}

.section-nav a:hover span.nav-dot {
  background-color: #007bff;
  transform: scale(1.2);
}

.section-nav a.active span.nav-dot {
  background-color: #007bff; /* Blue dot for active state */
  transform: scale(1.2);
}

/* Make sure the page container has enough margin for bottom nav */
#pageContainer {
  position: relative;
  margin-left: 0;
  margin-bottom: 70px; /* Add bottom margin for the navigation */
}

/* Media query for screens smaller than 1699px */
@media only screen and (max-width: 1699px) {
  .section-design img {
    width: 31%;
    height: 280px;
  }
  
  .section-design {
    max-width: 1000px;
  }
}

/* Media query for screens smaller than 1499px */
@media only screen and (max-width: 1499px) {
  #wlcm h2 {
    font-size: 3.2rem;
  }
  
  .section-design h3 {
    font-size: 2.3rem;
  }
  
  .section-design img {
    height: 250px;
  }
}

/* Media query for screens smaller than 1280px */
@media (max-width: 1279px) {
  #wlcm {
    height: 500px;
  }
  
  #wlcm h2 {
    font-size: 3rem;
  }
  
  .section-design {
    max-width: 900px;
    margin-top: 120px;
  }
  
  .section-design h3 {
    font-size: 2.2rem;
    margin-bottom: 30px;
  }
  
  .section-design img {
    width: 31%;
    height: 220px;
  }
}

/* Media query for screens smaller than 1024px */
@media only screen and (max-width: 1023px) {
  #wlcm {
    height: 370px;
  }
  
  #wlcm div {
    padding-top: 20px;
  }
  
  #wlcm h2 {
    font-size: 3rem;
  }
  
  #wlcm p {
    font-size: 1.1rem;
  }
  
  .section-design {
    margin-top: 90px;
    max-width: 800px;
  }
  
  .section-design h3 {
    font-size: 2rem;
    margin-bottom: 25px;
  }
  
  .section-design .flex-c {
    gap: 25px;
  }
  
  .section-design img {
    width: 47%;
    height: 200px;
  }
}

/* Mobile styles for screens smaller than 768px */
@media only screen and (max-width: 767px) {
  #wlcm {
    height: 400px;
  }
  
  #wlcm::before {
    background-position: center center;
    border-radius: 22px;
  }
  
  #wlcm div h2 {
    font-size: 2.5rem;
  }
  
  #wlcm div p {
    font-size: 1.05rem;
  }
  
  .section-design {
    margin-top: 70px;
    width: 95%;
  }
  
  .section-design h3 {
    font-size: 1.8rem;
    margin-bottom: 20px;
  }
  
  .section-design .flex-c {
    gap: 15px;
  }
  
  .section-design img {
    width: 47%;
    height: 180px;
  }
}

/* For very small screens */
@media only screen and (max-width: 499px) {
  #wlcm {
    height: 400px;
  }
  
  #wlcm::before {
    border-radius: 10px;
  }
  
  #wlcm div h2 {
    font-size: 1.8rem;
  }
  
  #wlcm div p {
    font-size: 1rem;
  }
  
  .section-design {
    margin-top: 50px;
  }
  
  .section-design h3 {
    font-size: 1.6rem;
    margin-bottom: 15px;
  }
  
  /* Horizontal scrolling for product images */
  .section-design .flex-c {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 15px; /* Add padding for scrollbar */
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
    scroll-snap-type: x mandatory; /* Better scrolling experience */
    scrollbar-width: thin; /* For Firefox */
    justify-content: flex-start; /* Align items from the start for proper scrolling */
    padding-left: 10px; /* Add some padding at the start */
    padding-right: 10px; /* Add some padding at the end */
  }
  
  .section-design img {
    width: 220px; /* Fixed width instead of percentage */
    min-width: 220px; /* Ensure the width is maintained */
    height: 180px;
    margin-bottom: 0;
    scroll-snap-align: start; /* Better scrolling experience */
  }
  
  .section-nav a {
    padding: 5px;
  }
}

/* For extra small screens */
@media only screen and (max-width: 399px) {
  #wlcm div h2 {
    font-size: 1.6rem;
  }
  
  #wlcm div p {
    font-size: 0.9rem;
  }
  
  .section-design h3 {
    font-size: 1.5rem;
  }
  
  .section-design img {
    width: 200px; /* Slightly smaller for very small screens */
    min-width: 200px;
    height: 160px;
  }
  
  .section-nav a {
    width: 70px; /* Narrower on very small screens */
  }
  
  .section-nav a span.nav-text {
    font-size: 0.65rem;
    max-width: 50px;
  }
}

/* Smooth scrolling for the whole page */
html {
  scroll-behavior: smooth;
}

/* Animation helpers */
.animate-delay-1 {
  animation-delay: 0.1s !important;
}
.animate-delay-2 {
  animation-delay: 0.2s !important;
}
.animate-delay-3 {
  animation-delay: 0.3s !important;
}
.animate-delay-4 {
  animation-delay: 0.4s !important;
}
.animate-delay-5 {
  animation-delay: 0.5s !important;
}

/* Custom animation keyframes */
@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.float {
  animation: float 5s ease-in-out infinite;
}

/* Professional animation adjustments */
.animate__animated {
  animation-duration: 0.8s !important;
}

/* Refined image styling with subtle hover effect */
.section-design img {
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  will-change: transform;
  backface-visibility: hidden;
  cursor: pointer; /* Show pointer cursor on hover */
}

/* Add a very subtle hover effect */
.section-design img:hover {
  filter: brightness(1.05); /* Very subtle brightness increase */
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08); /* Light shadow */
}

/* Ensure animations don't cause layout shifts */
.section-design .flex-c {
  perspective: 1000px;
}

/* Add smooth transition for navigation */
.section-nav a,
.section-nav a span.nav-dot {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Add pulsing animation for the down button */
#wlcm button {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7);
  }
  
  70% {
    transform: scale(1.1);
    box-shadow: 0 0 0 10px rgba(255, 255, 255, 0);
  }
  
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
  }
}

/* Parallax effect for welcome section */
#wlcm::before {
  transition: transform 0.5s ease-out;
}

/* Image Modal/Lightbox */
.image-modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.9);
  transition: opacity 0.3s ease;
}

.modal-content {
  margin: auto;
  display: block;
  max-width: 90%;
  max-height: 90vh;
  object-fit: contain;
  position: relative;
  top: 50%;
  transform: translateY(-50%);
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
  border-radius: 4px;
  animation: zoom 0.3s ease;
}

@keyframes zoom {
  from {transform: translateY(-50%) scale(0.8); opacity: 0;}
  to {transform: translateY(-50%) scale(1); opacity: 1;}
}

.close-modal {
  position: absolute;
  top: 20px;
  right: 35px;
  color: #f1f1f1;
  font-size: 40px;
  font-weight: bold;
  transition: 0.3s;
  cursor: pointer;
  z-index: 1001;
}

.close-modal:hover,
.close-modal:focus {
  color: #bbb;
  text-decoration: none;
}

/* Modal navigation buttons */
.modal-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: white;
  font-size: 50px;
  font-weight: bold;
  cursor: pointer;
  background-color: rgba(0, 0, 0, 0.2);
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 1001;
  user-select: none;
}

.modal-nav:hover {
  background-color: rgba(0, 0, 0, 0.5);
}

.modal-nav-prev {
  left: 20px;
}

.modal-nav-next {
  right: 20px;
}

/* Animation for image transitions */
.slide-in-right {
  animation: slideInRight 0.3s forwards;
}

.slide-in-left {
  animation: slideInLeft 0.3s forwards;
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateY(-50%) translateX(30px); }
  to { opacity: 1; transform: translateY(-50%) translateX(0); }
}

@keyframes slideInLeft {
  from { opacity: 0; transform: translateY(-50%) translateX(-30px); }
  to { opacity: 1; transform: translateY(-50%) translateX(0); }
}

/* Mobile adjustments */
@media only screen and (max-width: 768px) {
  .modal-nav {
    font-size: 30px;
    width: 40px;
    height: 40px;
  }
  
  .modal-nav-prev {
    left: 10px;
  }
  
  .modal-nav-next {
    right: 10px;
  }
}

/* Media query for screens larger than 1280px - center navigation */
@media (min-width: 1280px) {
  .section-nav {
    justify-content: center;
    padding: 6px 8px; /* Half the original padding */
  }
  
  .section-nav a {
    width: 90px; /* Slightly wider on desktop */
  }
  
  .section-nav a span.nav-text {
    /* Keep max-width consistent instead of setting to 'none' */
    font-size: 0.85rem;
  }
}
