/* ==========================================================================
   PropNetwork - "Who It's Built For" Section CSS
   Author: PropNetwork Product Design Team
   Description: Premium SaaS role feature section matching Stripe/Slack quality.
                Features deep green brand gradient background, star sparkles,
                subtle bottom white wave curve, role selection menu, and white card.
   ========================================================================== */

.who-built-for-section {
  position: relative;
  padding: 5.5rem 0 8.5rem 0;
  background: linear-gradient(180deg, #063A36 0%, #08433F 35%, #0A4F4B 70%, #0F766E 100%);
  overflow: hidden;
  color: #ffffff;
  z-index: 1;
}

/* Soft Radial Lighting Backdrop Behind White Card */
.who-built-for-section::before {
  content: '';
  position: absolute;
  top: 15%;
  right: 5%;
  width: 55%;
  height: 70%;
  background: radial-gradient(circle at 60% 50%, rgba(255, 255, 255, 0.05) 0%, transparent 65%);
  pointer-events: none;
  z-index: 0;
}

/* Corner Vector Wave Motifs */
.bg-wave-lines {
  position: absolute;
  pointer-events: none;
  z-index: 0;
  opacity: 0.18;
}

.bg-wave-lines--left {
  bottom: 10%;
  left: -2%;
  width: 320px;
  height: 320px;
}

.bg-wave-lines--right {
  top: 15%;
  right: -2%;
  width: 360px;
  height: 360px;
}

/* Subtle Star Sparkles Accent */
.bg-stars-accent {
  position: absolute;
  pointer-events: none;
  z-index: 1;
}

.bg-stars-accent--top-left {
  top: 3.5rem;
  left: clamp(2rem, 6vw, 6rem);
}

.bg-stars-accent--top-right {
  top: 3.5rem;
  right: clamp(2rem, 6vw, 6rem);
}

.bg-stars-accent--bottom-right {
  bottom: 8rem;
  right: clamp(2rem, 5vw, 5rem);
}

/* Section Header Styling */
.who-built-for-header {
  text-align: center;
  position: relative;
  z-index: 2;
  margin-bottom: 3.5rem;
}

.who-built-for-title {
  font-family: var(--font-body, 'Inter', sans-serif);
  font-size: clamp(2.1rem, 3.2vw, 2.85rem);
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 0.4rem;
  letter-spacing: -0.025em;
}

.who-built-for-header-accent {
  width: 32px;
  height: 3px;
  background-color: #14B8A6;
  border-radius: 2px;
  margin: 0.5rem auto 1.15rem;
}

.who-built-for-subtitle {
  font-size: clamp(1rem, 1.15vw, 1.15rem);
  font-weight: 400;
  color: rgba(255, 255, 255, 0.84);
  max-width: 500px;
  margin: 0 auto;
  line-height: 1.5;
}

/* Main 2-Column Grid Architecture */
.who-built-for-grid {
  display: grid;
  grid-template-columns: minmax(0, 320px) minmax(0, 1fr);
  gap: clamp(2rem, 4vw, 4rem);
  align-items: center;
  position: relative;
  z-index: 2;
}

/* Left Vertical Menu List */
.who-built-for-menu {
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 100%;
}

.role-menu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.15rem 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.85);
  font-size: 1.05rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 14px;
  position: relative;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.role-menu-item:last-child {
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.role-menu-item-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.role-menu-icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.85);
  flex-shrink: 0;
  transition: color 0.2s ease;
}

.role-menu-item:hover {
  color: #ffffff;
  background-color: rgba(255, 255, 255, 0.06);
}

.role-menu-item:hover .role-menu-icon {
  color: #ffffff;
}

/* Active Menu Item State */
.role-menu-item.active {
  background-color: rgba(15, 118, 110, 0.48);
  color: #ffffff;
  border-bottom-color: transparent;
  box-shadow: inset 0 0 0 1px rgba(20, 184, 166, 0.28);
}

.role-menu-item.active .role-menu-icon {
  color: #ffffff;
}

/* Active Teal Indicator Line on Left Edge */
.role-menu-indicator {
  position: absolute;
  left: 0;
  top: 15%;
  bottom: 15%;
  width: 4px;
  background-color: #14B8A6;
  border-radius: 0 4px 4px 0;
  display: none;
}

.role-menu-item.active .role-menu-indicator {
  display: block;
}

/* Chevron Arrow Right Icon on Active Item */
.role-menu-chevron {
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.role-menu-item.active .role-menu-chevron {
  opacity: 1;
}

/* Right White Information Card */
.who-built-for-card {
  background: #ffffff;
  border-radius: 10px;
  padding: clamp(1.4rem, 2.2vw, 2rem);
  box-shadow: 0 20px 50px rgba(6, 58, 54, 0.22);
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  transition: opacity 0.22s ease-in-out, transform 0.22s ease-in-out;
}

.who-built-for-card.fade-out {
  opacity: 0;
  transform: translateY(6px);
}

/* Card Header Section */
.card-role-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.card-role-icon-badge {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background-color: #E6F7F5;
  color: #0F766E;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.card-role-icon-badge svg {
  width: 26px;
  height: 26px;
}

.card-role-title {
  font-family: var(--font-body, 'Inter', sans-serif);
  font-size: clamp(1.45rem, 1.8vw, 1.8rem);
  font-weight: 800;
  color: #0F766E;
  margin: 0;
  letter-spacing: -0.02em;
}

/* Card Description Text */
.card-role-description {
  font-size: 1rem;
  color: #334155;
  line-height: 1.55;
  margin-bottom: 1.15rem;
  max-width: 620px;
}

/* Teal Underline Accent inside Card */
.card-role-accent-bar {
  width: 32px;
  height: 3px;
  background-color: #14B8A6;
  border-radius: 2px;
  margin-bottom: 1.25rem;
}

/* Subtle Horizontal Separator inside Card */
.card-role-divider {
  width: 100%;
  height: 1px;
  background-color: #e2e8f0;
  margin: 1.25rem 0;
}

/* Two-Column Checklist Grid */
.card-checklist-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem 1.5rem;
  margin-bottom: 1.5rem;
}

