/* ==========================================
   HOME PAGE CSS - Banner Slider & Services Grid
   ========================================== */

/* Campaign Popup Modal */
.campaign-popup {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 50000;
  animation: fadeIn 0.3s ease-in-out;
}

.campaign-popup.show {
  display: flex;
  justify-content: center;
  align-items: center;
}

.popup-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.75);
  cursor: pointer;
}

.popup-content {
  position: relative;
  max-width: 1200px;
  max-height: 90vh;
  z-index: 50001;
  animation: popupSlideIn 0.4s ease-out;
}

.popup-content img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.popup-close {
  position: absolute;
  top: -15px;
  right: -15px;
  width: 40px;
  height: 40px;
  background-color: #fff;
  border: none;
  border-radius: 50%;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  color: #333;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50002;
}

.popup-close:hover {
  background-color: #f44336;
  color: #fff;
  transform: rotate(90deg);
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes popupSlideIn {
  from {
    transform: scale(0.7);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* Responsive Design for Popup */
@media (max-width: 768px) {
  .popup-content {
    max-width: 90%;
    max-height: 85vh;
  }
  
  .popup-close {
    top: -10px;
    right: -10px;
    width: 35px;
    height: 35px;
    font-size: 24px;
  }
}

@media (max-width: 480px) {
  .popup-content {
    max-width: 95%;
    max-height: 80vh;
  }
  
  .popup-close {
    top: -8px;
    right: -8px;
    width: 32px;
    height: 32px;
    font-size: 22px;
  }
  
  .popup-content img {
    border-radius: 4px;
  }
}

/* Main Banner - Image Slider */
.main-banner {
  position: relative;
  width: 100%;
  overflow: hidden;
  z-index: 0;
}

.banner-slider {
  position: relative;
  width: 100%;
  height: 0;
  padding-bottom: 55.77%; /* 619/1110 * 100% = 55.77% to maintain 1110:619 aspect ratio */
  overflow: hidden;
  border-radius: 0;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
}

.slide.active {
  opacity: 1;
}

.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Navigation Arrows - Square Style */
.slider-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(255, 255, 255, 0.9);
  border: none;
  width: 50px;
  height: 50px;
  border-radius: 0; /* Perfect square - no rounded corners */
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 18px;
  color: #444241;
  transition: all 0.3s ease;
  z-index: 5;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15); /* Added subtle shadow for better visibility */
}

.slider-nav:hover {
  background-color: rgba(255, 255, 255, 1);
  color: #897c70;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2); /* Enhanced shadow on hover */
}

/* Updated carousel indicators for image slider */
.carousel-indicators {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 5;
}

.indicator {
  width: 15px;
  height: 8px;
  border-radius: 0; /* Square/rectangular shape like in the image */
  background-color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
}

.indicator.active {
  background-color: rgba(255, 255, 255, 1);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Services Grid */
.services-grid {
  padding: 30px 0;
  position: relative;
  z-index: 0;
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.service-card {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
  border-radius: 0;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.service-card:hover {
  transform: scale(1.02);
}

.service-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: all 0.3s ease;
}

/* Shine Hover Effect */
.service-card::before {
  position: absolute;
  top: 0;
  left: -75%;
  z-index: 2;
  display: block;
  content: '';
  width: 50%;
  height: 100%;
  background: -webkit-linear-gradient(left, rgba(255,255,255,0) 0%, rgba(255,255,255,.3) 100%);
  background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,.3) 100%);
  -webkit-transform: skewX(-25deg);
  transform: skewX(-25deg);
  pointer-events: none;
}

.service-card:hover::before {
  -webkit-animation: shine .75s;
  animation: shine .75s;
}

@-webkit-keyframes shine {
  100% {
    left: 125%;
  }
}

@keyframes shine {
  100% {
    left: 125%;
  }
}

.card-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: white;
  text-align: center;
  padding: 40px;
}

.y-icon {
  width: 40px;
  height: 40px;
  border: 2px solid white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 18px;
  margin-bottom: 20px;
}

.card-overlay h3 {
  font-family: 'Montserrat', sans-serif;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: 1px;
  margin-bottom: 15px;
  line-height: 1.2;
}

.card-overlay p {
  font-size: 14px;
  margin-bottom: 25px;
  font-style: italic;
}

.service-btn {
  background-color: transparent;
  color: white;
  border: 2px solid white;
  padding: 10px 25px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.service-btn:hover {
  background-color: white;
  color: #444241;
}

/* Responsive Design - Mobile */
@media (max-width: 768px) {
  .banner-slider {
    padding-bottom: 56.25%; /* 16:9 aspect ratio to match service-card (9/16 * 100% = 56.25%) */
  }

  .carousel-indicators {
    bottom: 10px;
  }

  .indicator {
    width: 12px;
    height: 6px;
  }

  .grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .banner-slider {
    padding-bottom: 56.25%; /* 16:9 aspect ratio to match service-card on small mobile */
  }

  .carousel-indicators {
    bottom: 8px;
  }

  .indicator {
    width: 10px;
    height: 5px;
  }

  .card-overlay {
    padding: 20px;
  }

  .card-overlay h3 {
    font-size: 20px;
  }
}