/* Features Section */
.features {
  display: flex;
  gap: clamp(20px, 5vw, 60px);
  padding: clamp(30px, 6vw, 80px) clamp(20px, 5vw, 60px);
  background: var(--mint-50);
  flex-wrap: wrap;
}

.features .container {
  display: flex;
  gap: clamp(20px, 5vw, 60px);
  flex-wrap: wrap;
  width: 100%;
}

.feature {
  flex: 1 1 clamp(250px, 45%, 400px);
  min-width: 250px;
}

.feature h3 {
  font-size: clamp(18px, 3vw, 24px);
  color: var(--brand);
}

.feature p {
  font-size: clamp(14px, 2vw, 18px);
  line-height: 1.6;
}

/* Product Features Section */
.product-features {
  padding: 8vw 8vw 6vw 8vw;
  background: var(--sand-50);
  overflow: hidden;
}

.product-features .container {
  width: 100%;
}

.features-scroll-container {
  display: flex;
  gap: 0;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding: 20px 0;
  scrollbar-width: none;
  -ms-overflow-style: none;
  scroll-snap-type: x mandatory;
}

.features-scroll-container::-webkit-scrollbar {
  display: none;
}

.feature-card {
  display: flex;
  align-items: center;
  gap: clamp(32px, 5vw, 80px);
  flex: 0 0 100%;
  width: 100%;
  padding: 20px;
  scroll-snap-align: start;
  box-sizing: border-box;
  position: relative;
}

.feature-image {
  flex: 0 0 auto;
  width: clamp(135px, 27vw, 280px);
}

.feature-image img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

.feature-content {
  flex: 1;
  min-width: 280px;
  text-align: center;
}

.feature-content h2 {
  font-size: clamp(28px, 6vw, 48px);
  color: var(--brand);
  margin-bottom: 16px;
}

.feature-content h3 {
  font-size: clamp(16px, 1.8vw, 22px);
  font-weight: 400;
  line-height: 1.6;
  color: var(--muted);
  max-width: clamp(260px, 90vw, 700px);
  margin: 0 auto;
  text-align: center;
}

/* Treemap colors and legend - use variables for easy theming */
.treemap-rect.rent {
  background: var(--treemap-rent, #4E79A7);
}
.treemap-rect.groceries {
  background: var(--treemap-groceries, #F28E2B);
}
.treemap-rect.dining {
  background: var(--treemap-dining, #E15759);
}
.treemap-rect.transport {
  background: var(--treemap-transport, #76B7B2);
}
.treemap-rect.utilities {
  background: var(--treemap-utilities, #59A14F);
}
.treemap-rect.shopping {
  background: var(--treemap-shopping, #EDC948);
}
.treemap-rect.health {
  background: var(--treemap-health, #B07AA1);
}
.treemap-rect.subscriptions {
  background: var(--treemap-subscriptions, #FF9DA7);
}

.legend-color.rent {
  background: var(--treemap-rent, #4E79A7);
}
.legend-color.groceries {
  background: var(--treemap-groceries, #F28E2B);
}
.legend-color.dining {
  background: var(--treemap-dining, #E15759);
}
.legend-color.transport {
  background: var(--treemap-transport, #76B7B2);
}
.legend-color.utilities {
  background: var(--treemap-utilities, #59A14F);
}
.legend-color.shopping {
  background: var(--treemap-shopping, #EDC948);
}
.legend-color.health {
  background: var(--treemap-health, #B07AA1);
}
.legend-color.subscriptions {
  background: var(--treemap-subscriptions, #FF9DA7);
}

.scroll-indicator {
  margin-top: 20px;
  text-align: center;
  opacity: 0.7;
}

.scroll-text {
  font-size: 14px;
  color: var(--muted);
  font-style: italic;
}

.nav-arrow {
  position: absolute;
  top: 10px;
  right: 20px;
  transform: none;
  background: none;
  color: var(--brand);
  border: none;
  border-radius: 0;
  width: 64px;
  height: 64px;
  font-size: 32px;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}

.nav-arrow:hover {
  background: none;
  transform: scale(1.1);
  color: var(--brand-700);
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
  .nav-arrow {
    width: 48px;
    height: 48px;
    font-size: 24px;
    background: none;
    color: #045D56;
    border: none;
    border-radius: 0;
    font-weight: bold;
    top: 20px;
    right: 20px;
    transform: none;
  }

  .nav-arrow:hover {
    background: none;
    transform: scale(1.05);
    color: #045d56;
  }
}

@media (max-width: 480px) {
  .feature-card {
    flex-direction: column;
    text-align: center;
  }

  .feature-image {
    margin-bottom: 16px;
  }

  .features {
    padding: 40px 20px;
  }

  .product-features {
    padding: 60px 20px 40px 20px;
  }

  .nav-arrow {
    width: 40px;
    height: 40px;
    font-size: 18px;
    top: 20px;
    right: 20px;
    transform: none;
  }
}

