/* OUTER WRAPPER */
.kl-features-03 {
  background: transparent;
  padding: 0;
  box-shadow: none;
}

/* TAB LIST */
.kl-features-03__titles {
  list-style: none;
  display: flex;
  gap: 10px;
  margin: 0 0 40px;
  padding: 0;
  justify-content: center;
}

/* TAB PILL CONTAINER */
.kl-features-03__titles li {
  display: inline-flex;
  align-items: center;
  border-radius: 10px;
  padding: 6px 14px;
  background: #f0f0f0;
  color: #666666;
  height: 40px;
  cursor: pointer;
  border: 1px solid #e3e3e3;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
  white-space: nowrap;
}

/* TAB TEXT */
.kl-features-03__titles li h4 {
  margin: 0;
  font-size: 14px;
  line-height: 1.2;
  font-weight: 600;
  color: inherit;
  letter-spacing: 0.01em;
  display: inline-block;
}

/* Preserve inline formatting inside */
.kl-features-03__titles li h4 strong { font-weight: 700; }
.kl-features-03__titles li h4 em { font-style: italic; }
.kl-features-03__titles li h4 .accent { font-weight: 700; }

/* Hover state */
.kl-features-03__titles li:hover {
  background: #e6e6e6;
}

/* ACTIVE TAB PILL */
.kl-features-03__titles li.active {
  background: #000;
  border: 2px solid #ed1c24;
}

/* ACTIVE TAB TEXT — force white, no underline */
.kl-features-03__titles li.active h4,
.kl-features-03__titles li.active h4 a {
  color: #fff !important;
  text-decoration: none !important;
  border-bottom: 0 !important;
  background-image: none !important;
  box-shadow: none !important;
}

/* Prevent underline on hover/focus too */
.kl-features-03__titles li.active h4:hover,
.kl-features-03__titles li.active h4 a:hover,
.kl-features-03__titles li.active h4:focus,
.kl-features-03__titles li.active h4 a:focus {
  text-decoration: none !important;
}

/* Kill any pseudo-element "underlines" */
.kl-features-03__titles li h4::after,
.kl-features-03__titles li h4::before,
.kl-features-03__titles li.active h4::after,
.kl-features-03__titles li.active h4::before {
  content: none !important;
  display: none !important;
}

