/* Why choose us */
.why-us {
  padding: 4rem 0 5rem;
  background: var(--bg-white);
  border-block: 1px solid var(--border);
  position: relative;
  margin-top: -2rem;
  z-index: 1;
}

.why-us .section-head {
  margin-bottom: 2.5rem;
}

.why-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: center;
  margin-bottom: 2.5rem;
}

.why-email,
.why-dev {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: center;
  margin-bottom: 2.5rem;
}

.why-split--graphic-right .why-dev-visual {
  order: 2;
}

.why-split--graphic-right .why-dev-content {
  order: 1;
}

.why-email-content h3,
.why-dev-content h3 {
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 1rem;
  color: var(--text);
}

.why-email-content p,
.why-dev-content p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.65;
}

.why-email-visual,
.why-dev-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 280px;
  padding: 1.5rem;
  background: linear-gradient(145deg, rgba(5, 153, 128, 0.08), rgba(5, 153, 128, 0.04));
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
}

.why-email-visual img,
.why-email-visual svg,
.why-dev-visual img,
.why-dev-visual svg {
  width: 100%;
  max-width: 420px;
  height: auto;
}

.why-tabs-wrap--dev {
  margin-top: 0.5rem;
}

/* Tabs */
.why-tabs-wrap {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.why-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
}

.why-tabs-wrap--dev .why-tab {
  min-width: 140px;
}

.why-tab {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex: 1;
  min-width: 160px;
  padding: 0.85rem 1rem;
  background: var(--bg-white);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  text-align: left;
  font-family: var(--font);
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.why-tab:hover {
  border-color: rgba(5, 153, 128, 0.35);
}

.why-tab.active {
  border-color: var(--primary);
  background: var(--primary-soft);
  box-shadow: var(--shadow-sm);
}

.why-tab-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-white);
  border-radius: 10px;
  border: 1px solid var(--border);
}

.why-tab.active .why-tab-icon {
  border-color: rgba(5, 153, 128, 0.2);
}

.why-tab-icon svg {
  width: 22px;
  height: 22px;
}

.why-tab-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.25;
}

.why-panels {
  position: relative;
  min-height: 140px;
}

.why-panel {
  display: none;
  animation: whyFade 0.35s ease;
}

.why-panel.active {
  display: block;
}

@keyframes whyFade {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.why-panel h4 {
  font-size: 1.1rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
  color: var(--text);
}

.why-panel p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.65;
  max-width: 52rem;
}

@media (max-width: 1024px) {
  .why-email,
  .why-dev {
    grid-template-columns: 1fr;
  }

  .why-email-visual,
  .why-dev-visual {
    order: -1;
    min-height: 220px;
  }

  .why-split--graphic-right .why-dev-visual,
  .why-split--graphic-right .why-dev-content {
    order: unset;
  }
}

@media (max-width: 768px) {
  .why-us {
    padding: 3rem 0;
  }

  .why-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    padding-bottom: 0.25rem;
  }

  .why-tab {
    min-width: 140px;
    flex: 0 0 auto;
  }
}

@media (max-width: 480px) {
  .why-tabs {
    flex-direction: column;
    overflow-x: visible;
  }

  .why-tab {
    min-width: 0;
    width: 100%;
  }
}
