/* Key Features Section Styles */
.key-features-section {
  width: 100%;
  background-color: #ececef;
  padding: 60px 0;
  position: relative;
}
.key-features-container {
  max-width: 1410px;
  margin: 0 auto;
  padding: 0px;
}
.key-features-header {
  margin-bottom: 0px;
}
.key-features-header .content-title {
  margin: 0;
}
/* Features Grid Styles */
.features-grid-container {
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.features-grid-container::-webkit-scrollbar {
  display: none;
}
.features-grid-wrapper {
  max-width: 1410px;
  margin: 0 auto;
  padding: 0;
}
.features-grid {
  display: flex;
  gap: 0px;
  padding: 0;
  min-width: max-content;
}

/* Add space on the right side for desktop screens (1410px and up) when interacting */
@media screen and (min-width: 1410px) {
  .features-grid-container:hover .features-grid,
  .features-grid-container:focus .features-grid,
  .features-grid-container:active .features-grid {
    padding-right: 200px;
    transition: padding-right 0.3s ease;
  }

  .features-grid {
    transition: padding-right 0.3s ease;
  }
}
.features-grid-item {
  flex: 0 0 330px;
  cursor: grab;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  overflow: hidden;
  position: relative;
  margin-right: 15px;
  padding-top: 7px;
}
.features-grid-item:active {
  cursor: grabbing;
}
.features-grid-item img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  display: block;
  border-radius: 18px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.features-grid-item img:hover {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  transform: translateY(-7px);
  box-shadow: rgba(0, 0, 0, 0.45) 0px 25px 20px -20px;
}
/* Apply padding to the parent when its image is hovered */
/* .features-grid-item:has(img:hover) {
  padding-top: 7px;
} */
.features-grid-content {
  padding: 20px 0px;
  cursor: grab;
  transition: background-color 0.2s ease;
}
.features-grid-content:active {
  cursor: grabbing;
}
.features-grid-title {
  font-size: 20px;
  font-weight: 600;
  color: #333f48;
  margin: 0 0 12px 0;
  line-height: 1.3;
}
.features-grid-subtitle {
  font-size: 15px;
  color: #333f48;
  margin: 0;
  line-height: 1.5;
}
/* Popup Styles */
.features-popup {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
}
.features-popup.active {
  display: flex;
}
.features-popup-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}
.features-popup-image {
  width: 100%;
  height: auto;
  max-height: 80vh;
  object-fit: contain;
  display: block;
}
.features-popup-close {
  position: absolute;
  top: 15px;
  right: 15px;
  background: #f5f5f6;
  color: #333f48;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 10;
}
.features-popup-close:hover {
  background: #333f48;
  color: #ffffff;
}
.features-popup-info {
  display: none;
}
.features-popup-title {
  font-size: 24px;
  font-weight: 600;
  color: #333;
  margin: 0 0 10px 0;
}
.features-popup-subtitle {
  font-size: 16px;
  color: #666;
  margin: 0;
  line-height: 1.5;
}
/* Responsive Design */
@media (max-width: 1200px) {
  .features-grid-item {
    flex: 0 0 300px;
  }
}
@media (max-width: 1024px) {
  .features-grid-item {
    flex: 0 0 300px;
  }
  .features-grid-item img {
    height: 300px;
  }
  .features-grid-title {
    font-size: 18px;
  }
  .features-grid-subtitle {
    font-size: 14px;
  }
}
@media (max-width: 768px) {
  .key-features-section {
    padding: 40px 0;
  }
  .features-grid-item {
    flex: 0 0 300px;
  }
  .features-grid-item img {
    height: 300px;
  }
  .features-grid-title {
    font-size: 16px;
  }
  .features-grid-subtitle {
    font-size: 13px;
  }
}
@media (max-width: 480px) {
  .features-grid-item {
    flex: 0 0 300px;
  }
  .features-grid-item img {
    height: 300px;
  }
  .features-grid-title {
    font-size: 15px;
  }
  .features-grid-subtitle {
    font-size: 12px;
  }
  .features-popup-content {
    max-width: 95vw;
    max-height: 95vh;
  }
  .features-popup-title {
    font-size: 20px;
  }
  .features-popup-subtitle {
    font-size: 14px;
  }
}
/* Touch/Swipe Support */
.features-grid {
  touch-action: pan-x;
}
.features-grid-item {
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}
/* Animation for smooth transitions */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
.features-popup.active .features-popup-content {
  animation: fadeIn 0.3s ease-out;
}
/* Smooth scrolling behavior */
.features-grid-container {
  scroll-behavior: smooth;
}
@media screen and (max-width: 1440px) {
  .key-features-section {
    padding: 30px 15px;
  }
}