:root {
  --bg: #f3f5f7;
  --card-bg: #f7f8fa;
  --nav-bg: #e9ecef;
  --active: #1c4d86;
  --text-dark: #2d2d2d;
  --text-light: #6b7280;
  --dot: #1f3c88;
}

.ai-tabs-section .container {
  display: flex;
  gap: 30px;
  align-items: stretch; /* makes both sides equal height */
}

/* LEFT NAV */
.ai-tabs-section .tabs {
  width: 260px;
  display: flex;
  flex-direction: column;
}

.ai-tabs-section .tab {
  flex: 1;
}

.ai-tabs-section .tab:not(:last-child) {
  margin-bottom: 15px;
}

.ai-tabs-section .tab {
  padding: 20px;
  border-radius: 14px;
  background: var(--nav-bg);
  border: 2px solid transparent;
  cursor: pointer;
  font-weight: 500;
  color: var(--text-dark);
  transition: all 0.3s ease;
  flex: 1; /* makes all tabs equal height */
  display: flex;
  align-items: center;
}

.ai-tabs-section .tab:hover {
  transform: translateX(6px);
  background: #dde2e7;
}

.ai-tabs-section .tab.active {
  border-color: var(--active);
  background: #e3ebf9;
}

/* RIGHT CARD */
/* Gradient Border Wrapper */
.ai-tabs-section .content-border {
  flex: 1;
  padding: 15px;
  border-radius: 28px;
  display: flex;

  background: linear-gradient(
    145deg,
    rgb(0,0,0),
    rgb(28,77,134),
    rgb(0,0,0)
  );

  background-size: 300% 300%;
  animation: borderFlow 8s ease infinite;
}

@keyframes borderFlow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Inner Card */
.ai-tabs-section .content-card {
  flex: 1;
  background: var(--card-bg);
  border-radius: 22px; /* 28 - 6 = keeps symmetry */
  padding: 50px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

/* Decorative Rings */
.ai-tabs-section .decorative-shape {
    position: absolute;
    top: 0px;
    right: 10px;
    width: 230px;
    pointer-events: none;
}

/* Content Animation */
/* ===== Improved Content Animation ===== */

.ai-tabs-section .content {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: translateX(40px);
  transition: 
    opacity 0.45s ease,
    transform 0.45s cubic-bezier(.4,0,.2,1);
  pointer-events: none;
}

.ai-tabs-section .content.active {
  opacity: 1;
  transform: translateX(0);
  position: relative;
  pointer-events: auto;
}

.ai-tabs-section .content.exit-left {
  transform: translateX(-40px);
  opacity: 0;
}

.ai-tabs-section .content.enter-right {
  transform: translateX(40px);
  opacity: 0;
}

.ai-tabs-section .icon {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: #e3e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 25px;
  font-size: 22px;
}

.ai-tabs-section .icon img{
    height: 27px;
}

.ai-tabs-section h2 {
  margin: 0 0 15px;
  font-size: 26px;
  color: var(--text-dark);
}

.ai-tabs-section p {
  margin: 0 0 30px;
  color: var(--text-light);
  line-height: 1.6;
  max-width: 600px;
}

/* Feature Box */
.ai-tabs-section .features {
  background: #e9edf3;
  padding: 20px 30px;
  border-radius: 14px;

  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}

.ai-tabs-section .feature {
  display: flex;
  align-items: baseline;
  gap: 8px;
  color: var(--text-dark);
  font-size: 14px;
}

.ai-tabs-section .feature span {
  width: 8px;
  height: 8px;
  background: var(--dot);
  border-radius: 50%;
}

/* Staggered feature animation */
.ai-tabs-section .features .feature {
  opacity: 0;
  transform: translateY(15px);
  transition: 
    opacity 0.4s ease,
    transform 0.4s ease;
}

.ai-tabs-section .content.active .features .feature {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger delays */
.ai-tabs-section .content.active .features .feature:nth-child(1) { transition-delay: 0.1s; }
.ai-tabs-section .content.active .features .feature:nth-child(2) { transition-delay: 0.2s; }
.ai-tabs-section .content.active .features .feature:nth-child(3) { transition-delay: 0.3s; }
.ai-tabs-section .content.active .features .feature:nth-child(4) { transition-delay: 0.4s; }

/* Smooth height transition */
.ai-tabs-section .content-wrapper {
  position: relative;
  min-height: 280px;
}

@media (max-width: 768px) {
  .ai-tabs-section .container{
    flex-direction: column;
  }
  .ai-tabs-section .tabs {
		width: 100%;
		flex-direction: row;
		flex-wrap: wrap;
    gap: 10px;
	}

	.ai-tabs-section .tabs .tab {
		width: 50%;   /* 2 tabs per row */
		box-sizing: border-box;
	}

  .ai-tabs-section .decorative-shape{
    width: 150px;
  }
}