/* AE Funciones */
.ae-funciones {
  padding: 6rem 0;
  background: #fff;
  position: relative;
  overflow: hidden;
}
.ae-funciones__bg-shape {
  position: absolute;
  top: 0;
  right: 0;
  width: 600px;
  height: 600px;
  background: #f9fafb;
  border-radius: 50%;
  transform: translate(33%, -50%);
  pointer-events: none;
}
.ae-funciones__container {
  position: relative;
  max-width: 80rem;
  margin: 0 auto;
  padding: 0 7%;
}
@media (min-width: 768px) { .ae-funciones__container { padding: 0 2rem; } }

.ae-funciones__header {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-bottom: 3.5rem;
}
@media (min-width: 768px) {
  .ae-funciones__header {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
  }
}
.ae-funciones__title {
  font-size: 2.25rem;
  font-weight: 900;
  color: var(--analdex-navy);
  line-height: 1.1;
}
@media (min-width: 768px) { .ae-funciones__title { font-size: 3rem; } }

.ae-funciones__subtitle {
  color: #9ca3af;
  font-size: 0.875rem;
  max-width: 20rem;
  line-height: 1.6;
}
@media (min-width: 768px) { .ae-funciones__subtitle { text-align: right; } }

/* Grid */
.ae-funciones__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}
@media (min-width: 640px) { .ae-funciones__grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .ae-funciones__grid { grid-template-columns: repeat(3, 1fr); } }

/* Card */
.func-card {
  position: relative;
  background: #fff;
  border: 1px solid #f3f4f6;
  border-radius: 1rem;
  padding: 1.75rem;
  overflow: hidden;
  cursor: pointer;
  transition: box-shadow 0.3s, transform 0.3s;
}
.func-card:hover {
  box-shadow: 0 20px 40px rgba(0,0,0,0.08);
  transform: translateY(-4px);
}
.func-card__num {
  position: absolute;
  top: 1rem;
  right: 1.25rem;
  font-size: 6rem;
  font-weight: 900;
  color: #f9fafb;
  line-height: 1;
  user-select: none;
  pointer-events: none;
  transition: color 0.3s;
}
.func-card:hover .func-card__num { color: #f3f4f6; }

.func-card__icon {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  position: relative;
}
.func-card__icon svg {
  width: 28px;
  height: 28px;
}

.func-card__title {
  font-weight: 900;
  color: var(--analdex-navy);
  font-size: 1.125rem;
  margin-bottom: 0.5rem;
  line-height: 1.25;
}
.func-card__desc {
  color: #9ca3af;
  font-size: 0.875rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}
.func-card__stat {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.func-card__stat-value {
  font-weight: 900;
  color: var(--analdex-navy);
  font-size: 1.25rem;
}
.func-card__stat-label {
  color: #9ca3af;
  font-size: 0.75rem;
  line-height: 1.3;
}
.func-card__accent {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--analdex-yellow);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s;
}
.func-card:hover .func-card__accent { transform: scaleX(1); }

/* Icon color variants */
.icon-blue { background: #eff6ff; color: #2563eb; }
.icon-emerald { background: #ecfdf5; color: #059669; }
.icon-amber { background: #fffbeb; color: #d97706; }
.icon-purple { background: #faf5ff; color: #9333ea; }
.icon-rose { background: #fff1f2; color: #e11d48; }
.icon-sky { background: #f0f9ff; color: #0284c7; }

/* Bottom CTA */
.ae-funciones__cta {
  margin-top: 3rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  border-top: 1px solid #f3f4f6;
  padding-top: 2.5rem;
}
@media (min-width: 640px) {
  .ae-funciones__cta { flex-direction: row; }
}
.ae-funciones__cta p {
  color: #9ca3af;
  font-size: 0.875rem;
  max-width: 28rem;
  text-align: center;
}
@media (min-width: 640px) { .ae-funciones__cta p { text-align: left; } }