* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Montserrat', sans-serif;
}

html {
  scroll-behavior: smooth;
}

/* Scroll To Top Design */
#scrollToTop.show {
  transform: translateY(0);
  opacity: 1;
}

/* Pulse animation to draw attention */
.pulse-hover:hover {
  animation: shadow-pulse 1.5s infinite;
}

@keyframes shadow-pulse {
  0% {
    box-shadow: 0 0 0 0px rgba(107, 142, 35, 0.4);
  }

  100% {
    box-shadow: 0 0 0 15px rgba(107, 142, 35, 0);
  }
}

/* --- SCROLL OFFSET FIX --- */
section[id] {
  scroll-margin-top: 80px;
}

/* Hero slider backgrounds */
.slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 0.8s ease-in-out;
}

.slide.active {
  opacity: 1;
}

.slide:nth-child(1) {
  background-image: url('../images/hero/mayurvan_hero_bg1.jpg');
}

.slide:nth-child(2) {
  background-image: url('../images/hero/mayurvan_hero_bg2.jpg');
}

.slide:nth-child(3) {
  background-image: url('../images/hero/mayurvan_hero_bg3.jpg');
}

/* Custom underline animation */
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: #6B8E23;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s ease;
}

.nav-link:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* Hero gradient overlay */
.hero-overlay {
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.7) 45%, rgba(0, 0, 0, 0.3) 100%);
}

/* Button Animations */
.btn-primary,
.btn-whatsapp,
.btn-secondary,
.btn-submit {
  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary::before,
.btn-submit::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.5s ease, height 0.5s ease;
}

.btn-primary:hover::before,
.btn-submit:hover::before {
  width: 300px;
  height: 300px;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 40px rgba(107, 142, 35, 0.4);
}

.btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 40px rgba(107, 142, 35, 0.4);
}

.btn-whatsapp:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 40px rgba(34, 197, 94, 0.4);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.95);
  color: #6B8E23;
  transform: translateY(-2px);
  box-shadow: 0 20px 40px rgba(255, 255, 255, 0.3);
}

/* --- FORM VALIDATION STYLES --- */
.input-wrapper {
  position: relative;
  margin-bottom: 5px;
}

.iti {
  width: 100%;
  display: block;
}

.validation-icon {
  position: absolute;
  right: 15px;
  top: 22px;
  transform: translateY(-50%) scale(0);
  color: #ef4444;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
  z-index: 20;
}

.input-wrapper.error input {
  border-color: #ef4444 !important;
  background-color: #fef2f2;
  animation: shake 0.4s ease-in-out;
}

/* Adjust padding for both phone inputs */
.input-wrapper.error #phone,
.input-wrapper.error #contactPhone {
  padding-right: 2.5rem;
}

.input-wrapper.error .validation-icon {
  transform: translateY(-50%) scale(1);
}

.error-msg {
  display: block;
  font-size: 0.75rem;
  color: #ef4444;
  font-weight: 500;
  margin-top: 4px;
  margin-left: 4px;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out, opacity 0.3s ease-out;
}

.input-wrapper.error .error-msg {
  max-height: 24px;
  opacity: 1;
}

.input-wrapper.success input {
  border-color: #22c55e !important;
  background-color: #f0fdf4;
}

@keyframes shake {

  0%,
  100% {
    transform: translateX(0);
  }

  20% {
    transform: translateX(-4px);
  }

  40% {
    transform: translateX(4px);
  }

  60% {
    transform: translateX(-2px);
  }

  80% {
    transform: translateX(2px);
  }
}

/* --- BADGE ANIMATION (Pulse Effect) --- */
@keyframes badge-pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

.badge-animated {
  animation: badge-pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
  backface-visibility: hidden; 
  display: inline-block; /* Required for transform animations to work correctly */
}

/* --- GALLERY CAROUSEL STYLES --- */
/* Container Wrapper */
.gallery-section-wrapper {
  position: relative;
  width: 100%;
  padding: 40px 0 20px 0;
  /* Adjusted padding */
  overflow: hidden;
}

/* Swiper Container */
.gallery-carousel {
  padding-bottom: 80px !important;
  overflow: visible !important;
}

/* Swiper Slide Base State */
.gallery-carousel .swiper-slide {
  transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  transform: scale(0.9);
  opacity: 1;
  height: auto;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

/* Swiper Slide Active State */
.gallery-carousel .swiper-slide-active {
  transform: scale(1.05);
  z-index: 10;
}

/* Card Styling */
.gallery-card {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
  height: 320px;
  width: 100%;
  transition: box-shadow 0.4s ease;
}

/* Extra shadow for Active Card */
.swiper-slide-active .gallery-card {
  box-shadow: 0 25px 50px -12px rgba(107, 142, 35, 0.3);
}

.gallery-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s ease;
}

.gallery-card:hover img {
  transform: scale(1.1);
}

/* Overlay Text Styling */
.gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.2) 50%, transparent 100%);
  opacity: 0;
  transition: opacity 0.4s ease;
  display: flex;
  align-items: flex-end;
  padding: 2rem;
}

.gallery-card:hover .gallery-overlay {
  opacity: 1;
}