/* MAIN CONTENT PANEL */
.kl-features-03__sections {
  background: linear-gradient(to right, #fbb03b1a, #ed1c241a);
  border-radius: 16px;
  padding: 10px !important;
  box-shadow: 0 8px 24px rgba(0,0,0,.06);
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 20px;
  align-items: center;
  margin: 0;
}

/* Only show active section */
.kl-features-03__section {
  display: none;
  padding: 0px !important;
}
.kl-features-03__section.active {
  display: contents;
}

.kl-features-03__content {
  margin: 0;
  padding: 16px;
  align-self: start;
  flex-direction: column;
  height: 100%;
}

.kl-features-03__image {
  margin: 0;
  padding: 0;
}

/* Image styling */
.kl-features-03__image img {
  max-width: 100%;
  border-radius: 16px;
  margin: 0;
  padding: 0;
}

.kl-features-03__content h1,
.kl-features-03__content h2,
.kl-features-03__content h3,
.kl-features-03__content h4 {
  font-size: 30px;
  font-weight: 600;
  color: #000;
  margin-bottom: 16px;
  text-align: left;
}

.kl-features-03__content .button,
.kl-features-03__content .btn {
  margin-top: auto;
  align-self: flex-start;
}

/* Scope only to lists inside your feature content */
.kl-features-03__content ul {
  list-style: disc outside;
  margin: 20px 0 0px 0;
  padding-left; 1.25rem;
  margin-bottom: 48px; 
}

.kl-features-03__content ul li {
  position: list-item;
  margin: 0 0 14px 0;
  font-size: 18px;
  font-weight: 400;
  line-height: 1.5;
  color: #666666;
  margin-bottom: 10px;
}

/* ================================
   Product Features 03 – body copy
   ================================ */

.kl-features-03__content .kl-rich-text {
  max-width: 62ch;
}

.kl-features-03__content .kl-rich-text :is(h1,h2,h3,h4,h5,h6) {
  margin: 0 0 10px 0;
  line-height: 1.25;
}

/* Case A: body copy is a <p> */
.kl-features-03__content .kl-rich-text p {
  font-size: 16px;
  line-height: 1.6;
  font-weight: 400;
  color: #333;
  margin: 0 0 16px 0;
}

/* Case C: body copy is a <span> directly after the heading */
.kl-features-03__content .kl-rich-text :is(h1,h2,h3,h4,h5,h6) + span {
  display: block;
  font-size: 16px;
  line-height: 1.6;
  font-weight: 400;
  color: #333;
  margin: 0 0 16px 0;
}

/* Links inside the body copy */
.kl-features-03__content .kl-rich-text :is(p,div,span) a {
  color: #ed1c24;
  text-decoration: underline;
}
.kl-features-03__content .kl-rich-text :is(p,div,span) a:hover {
  text-decoration: none;
}

/* Tighten the gap before the CTA buttons area */
.kl-features-03__content .kl-rich-text__buttons {
  margin-top: 8px;
}

/* Remove accidental extra bottom margin on the last text node */
.kl-features-03__content .kl-rich-text > *:last-child {
  margin-bottom: 0 !important;
}

/* Body text under heading (exclude buttons) */
.kl-features-03__content .kl-rich-text :is(p,div,span):not(.kl-rich-text__buttons):not(.kl-rich-text__buttons *),
.kl-features-03__content .kl-rich-text :is(h1,h2,h3,h4,h5,h6) + :is(p,div,span):not(.kl-rich-text__buttons):not(.kl-rich-text__buttons *) {
  font-size: 16px;
  line-height: 1.6;
  font-weight: 400;
  color: #666;
  margin-bottom: 24px;
}

/* CTA buttons inside the rich text block */
.kl-features-03__content .kl-rich-text__buttons .button,
.kl-features-03__content .kl-rich-text__buttons .btn,
.kl-features-03__content .kl-rich-text__buttons a {
  color: #fff !important;
  text-decoration: none !important;
}

/* Optional hover effect */
.kl-features-03__content .kl-rich-text__buttons a:hover {
  text-decoration: none !important;
  opacity: 0.9;
}

/* ================================
   MOBILE RESPONSIVE STYLES
   ================================ */

@media (max-width: 768px) {
  /* Make tabs scrollable horizontally on mobile */
  .kl-features-03__titles {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    justify-content: flex-start;
    margin: 0 0 24px;
    padding: 0 8px 8px;
    gap: 8px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }
  
  /* Smaller tab pills on mobile */
  .kl-features-03__titles li {
    padding: 8px 12px;
    height: 36px;
    flex-shrink: 0;
  }
  
  .kl-features-03__titles li h4 {
    font-size: 13px;
    margin: 6px;
  }
  
  /* Stack content vertically on mobile */
  .kl-features-03__sections {
    grid-template-columns: 1fr;
    padding: 0 !important;
    gap: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    margin: 0 16px;
  }
  
  /* Image appears first, then content */
  .kl-features-03__section.active {
    display: flex;
    flex-direction: column;
    gap: 16px;
    background: linear-gradient(to right, #fbb03b1a, #ed1c241a);
    border-radius: 16px;
    padding: clamp(20px, 3vw, 36px);
    box-shadow: 0 8px 24px rgba(0,0,0,.06);
    min-height: auto;
    height: auto;
    position: relative;
  }
  
  /* Gradient border using pseudo-element */
  .kl-features-03__section.active::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 16px;
    border: 6px;
    padding: 2px;
    background: linear-gradient(to right, #fbb03b1a, #ed1c241a);
    -webkit-mask: 
      linear-gradient(#fff 0 0) content-box, 
      linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
  }
  
  .kl-features-03__image {
    order: 1;
    width: 100%;
    margin: 0;
    flex-shrink: 0;
  }
  
  .kl-features-03__image img {
    border-radius: 12px;
    display: block;
    width: 100%;
    height: auto;
  }
  
  .kl-features-03__content {
    order: 2;
    padding: 0 8px;
    height: auto;
    min-height: auto;
    display: block;
    margin: 0;
    flex-shrink: 1;
  }
  
  /* Smaller heading on mobile */
  .kl-features-03__content h1,
  .kl-features-03__content h2,
  .kl-features-03__content h3,
  .kl-features-03__content h4 {
    font-size: 24px;
    margin-bottom: 16px;
    margin-top: 0;
  }
  
  /* Adjust body text size */
  .kl-features-03__content .kl-rich-text :is(p,div,span):not(.kl-rich-text__buttons):not(.kl-rich-text__buttons *),
  .kl-features-03__content .kl-rich-text :is(h1,h2,h3,h4,h5,h6) + :is(p,div,span):not(.kl-rich-text__buttons):not(.kl-rich-text__buttons *) {
    font-size: 15px;
    line-height: 1.55;
    margin-bottom: 16px;
    margin-top: 0;
  }
  
  /* Smaller list items */
  .kl-features-03__content ul {
    margin: 0 0 16px 0;
    padding-left: 1rem;
    list-style: disc outside;
  }
  
  .kl-features-03__content ul li {
    font-size: 14px;
    padding: 6px;
    padding-left: 10px;
    margin-bottom: 6px;
    font-weight: 400;
  }
  
  .kl-features-03__content ul li:last-child {
    margin-bottom: 0;
  }
  
  /* Compact button styling on mobile */
  .kl-features-03__content .button,
  .kl-features-03__content .btn,
  .kl-features-03__content .kl-rich-text__buttons .button,
  .kl-features-03__content .kl-rich-text__buttons .btn,
  .kl-features-03__content .kl-rich-text__buttons a {
    display: inline-block;
    width: auto;
    max-width: 100%;
    padding: 12px 24px;
    margin: 0;
    box-sizing: border-box;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  
  .kl-features-03__content .kl-rich-text__buttons {
    margin: 16px 0 0 0;
    padding: 0;
    display: block;
  }
  
  /* Aggressively remove ALL extra spacing */
  .kl-features-03__content .kl-rich-text {
    margin: 0;
    padding: 0;
    display: block;
  }
  
  .kl-features-03__content .kl-rich-text > *:last-child,
  .kl-features-03__content > *:last-child,
  .kl-features-03__content .kl-rich-text__buttons:last-child,
  .kl-features-03__content *:last-child {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
  }
  
  /* Force content wrapper to have no bottom space */
  .kl-features-03__section.active .kl-features-03__content {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
  }
}

/* Extra small mobile screens */
@media (max-width: 480px) {
  .kl-features-03__titles {
    margin: 0 0 16px;
    padding: 0 4px 6px;
  }
  
  .kl-features-03__titles li {
    padding: 6px 10px;
    height: 32px;
  }
  
  .kl-features-03__titles li h4 {
    font-size: 12px;
  }
  
  .kl-features-03__section.active {
    padding: 16px;
    gap: 16px;
  }
  
  .kl-features-03__content h1,
  .kl-features-03__content h2,
  .kl-features-03__content h3,
  .kl-features-03__content h4 {
    font-size: 20px;
    margin-bottom: 10px;
  }
}