/* === DESKTOP DEFAULTS === */
#hero {
  background-color:rgb(2, 0, 126);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
  
}
#hero h1, #hero p { position: relative; z-index: 1; }

#portfolio {
  background-image: url("images/printer-nature-concept.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  padding: 80px 20px;
  color: white;
  position: relative;
}
#portfolio::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.6);
}
#portfolio h2, #portfolio .portfolio-item { position: relative; z-index: 1; }

#carousel {
  display: flex;
  gap: 24px;
  cursor: grab;
  overflow: hidden; /* must be auto for smooth scroll */
  scroll-behavior: smooth;
  padding-bottom: 10px;
}

#carousel.active {
  cursor: grabbing;
}

/* Each item/card */
.carousel-item {
  background-color: #ffffff;   
  border: 1px solid #ddd;      
  border-radius: 12px;         
  overflow: hidden;            
  flex-shrink: 0;              
  width: 20rem;                
  box-shadow: 0 8px 20px rgba(0,0,0,0.1); 
  display: flex;
  flex-direction: column;      
  transform: translateX(0);    
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Image inside the card */
.carousel-img {
  width: 100%;
  height: 10rem;               
  object-fit: cover;           
}

/* Text content */
.carousel-item .content {
  padding: 1rem;
  flex-grow: 1;                
}

.carousel-item h3 {
  font-size: 1.25rem;          
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.carousel-item p {
  color: #555;
  font-size: 0.875rem;         
}

#prev, #next {
  color: black;
  font-size:40px;
}

#contact {
  background-image: url("images/contact-bg-large.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  padding: 80px 20px;
  color: white;
  position: relative;
}
#contact::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.4);
}
#contact h2, #contact form { position: relative; z-index: 1; }

/* === MOBILE FRIENDLY BACKGROUNDS === */
@media (max-width: 768px) {
  #hero {
    background-image: url("images/hero-bg-small.jpg");
    padding: 60px 15px;
    text-align: center;
  }
  #portfolio {
    background-image: url("images/portfolio-bg-small.jpg");
    padding: 50px 15px;
  }
  #contact {
    background-image: url("images/contact-bg-small.jpg");
    padding: 50px 15px;
  }
}