/* Full-width image */
.home-photo-center {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
  margin: 0;
}

/* Hero section with background image */
.hero-section {
  position: relative;
  width: 100%;
  min-height: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url('../photos/Hanger-Photo-Home.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  filter: brightness(0.5);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 3rem 2rem;
  max-width: 900px;
}

.hero-content h1 {
  color: #EFF1F2;
  font-size: clamp(1.8rem, 4vw, 3rem);
  margin-bottom: 1.5rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

.hero-content p {
  color: #EFF1F2;
  font-size: clamp(1rem, 2vw, 1.2rem);
  line-height: 1.6;
  margin-bottom: 2rem;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
}

/* Image grid */
.image-grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 3rem 2rem;
  padding: 1rem;
  margin: 2rem auto;
  width: 100%;
  justify-items: center;
}

/* Each image item */
.image-grid li {
  border-radius: 2rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  width: 100%;
  max-width: 550px;
  overflow: visible;
}

/* Image styles */
.image-grid img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 1rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Hover effect */
.image-grid li:hover img {
  transform: scale(1.05);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.35);
  position: relative;
}

/* Carousel Styles */
.carousel-container {
    width: 100%;
    position: relative;
    margin-top: 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0 1rem;
}

.carousel-wrapper {
    overflow: hidden;
    position: relative;
    padding: 40px 0;
    flex: 1;
}

.carousel-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
    align-items: center;
}

.carousel-item {
    flex: 0 0 auto;
    padding: 0 10px;
    transition: transform 0.5s ease-in-out;
}

.carousel-item a {
    display: block;
    text-decoration: none;
    border-radius: 1rem;
    overflow: visible;
}

.carousel-item img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 1rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: block;
}

/* Hover effect - pop out the image */
.carousel-item:hover img {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.35);
    position: relative;
}

.carousel-controls {
    display: contents;
}

.carousel-btn {
    background: #102864;
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.carousel-btn:hover {
    background: #1a3d8f;
    transform: scale(1.1);
}

.carousel-btn:active {
    transform: scale(0.95);
}

.carousel-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Tablet View - Show 2 center images only */
@media (max-width: 1024px) {
    .carousel-item {
        flex: 0 0 50%;
    }
}

/* Responsive for mobile: 1 image per view */
@media (max-width: 768px) {
  /* Keep background image on mobile, adjust sizing */
  .hero-section {
    margin-top: 5rem;
    min-height: 400px;
  }
  
  .hero-section::before {
    /* Keep the background visible on mobile */
    filter: brightness(0.4); /* Slightly darker for better text readability */
  }
  
  .hero-content {
    padding: 2rem 1.5rem;
  }
  
  .hero-content h1 {
    font-size: clamp(1.5rem, 5vw, 2rem);
  }
  
  .hero-content p {
    font-size: clamp(0.9rem, 3vw, 1.1rem);
  }
  
  .image-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .carousel-container {
        padding: 0 0.5rem;
        gap: 0.5rem;
    }
    .carousel-wrapper {
        padding: 20px 0;
    }
    .carousel-item {
        flex: 0 0 100%;
        padding: 0 5px;
    }
    .carousel-btn {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .hero-section {
        min-height: 350px;
    }
    
    .carousel-btn {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }
}