@import './theme.css';

.why-choose-us {
  text-align: center;
  padding: clamp(3rem, 6vw, 5rem) 20px;
  background: var(--white-background);
  color: var(--paragraph-color);
}

.why-choose-us .title {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: clamp(1.5rem, 3vw, 2.15rem);
  font-weight: 800;
  letter-spacing: -0.005em;
  margin: 0 auto 48px;
  color: var(--text-primary);
  max-width: 48ch;
  line-height: 1.25;
  position: relative;
  padding-bottom: 18px;
}

.why-choose-us .title::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 64px;
  height: 4px;
  border-radius: 2px;
  background: var(--xp-yellow);
  box-shadow: 0 2px 14px rgba(240, 245, 60, 0.45);
}

.why-choose-us .title span {
  background: var(--gradient-brand-soft);
  padding: 2px 10px;
  border-radius: var(--radius-sm);
  color: var(--xp-black);
}

.why-cards-container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  justify-items: stretch;
  max-width: 1200px;
  margin: 0 auto;
}

.why-card {
  border: 1px solid rgba(11, 13, 18, 0.08);
  border-radius: var(--radius-lg);
  padding: 28px 20px;
  margin-top: 0;
  text-align: center;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  width: 100%;
  max-width: 100%;
  transition: transform var(--transition-smooth),
    box-shadow var(--transition-smooth),
    border-color var(--transition-smooth), background var(--transition-smooth);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 160px;
}

.why-card:hover {
  transform: translateY(-6px);
  border-color: rgba(240, 245, 60, 0.5);
  box-shadow: 0 12px 32px rgba(11, 13, 18, 0.1),
    0 0 0 1px rgba(240, 245, 60, 0.3);
  background: var(--xp-white);
}

.why-icon {
  font-size: 26px;
  color: var(--xp-black);
  background: var(--xp-yellow);
  width: 56px;
  height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  margin-bottom: 6px;
  transition: transform 0.35s var(--ease-reveal),
    box-shadow 0.3s ease;
  box-shadow: 0 8px 20px rgba(240, 245, 60, 0.3);
}

.why-card:hover .why-icon {
  transform: rotate(-6deg) scale(1.05);
  box-shadow: 0 12px 28px rgba(240, 245, 60, 0.45);
}

.why-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
  letter-spacing: 0.005em;
}

[data-theme="dark"] .why-choose-us {
  background: var(--surface-muted);
}

[data-theme="dark"] .why-card {
  background: rgba(22, 26, 36, 0.85);
  border-color: rgba(240, 245, 60, 0.12);
  color: var(--text-primary);
}

[data-theme="dark"] .why-card:hover {
  background: rgba(29, 35, 49, 0.92);
  border-color: rgba(240, 245, 60, 0.35);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(240, 245, 60, 0.35);
}

[data-theme="dark"] .why-title {
  color: var(--text-primary);
}

/* Responsividade */
@media (max-width: 1024px) {
  .why-cards-container {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .why-cards-container {
    grid-template-columns: repeat(2, 1fr);
  }
  .why-choose-us .title {
    font-size: 1.5rem;
  }
}

@media (max-width: 480px) {
  .why-cards-container {
    grid-template-columns: 1fr;
  }
}

/* Scroll animation */
.why-choose-us .reveal {
  opacity: 0;
  transform: translate3d(0, 40px, 0);
  transition: opacity 0.75s var(--ease-reveal), transform 0.75s var(--ease-reveal);
}

.why-choose-us .reveal.visible {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

.why-choose-us .why-card.reveal:nth-child(1) { transition-delay: 0.06s; }
.why-choose-us .why-card.reveal:nth-child(2) { transition-delay: 0.12s; }
.why-choose-us .why-card.reveal:nth-child(3) { transition-delay: 0.18s; }
.why-choose-us .why-card.reveal:nth-child(4) { transition-delay: 0.24s; }
.why-choose-us .why-card.reveal:nth-child(5) { transition-delay: 0.30s; }
.why-choose-us .why-card.reveal:nth-child(6) { transition-delay: 0.36s; }
.why-choose-us .why-card.reveal:nth-child(7) { transition-delay: 0.42s; }
.why-choose-us .why-card.reveal:nth-child(8) { transition-delay: 0.48s; }
