/*
 * Features Detailed Section
 * Dynamic bento-style grid with varied layouts
 */

.features-detailed {
  max-width: 1400px;
  margin: 4rem auto 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 1024px) {
  .features-detailed {
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem;
  }
}

/* Base Feature Card */
.feature-detail {
  background: var(--white);
  border-radius: 24px;
  padding: 2.5rem;
  box-shadow: 0 4px 20px rgba(0,0,0,.06);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  position: relative;
  overflow: hidden;
  border: 2px solid transparent;
}

.feature-detail:hover {
  box-shadow: 0 12px 40px rgba(0,102,255,.15);
  transform: translateY(-4px);
  border-color: rgba(0,102,255,.2);
}

/* First Card - Flow Path (Full Width Hero) */
.feature-detail:nth-child(1) {
  background: linear-gradient(135deg, #f0f7ff 0%, #ffffff 100%);
  border: 2px solid rgba(0,102,255,.15);
}

@media (min-width: 1024px) {
  .feature-detail:nth-child(1) {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    padding: 3.5rem;
  }
}

/* Graphic Treatments */
.feature-detail-graphic {
  width: 100%;
  height: auto;
  border-radius: 16px;
  box-shadow: 0 8px 30px rgba(0,0,0,.12);
  transition: all 0.3s ease;
}

.feature-detail:hover .feature-detail-graphic {
  transform: scale(1.02);
  box-shadow: 0 12px 40px rgba(0,102,255,.2);
}

@media (min-width: 1024px) {
  .feature-detail:nth-child(1) .feature-detail-graphic {
    order: 2;
  }

  .feature-detail:nth-child(1) .feature-detail-content {
    order: 1;
  }
}

/* Cards 2-5: Alternating Layouts */
@media (min-width: 1024px) {
  /* Elevation - Graphic on Right */
  .feature-detail:nth-child(2) {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .feature-detail:nth-child(2) .feature-detail-graphic {
    max-width: 100%;
  }

  /* Ponding - Graphic on Right */
  .feature-detail:nth-child(3) {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .feature-detail:nth-child(3) .feature-detail-graphic {
    max-width: 100%;
  }

  /* Wetness - Graphic on Right */
  .feature-detail:nth-child(4) {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .feature-detail:nth-child(4) .feature-detail-graphic {
    max-width: 100%;
  }

  /* Design Tools - Graphic on Right */
  .feature-detail:nth-child(5) {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .feature-detail:nth-child(5) .feature-detail-graphic {
    max-width: 100%;
  }
}

/* Elevation Card - Subtle Accent */
.feature-detail:nth-child(2) {
  border-left: 4px solid rgba(0,102,255,.3);
}

/* Ponding Card - Teal Accent */
.feature-detail:nth-child(3) {
  border-left: 4px solid rgba(0,212,255,.4);
}

/* Wetness Card - Green Accent */
.feature-detail:nth-child(4) {
  background: linear-gradient(135deg, rgba(100,255,180,.05) 0%, #ffffff 100%);
  border-left: 4px solid rgba(50,200,120,.4);
}

/* Design Tools - Orange Accent */
.feature-detail:nth-child(5) {
  border-left: 4px solid rgba(255,150,0,.4);
}

/* Card 6: Export & Download - Purple Accent */
.feature-detail:nth-child(6) {
  border-left: 4px solid rgba(147,51,234,.4);
}

/* Card 7: Always Updated (Accent Style, Sits Next to Card 6 on Desktop) */
.feature-detail:nth-child(7) {
  background: linear-gradient(135deg, rgba(0,212,255,.08) 0%, rgba(0,102,255,.08) 100%);
  border: 2px dashed rgba(0,102,255,.3);
  padding: 3rem 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.feature-detail-content {
  flex: 1;
}

.feature-detail-icon {
  font-size: 2.5rem;
  line-height: 1;
  margin-bottom: 1rem;
}

@media (min-width: 1024px) {
  .feature-detail-icon {
    font-size: 3rem;
  }
}

.feature-detail-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 1rem;
  line-height: 1.3;
}

@media (min-width: 768px) {
  .feature-detail-title {
    font-size: 1.75rem;
  }
}

@media (min-width: 1024px) {
  .feature-detail-title {
    font-size: 2rem;
  }

  /* Larger title for hero card */
  .feature-detail:nth-child(1) .feature-detail-title {
    font-size: 2.25rem;
  }
}

.feature-detail-intro {
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--dark);
  margin-bottom: 1.5rem;
  font-weight: 500;
}

.feature-detail-text {
  font-size: 1.0625rem;
  line-height: 1.8;
  color: var(--dark);
  margin-bottom: 1.25rem;
}

.feature-detail-text:last-child {
  margin-bottom: 0;
}

.feature-detail-list {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
}

.feature-detail-list li {
  padding: 0.875rem 0;
  padding-left: 2.5rem;
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--dark);
  position: relative;
  border-bottom: 1px solid rgba(0,0,0,.05);
}

.feature-detail-list li:last-child {
  border-bottom: none;
}

.feature-detail-list li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: 700;
  font-size: 1.25rem;
}

/* Bottom Line - Special Styling (Full Width, Gradient) */
.feature-bottom-line {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  border-radius: 24px;
  padding: 3rem 2.5rem;
  text-align: center;
  border: none;
  box-shadow: 0 10px 40px rgba(0,102,255,.2);
  position: relative;
  overflow: hidden;
}

.feature-bottom-line::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,.15) 0%, transparent 70%);
  opacity: 0.5;
}

@media (min-width: 768px) {
  .feature-bottom-line {
    padding: 4rem 5rem;
  }
}

@media (min-width: 1024px) {
  .feature-bottom-line {
    grid-column: 1 / -1;
    padding: 4.5rem 6rem;
  }
}

.feature-bottom-line .feature-detail-icon {
  font-size: 4rem;
  margin-bottom: 1.5rem;
  position: relative;
  z-index: 1;
}

.feature-bottom-line .feature-detail-title {
  color: var(--white);
  font-size: 2.25rem;
  margin-bottom: 1.5rem;
  position: relative;
  z-index: 1;
}

@media (min-width: 768px) {
  .feature-bottom-line .feature-detail-title {
    font-size: 2.75rem;
  }
}

.feature-bottom-line .feature-detail-text {
  color: var(--white);
  font-size: 1.25rem;
  line-height: 1.8;
  font-weight: 500;
  margin-bottom: 0;
  position: relative;
  z-index: 1;
}

@media (min-width: 768px) {
  .feature-bottom-line .feature-detail-text {
    font-size: 1.5rem;
  }
}

/* Mobile Adjustments */
@media (max-width: 767px) {
  .features-detailed {
    gap: 2rem;
    margin-top: 3rem;
  }

  .feature-detail {
    padding: 2rem 1.5rem;
  }

  .feature-detail-icon {
    font-size: 2.5rem;
  }

  .feature-detail-title {
    font-size: 1.5rem;
  }

  .feature-detail-intro {
    font-size: 1rem;
  }

  .feature-detail-text {
    font-size: 1rem;
  }

  .feature-detail-list li {
    font-size: 1rem;
    padding-left: 2rem;
  }

  .feature-bottom-line {
    padding: 2.5rem 1.75rem;
  }

  .feature-bottom-line .feature-detail-icon {
    font-size: 3rem;
  }

  .feature-bottom-line .feature-detail-title {
    font-size: 1.75rem;
  }

  .feature-bottom-line .feature-detail-text {
    font-size: 1.125rem;
  }
}
