/* Estilos propios de /ia-integrada/ (extraídos del HTML original) */
/* Specific Styles for AI Page */
.ai-hero {
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
}

.ai-hero h1 {
    font-size: 3.5rem;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    position: relative;
}

.ai-hero .text-gradient {
    background: linear-gradient(135deg, #8b5cf6 0%, #3b82f6 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Core Features Grid */
.ai-core-section {
    padding: 6rem 0;
    background: rgba(248, 250, 252, 0.5);
    position: relative;
    overflow: hidden;
}

.ai-core-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2.5rem;
    margin-top: 4rem;
}

.ai-core-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    padding: 2.5rem;
    border-radius: var(--border-radius-lg);
    box-shadow: 0 10px 40px -10px rgba(15, 23, 42, 0.05);
    transition: all 0.4s ease;
    position: relative;
    z-index: 1;
}

.ai-core-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px -10px rgba(139, 92, 246, 0.15);
    border-color: rgba(139, 92, 246, 0.3);
}

.ai-core-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1) 0%, rgba(59, 130, 246, 0.1) 100%);
    color: #8b5cf6;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
}

.ai-core-card h3 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    color: var(--color-text-main);
}

.ai-core-card p {
    color: var(--color-text-muted);
    line-height: 1.6;
}

/* Module Specific Section */
.ai-modules-section {
    padding: 6rem 0;
    background: var(--color-surface);
}

.ai-module-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    margin-bottom: 6rem;
}

.ai-module-row:last-child {
    margin-bottom: 0;
}

.ai-module-row.reverse .ai-module-content {
    order: 2;
}

.ai-module-row.reverse .ai-module-visual {
    order: 1;
}

.ai-module-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 1rem;
    background: rgba(139, 92, 246, 0.1);
    color: #8b5cf6;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.ai-module-content h3 {
    font-size: 2.2rem;
    margin-bottom: 1.5rem;
    color: var(--color-text-main);
    line-height: 1.2;
}

.ai-module-content p {
    font-size: 1.1rem;
    color: var(--color-text-muted);
    line-height: 1.7;
    margin-bottom: 2rem;
}

.ai-feature-list {
    list-style: none;
    padding: 0;
}

.ai-feature-list li {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.2rem;
}

.ai-feature-list li i {
    color: #10b981;
    margin-top: 4px;
    font-size: 1.1rem;
}

.ai-feature-list li span {
    color: var(--color-text-main);
    font-weight: 500;
}

/* Mockup visuals for modules */
.ai-mockup {
    background: #f8fafc;
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    border: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow: 0 20px 40px -10px rgba(15, 23, 42, 0.1);
    position: relative;
}

.ai-mockup::before {
    content: '';
    position: absolute;
    top: -20px;
    right: -20px;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.2) 0%, rgba(255, 255, 255, 0) 70%);
    z-index: -1;
}

.chat-bubble {
    background: white;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    border-bottom-left-radius: 0;
    box-shadow: var(--shadow-sm);
    margin-bottom: 1rem;
    max-width: 90%;
    border: 1px solid var(--color-border);
    position: relative;
    transform: translateY(20px);
    opacity: 0;
    animation: slideUp 0.6s forwards;
}

.chat-bubble.bot {
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 0;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.05) 0%, rgba(59, 130, 246, 0.05) 100%);
    border-color: rgba(139, 92, 246, 0.2);
    margin-left: auto;
    text-align: right;
    animation-delay: 0.3s;
}

.chat-bubble p {
    margin: 0;
    font-size: 0.95rem;
    color: var(--color-text-main);
}

