/* Tarjetas de servicios IA */
.service-card {
    /* ... */
}
.flip-card {
    perspective: 1200px;
    position: relative;
}
.flip-card-inner {
    transition: transform 0.6s cubic-bezier(.4,2,.6,1);
    transform-style: preserve-3d;
    position: relative;
    min-height: 380px;
}
.flip-card.flipped .flip-card-inner {
    transform: rotateY(180deg);
}
.flip-card-front, .flip-card-back {
    backface-visibility: hidden;
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0; left: 0;
}
.flip-card-back {
    transform: rotateY(180deg);
    z-index: 2;
}
.flip-card-front {
    z-index: 1;
}

/* Hover effect */
.flip-card:hover {
    box-shadow: 0 12px 32px 0 rgba(80,0,180,0.10), 0 2px 4px 0 rgba(80,0,180,0.08);
    transform: translateY(-8px) scale(1.03);
}

/* Chat de tarjetas IA */
.chat-window {
    background: #f8fafc;
    border-radius: 0.75rem;
    padding: 1rem;
    min-height: 8rem;
    max-height: 12rem;
    overflow-y: auto;
    margin-bottom: 1rem;
    font-size: 0.97rem;
}
.user-message, .bot-message {
    margin-bottom: 0.5rem;
    font-size: 0.97rem;
    line-height: 1.5;
    word-break: break-word;
    max-width: 90%;
}
.user-message {
    background: #8b5cf6;
    color: #fff;
    border-radius: 14px 14px 0 14px;
    padding: 8px 14px;
    align-self: flex-end;
    margin-left: auto;
}
.bot-message {
    background: #ede9fe;
    color: #4b5563;
    border-radius: 14px 14px 14px 0;
    padding: 8px 14px;
    align-self: flex-start;
    margin-right: auto;
}
.typing-indicator {
    display: flex;
    align-items: center;
    gap: 3px;
    background: #ede9fe;
    border-radius: 12px 12px 12px 0;
    padding: 7px 12px;
    width: 48px;
    margin: 4px 0;
}
.typing-indicator span {
    display: inline-block;
    width: 7px;
    height: 7px;
    background: #a78bfa;
    border-radius: 50%;
    opacity: 0.5;
    animation: typingWidget 1.2s infinite;
}
.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typingWidget {
    0%, 100% { opacity: 0.5; transform: translateY(0);}
    50% { opacity: 1; transform: translateY(-3px);}
}

/* Tarjetas premium - services */
#services .service-card {
  position: relative;
  overflow: hidden;
  transition: transform 0.35s cubic-bezier(.4,2,.6,1), box-shadow 0.3s, border-color 0.3s;
  box-shadow: 0 4px 24px 0 rgba(80,0,180,0.08), 0 1.5px 4px 0 rgba(80,0,180,0.06);
  border: 2px solid #f3f0ff;
  background: linear-gradient(135deg, #fff 80%, #f3f0ff 100%);
  z-index: 1;
}
#services .service-card:hover {
  transform: translateY(-10px) scale(1.03) rotate(-1deg);
  box-shadow: 0 12px 32px 0 rgba(80,0,180,0.13), 0 2px 8px 0 rgba(80,0,180,0.10);
  border-color: #a78bfa;
}
#services .service-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, #a78bfa 0%, #6366f1 100%);
  opacity: 0;
  z-index: 2;
  transition: opacity 0.3s;
  pointer-events: none;
}
#services .service-card:hover::before {
  opacity: 0.08;
}
#services .feature-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 1.5rem;
  margin-bottom: 1.5rem;
  font-size: 2rem;
  box-shadow: 0 2px 8px 0 rgba(80,0,180,0.10);
  transition: background 0.3s, color 0.3s, transform 0.3s;
  position: relative;
  z-index: 3;
}
#services .service-card:hover .feature-icon {
  background: linear-gradient(120deg, #a78bfa 0%, #6366f1 100%);
  color: #fff !important;
  transform: scale(1.12) rotate(-6deg);
  box-shadow: 0 4px 16px 0 rgba(80,0,180,0.18);
}
#services .service-card h3 {
  letter-spacing: -0.5px;
}
#services .service-card ul li i {
  min-width: 1.25em;
}
#services .service-card a {
  transition: color 0.2s, margin 0.2s;
}
#services .service-card a:hover {
  color: #4f46e5;
}
#services .service-card .group:hover .fa-arrow-right {
  opacity: 1 !important;
  margin-left: 0.5rem;
}
#services .service-card .fa-arrow-right {
  transition: opacity 0.2s, margin 0.2s;
  opacity: 0;
  margin-left: 0;
}

/* Tarjetas premium - services-ia */
#services-ia .service-card {
  position: relative;
  overflow: hidden;
  transition: transform 0.35s cubic-bezier(.4,2,.6,1), box-shadow 0.3s, border-color 0.3s;
  box-shadow: 0 4px 24px 0 rgba(80,0,180,0.08), 0 1.5px 4px 0 rgba(80,0,180,0.06);
  border: 2px solid #f3f0ff;
  background: linear-gradient(135deg, #fff 80%, #f3f0ff 100%);
  z-index: 1;
}
#services-ia .service-card:hover {
  transform: translateY(-10px) scale(1.03) rotate(-1deg);
  box-shadow: 0 12px 32px 0 rgba(80,0,180,0.13), 0 2px 8px 0 rgba(80,0,180,0.10);
  border-color: #a78bfa;
}
#services-ia .service-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, #a78bfa 0%, #6366f1 100%);
  opacity: 0;
  z-index: 2;
  transition: opacity 0.3s;
  pointer-events: none;
}
#services-ia .service-card:hover::before {
  opacity: 0.08;
}
#services-ia .feature-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 1.5rem;
  margin-bottom: 1.5rem;
  font-size: 2rem;
  box-shadow: 0 2px 8px 0 rgba(80,0,180,0.10);
  transition: background 0.3s, color 0.3s, transform 0.3s;
  position: relative;
  z-index: 3;
}
#services-ia .service-card:hover .feature-icon {
  background: linear-gradient(120deg, #a78bfa 0%, #6366f1 100%);
  color: #fff !important;
  transform: scale(1.12) rotate(-6deg);
  box-shadow: 0 4px 16px 0 rgba(80,0,180,0.18);
}
#services-ia .service-card h3 {
  letter-spacing: -0.5px;
}
#services-ia .service-card ul li i {
  min-width: 1.25em;
}
#services-ia .service-card a {
  transition: color 0.2s, margin 0.2s;
}
#services-ia .service-card a:hover {
  color: #4f46e5;
}
#services-ia .service-card .group:hover .fa-arrow-right {
  opacity: 1 !important;
  margin-left: 0.5rem;
}
#services-ia .service-card .fa-arrow-right {
  transition: opacity 0.2s, margin 0.2s;
  opacity: 0;
  margin-left: 0;
}