/* === Modern Features Section === */
.features-section {
  padding: 3rem 1rem;
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  position: relative;
  overflow: hidden;
}

.features-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: radial-gradient(
      circle at 25% 25%,
      rgba(16, 185, 129, 0.03) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 75% 75%,
      rgba(16, 185, 129, 0.03) 0%,
      transparent 50%
    );
  pointer-events: none;
}

.features-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 4rem;
  position: relative;
  z-index: 2;
}

.features-title {
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #1f2937, #374151);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.features-subtitle {
  font-size: 1.125rem;
  color: #6b7280;
  line-height: 1.6;
  margin: 0;
}

.features-container {
  position: relative;
  z-index: 2;
  max-width: 1200px;
  margin: 0 auto;
}

.features-carousel {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  padding: 0;
}

.feature-card {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  padding: 1.25rem;
  position: relative;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.1);
  animation: fadeInUp 0.8s ease-out both;
  overflow: hidden;
}

.feature-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #10b981, #059669);
  border-radius: 20px 20px 0 0;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.feature-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1), 0 8px 16px rgba(0, 0, 0, 0.08);
  border-color: rgba(16, 185, 129, 0.2);
}

.feature-card:hover::before {
  transform: scaleX(1);
}

.feature-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #10b981, #059669);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  color: white;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.feature-card:hover .feature-icon {
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.feature-content {
  flex: 1;
}

.feature-title {
  font-size: 1.375rem;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 0.75rem;
  line-height: 1.3;
}

.feature-description {
  font-size: 1rem;
  color: #6b7280;
  line-height: 1.6;
  margin: 0;
}

/* Mobile-first enhancements */
@media (min-width: 481px) {
  .features-section {
    padding: 4rem 1.5rem;
  }
}

@media (min-width: 769px) {
  .features-section {
    padding: 5rem 2rem;
  }

  .features-header {
    margin-bottom: 3rem;
  }

  .features-carousel {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }

  .feature-card {
    padding: 2rem;
    border-radius: 20px;
  }

  .feature-title {
    font-size: 1.25rem;
  }

  .feature-description {
    font-size: 0.95rem;
  }
}

/* Responsive adjustments */
.hero {
  min-height: 60vh;
  padding: 3rem 1.5rem;
}

.hero-content {
  max-width: 100%;
}

.hero h1 {
  margin-bottom: 1.25rem;
}

.hero p {
  margin-bottom: 2rem;
}

.btn {
  width: 100%;
  max-width: 280px;
}

@media (min-width: 769px) {
  .features-carousel {
    justify-content: initial;
  }
}

/* Section layout */
.integrations-section {
  padding: 4rem 2rem;
  background-color: #f9fafb;
}

.integrations-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 2rem;
  text-align: center;
}

.integrations-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

/* Integration cards */
.integration {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 1.5rem;
  text-align: center;
}

.integration-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.integration-link {
  display: block; /* ensures it sits above images */
  margin-bottom: 1rem;
  color: #2563eb;
  font-weight: 500;
  text-decoration: none;
}

.integration-link:hover {
  text-decoration: underline;
}

/* Images inside integrations */
.integration-images {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap; /* default for small screens */
}

.integration-img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  border: 1px solid #e5e7eb;
  cursor: pointer;
}

/* Lightbox styles */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.lightbox-overlay.active {
  display: flex;
}

.lightbox-image {
  max-width: 90%;
  max-height: 90%;
  border-radius: 6px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 2rem;
  color: white;
  cursor: pointer;
}

/* Laptop+ adjustments: keep two web images side-by-side */
@media (min-width: 1024px) {
  .integration-images {
    flex-wrap: nowrap; /* prevent wrapping */
  }

  .integration-images img {
    flex: 1 1 auto; /* equal growth/shrink */
    max-width: 48%; /* fit side-by-side with gap */
    height: auto;
  }
}