@keyframes slideUp {
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@media (max-width: 992px) {
    .ai-module-row {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .ai-module-row.reverse .ai-module-content {
        order: 1;
    }

    .ai-module-row.reverse .ai-module-visual {
        order: 2;
    }
}

/* Sparkle Animation for Hero */
.sparkle-icon {
    display: inline-block;
    animation: sparklePulse 2s infinite alternate;
    color: #fbbf24;
    margin-left: 10px;
}

@keyframes sparklePulse {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }

    100% {
        transform: scale(1.2);
        opacity: 1;
        filter: drop-shadow(0 0 10px rgba(251, 191, 36, 0.8));
    }
}

@media (max-width: 1024px) {
    .ai-core-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
    .ai-core-grid { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Ajustes al estilo del sitio (tema dw)
   ========================================================================== */
.theme-dw .ai-hero h1 { font-size: clamp(2.2rem, 4.6vw, 3.4rem); }

/* Capacidades */
.theme-dw .ai-core-section {
  background: #fff url('../../img/bg-tecnologia.svg') center / cover no-repeat;
}

.theme-dw .ai-core-grid {
  gap: 1.5rem;
  margin-top: 0;
}

.theme-dw .ai-core-card {
  padding: 2rem 1.75rem;
  background: #fff;
  backdrop-filter: none;
  border: 1px solid var(--dw-border);
  border-radius: 16px;
  box-shadow: 0 2px 10px rgba(13, 28, 119, 0.04);
}

.theme-dw .ai-core-card:hover {
  transform: translateY(-6px);
  border-color: var(--dw-violet);
  box-shadow: 0 24px 48px -20px rgba(58, 78, 242, 0.35);
}

.theme-dw .ai-core-icon {
  position: relative;
  width: 54px;
  height: 54px;
  border-radius: 14px;
  font-size: 1.35rem;
  color: #fff;
  background: linear-gradient(135deg, var(--dw-accent-dark) 0%, var(--dw-indigo) 100%);
  box-shadow: 0 12px 24px -10px rgba(58, 78, 242, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.theme-dw .ai-core-icon::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0) 55%);
}

.theme-dw .ai-core-card h3 {
  font-size: 1.2rem;
  color: var(--dw-blue-800);
}

.theme-dw .ai-core-card p { font-size: 0.98rem; margin: 0; }

/* Casos por módulo */
.theme-dw .ai-modules-section {
  background: linear-gradient(180deg, var(--dw-lavender) 0%, #fff 100%);
}

.theme-dw .ai-module-row {
  gap: 4.5rem;
  margin-bottom: 5rem;
}

.theme-dw .ai-module-badge {
  border: 1px solid currentColor;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 700;
  background: #fff !important;
}

.theme-dw .ai-module-content h3 {
  font-size: clamp(1.6rem, 2.6vw, 2rem);
  font-weight: 700;
  color: var(--dw-blue-800);
}

.theme-dw .ai-module-content p { font-size: 1.05rem; }

.theme-dw .ai-feature-list li {
  align-items: center;
  margin-bottom: 0.9rem;
}

.theme-dw .ai-feature-list li i {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  margin-top: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: #fff;
  background: linear-gradient(135deg, var(--dw-accent-dark), var(--dw-indigo));
  box-shadow: 0 6px 12px -6px rgba(58, 78, 242, 0.7);
}

.theme-dw .ai-feature-list li span {
  color: var(--dw-navy-900);
  font-weight: 500;
}

/* Mockups como ventana de aplicación */
.theme-dw .ai-mockup {
  padding: 0 1.5rem 1.5rem;
  background: #fff;
  border: 1px solid var(--dw-border);
  border-radius: 16px;
  box-shadow: 0 40px 70px -35px rgba(13, 28, 119, 0.45);
  overflow: hidden;
}

.theme-dw .ai-mockup::before {
  top: auto;
  bottom: -60px;
  right: -60px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(143, 139, 255, 0.18), transparent 70%);
  z-index: 0;
}

.theme-dw .ai-mockup > * { position: relative; z-index: 1; }

.theme-dw .ai-mockup-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 -1.5rem 1.25rem;
  padding: 0.75rem 1.25rem;
  background: var(--dw-lavender-2);
  border-bottom: 1px solid var(--dw-border);
  font-size: 0.78rem;
}

.theme-dw .ai-mockup-bar span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ff8f8f;
}

.theme-dw .ai-mockup-bar span:nth-child(2) { background: #ffd36b; }
.theme-dw .ai-mockup-bar span:nth-child(3) { background: #7fe0b0; }

.theme-dw .ai-mockup-bar em {
  margin-left: 0.6rem;
  font-style: normal;
  font-weight: 700;
  color: var(--dw-blue-800);
}

.theme-dw .ai-mockup-bar b {
  margin-left: auto;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  color: #fff;
  font-weight: 700;
  white-space: nowrap;
  background: linear-gradient(135deg, var(--dw-violet), var(--dw-indigo));
}

.theme-dw .chat-bubble {
  border-color: var(--dw-border);
  box-shadow: 0 6px 16px -10px rgba(13, 28, 119, 0.35);
}

.theme-dw .chat-bubble.bot {
  background: linear-gradient(135deg, var(--dw-lavender-2), #f4f6ff);
  border-color: rgba(143, 139, 255, 0.45);
}

@media (max-width: 1024px) {
  .theme-dw .ai-module-row { gap: 2.5rem; }
}