.gallery-overlay-text {
  color: white;
  font-weight: 700;
  font-size: 1.25rem;
  transform: translateY(20px);
  transition: transform 0.4s ease;
  text-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

.gallery-card:hover .gallery-overlay-text {
  transform: translateY(0);
}

/* Pagination Styling (Dots Below) */
.gallery-carousel .swiper-pagination {
  bottom: 0 !important;
  /* Stick to the very bottom of the container */
  width: 100%;
  text-align: center;
  padding-bottom: 10px;
  /* Small gap from the very edge */
}

.swiper-pagination-bullet {
  width: 11px;
  height: 9px;
  background: #d1d5db;
  /* Gray */
  opacity: 1;
  border-radius: 50%;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  margin: 0 4px !important;
  display: inline-block;
}

.swiper-pagination-bullet-active {
  background: #6B8E23 !important;
  /* Olive */
  width: 35px;
  /* Wide bar */
  border-radius: 100px;
  box-shadow: 0 4px 15px rgba(107, 142, 35, 0.4);
}

/* Mobile Adjustments */
@media (max-width: 768px) {
  .gallery-card {
    height: 250px;
  }

  .gallery-overlay {
    padding: 1.5rem;
  }

  .gallery-overlay-text {
    font-size: 1rem;
  }

  /* Ensure padding is sufficient on mobile too */
  .gallery-carousel {
    padding-bottom: 50px !important;
  }
}

/* --- AMENITIES HOVER EFFECTS --- */
.amenity-card {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  height: 100%;
  /* Ensure card takes full grid height */
  display: flex;
  flex-direction: column;
}

.amenity-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(107, 142, 35, 0.15);
  border-color: #6B8E23;
}

.amenity-icon-box {
  transition: all 0.3s ease;
}

.amenity-card:hover .amenity-icon-box {
  background-color: #6B8E23;
  color: white;
  transform: scale(1.1);
}

/* --- INFRASTRUCTURE HOVER EFFECTS --- */
.infra-card {
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
  height: 100%;
  /* Ensure card takes full grid height */
}

.infra-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: #6B8E23;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.infra-card:hover::after {
  transform: scaleX(1);
}

.infra-card:hover {
  background-color: #fcfdf9;
  /* Very light olive tint */
  transform: translateY(-3px);
}

.infra-icon {
  transition: all 0.4s ease;
}

.infra-card:hover .infra-icon {
  transform: rotateY(180deg);
  color: #6B8E23;
}

/* Tailwind config */
@layer utilities {
  .bg-olive {
    background-color: #6B8E23;
  }

  .text-olive {
    color: #6B8E23;
  }

  .border-olive {
    border-color: #6B8E23;
  }

  .bg-olive-dark {
    background-color: #556B2F;
  }
}

/* Overview Sliders & Thumbnails */
.overview-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.6s ease-in-out;
  background-size: cover;
  background-position: center;
}

.overview-slide.active {
  opacity: 1;
}

.thumbnail {
  cursor: pointer;
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
}

.thumbnail::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  transition: all 0.3s ease;
}

.thumbnail.active::before {
  background: rgba(107, 142, 35, 0.6);
}

.thumbnail:hover::before {
  background: rgba(107, 142, 35, 0.4);
}

/* Mobile menu */
.mobile-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 80%;
  max-width: 320px;
  height: 100vh;
  background: white;
  box-shadow: -4px 0 20px rgba(0, 0, 0, 0.1);
  transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1000;
  overflow-y: auto;
}

.mobile-menu.active {
  right: 0;
}

.mobile-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 999;
}

.mobile-menu-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Video Player Styling */
.video-container {
  position: relative;
  border-radius: 1.5rem;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.video-container video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@media (max-width: 1024px) {
  .hero-overlay {
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0.7) 100%);
  }
}

@media (max-width: 768px) {

  .slide:nth-child(1),
  .slide:nth-child(2),
  .slide:nth-child(3) {
    background-position: 65% center;
  }
}

.thumbnail.active .active-border {
  opacity: 1;
}


.infra-card {
  cursor: pointer !important;
}

.price-card {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.price-card:hover {
  transform: translateY(-8px);
}

.featured-card {
  box-shadow: 0 20px 60px -15px rgba(107, 142, 35, 0.3);
}

.shine-effect {
  position: relative;
  overflow: hidden;
}

.shine-effect::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.shine-effect:hover::before {
  left: 100%;
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-8px);
  }
}

.float-animation {
  animation: float 3s ease-in-out infinite;
}

/* Popup Modal Styles */
.popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  z-index: 9998;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.popup-overlay.active {
  opacity: 1;
  visibility: visible;
}

.popup-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  width: 95%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  background: white;
  border-radius: 24px;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.popup-modal.active {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
}

.popup-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.05);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 10;
}

.popup-close:hover {
  background: rgba(107, 142, 35, 0.1);
  transform: rotate(90deg);
}

.popup-close i {
  font-size: 20px;
  color: #374151;
}

/* Scrollbar styling for popup */
.popup-modal::-webkit-scrollbar {
  width: 6px;
}

.popup-modal::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}

.popup-modal::-webkit-scrollbar-thumb {
  background: #6B8E23;
  border-radius: 10px;
}

.popup-modal::-webkit-scrollbar-thumb:hover {
  background: #556B2F;
}

button:disabled {
  cursor: not-allowed !important;
}