.card-checklist-item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 1rem;
  font-weight: 600;
  color: #1e293b;
}

.card-checklist-icon {
  width: 18px;
  height: 18px;
  color: #0F766E;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Card Bottom CTA Link */
.card-role-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: #0F766E;
  font-size: 0.98rem;
  font-weight: 700;
  text-decoration: none;
  position: relative;
  padding-bottom: 3px;
  transition: color 0.2s ease;
}

.card-role-cta::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 32px;
  height: 2.5px;
  background-color: #14B8A6;
  border-radius: 2px;
  transition: width 0.25s ease;
}

.card-role-cta:hover {
  color: #0d9488;
}

.card-role-cta:hover::after {
  width: 100%;
}

.card-role-cta svg {
  transition: transform 0.2s ease;
}

.card-role-cta:hover svg {
  transform: translateX(4px);
}

/* Smooth Subtle Bottom White Concave Wave Divider */
.who-built-for-bottom-divider {
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  overflow: hidden;
  line-height: 0;
  z-index: 3;
  pointer-events: none;
}

.who-built-for-bottom-divider svg {
  position: relative;
  display: block;
  width: calc(100% + 1.3px);
  height: clamp(45px, 5.5vw, 85px);
}

.who-built-for-bottom-divider path {
  fill: #fafafa;
}

/* ==========================================================================
   Responsive Adaptations for Tablet & Mobile Viewports
   ========================================================================== */
@media (max-width: 991.98px) {
  .bg-stars-accent--top-left {
    top: 0.75rem;
    left: 0.5rem;
    width: 90px;
    height: 65px;
    opacity: 0.35;
  }

  .bg-stars-accent--top-right {
    top: 0.75rem;
    right: 0.5rem;
    width: 90px;
    height: 65px;
    opacity: 0.35;
  }

  .who-built-for-header {
    margin-bottom: 2rem;
  }

  .who-built-for-title {
    font-size: clamp(1.85rem, 6.8vw, 2.3rem);
    line-height: 1.16;
  }

  .who-built-for-subtitle {
    font-size: 0.92rem;
    line-height: 1.48;
    padding: 0 0.5rem;
  }

  .who-built-for-grid {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }

  .who-built-for-menu {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.45rem;
  }

  .role-menu-item {
    border-bottom: none;
    background-color: rgba(255, 255, 255, 0.06);
    padding: 0.65rem 0.5rem;
    font-size: 0.85rem;
    justify-content: flex-start;
    border-radius: 10px;
  }

  .role-menu-item-left {
    justify-content: flex-start;
    gap: 0.45rem;
    min-width: 0;
  }

  .role-menu-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
  }

  .role-menu-icon svg {
    width: 18px;
    height: 18px;
  }

  .role-menu-item-left span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .role-menu-chevron {
    display: none;
  }

  .role-menu-indicator {
    position: absolute;
    left: 0;
    top: 15%;
    bottom: 15%;
    width: 4px;
    height: auto;
    right: auto;
    background-color: #14B8A6;
    border-radius: 0 4px 4px 0;
  }

  .who-built-for-card {
    padding: 1.5rem 1.25rem;
    border-radius: 16px;
  }

  .card-role-header {
    margin-bottom: 0.75rem;
    gap: 0.75rem;
  }

  .card-role-icon-badge {
    width: 46px;
    height: 46px;
    border-radius: 11px;
  }

  .card-role-icon-badge svg {
    width: 22px;
    height: 22px;
  }

  .card-role-title {
    font-size: 1.4rem;
  }

  .card-role-description {
    font-size: 0.92rem;
    line-height: 1.5;
    margin-bottom: 0.85rem;
  }

  .card-checklist-grid {
    grid-template-columns: 1fr;
    gap: 0.65rem;
  }

  .card-checklist-item {
    font-size: 0.88rem;
    gap: 0.45rem;
  }
}

@media (max-width: 640px) {
  .who-built-for-section {
    padding: 3rem 0 5rem 0;
  }

  .who-built-for-menu {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.45rem;
  }

  .role-menu-item {
    padding: 0.62rem 0.45rem;
    font-size: 0.82rem;
  }

  .role-menu-icon {
    width: 16px;
    height: 16px;
  }

  .role-menu-icon svg {
    width: 16px;
    height: 16px;
  }

  .who-built-for-card {
    padding: 1.25rem 1.1rem;
    border-radius: 16px;
  }

  .card-role-icon-badge {
    width: 42px;
    height: 42px;
    border-radius: 10px;
  }

  .card-role-icon-badge svg {
    width: 20px;
    height: 20px;
  }
}