/* Estilos globales y variables */
:root {
    /* Variables base (Azul/Corporativo - Default en index.php) */
    --color-primary: #1e40af;
    --color-primary-light: #3b82f6;
    --color-primary-dark: #1e3a8a;
    --color-secondary: #0ea5e9;
    --color-accent: #06b6d4;
    --color-dark: #0f172a;
    --color-dark-light: #1e293b;
    --color-light: #f8fafc;
    --color-text: #1e293b;
    --color-text-light: #64748b;
    --color-white: #ffffff;
    --color-gray-50: #f9fafb;
    --color-gray-100: #f3f4f6;
    --color-gray-200: #e5e7eb;
    --color-gray-300: #d1d5db;
    --color-gray-800: #1f2937;
}

/* Tema IA (Sobrescribe variables para páginas de IA) */
body.theme-ia {
    --color-primary: #8b5cf6; /* Violeta */
    --color-primary-light: #a78bfa;
    --color-primary-dark: #7c3aed;
    --color-secondary: #1e40af; /* Azul de respaldo */
    --color-accent: #c084fc;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--color-white);
    color: var(--color-text);
    overflow-x: hidden;
}

.font-heading {
    font-family: 'Playfair Display', serif;
    font-weight: 600;
}

/* Utilidades de fondo y efectos */
.bg-glass {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--color-gray-200);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.card-shadow {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
}

.card-shadow:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    transform: translateY(-4px);
}

.text-gradient {
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.text-gradient-hero {
    background-image: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Cards y Hover Effects */
.service-card-hover {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.service-card-hover:hover {
    transform: translateY(-8px);
}

.service-card-hover:hover .service-image {
    transform: scale(1.05);
}

.ia-card {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    background: white;
    border: 1px solid var(--color-gray-200);
}

.ia-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 25px 50px -12px rgba(139, 92, 246, 0.15);
    border-color: var(--color-primary); /* Usa variable dinámica */
}

/* Patrones y Fondos */
.pattern-dots {
    background-image: radial-gradient(circle, rgba(30, 64, 175, 0.1) 1px, transparent 1px);
    background-size: 20px 20px;
}

/* Animaciones */
.floating {
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
    100% { transform: translateY(0px); }
}

.blur-load {
    opacity: 0;
    animation: blur-fade 0.8s ease-in forwards;
}

@keyframes blur-fade {
    0% { filter: blur(10px); opacity: 0; }
    100% { filter: blur(0); opacity: 1; }
}

.ai-pulse {
    animation: pulse-aura 3s infinite;
}

@keyframes pulse-aura {
    0% { box-shadow: 0 0 0 0 rgba(139, 92, 246, 0.4); }
    70% { box-shadow: 0 0 0 20px rgba(139, 92, 246, 0); }
    100% { box-shadow: 0 0 0 0 rgba(139, 92, 246, 0); }
}

/* Botones */
.btn-primary {
    background: var(--color-primary);
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.btn-primary:hover {
    background: var(--color-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(30, 64, 175, 0.3);
}

.btn-secondary {
    background: transparent;
    border: 2px solid var(--color-primary);
    color: var(--color-primary);
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: var(--color-primary);
    color: white;
    transform: translateY(-2px);
}

/* Formularios y Loaders */
.loader-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

input:focus, textarea:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.05);
}

/* Estilos adicionales previos (legacy) */
.mobile-menu {
    display: none; /* Controlado a veces por clases directas de Tailwind, mantener por compatibilidad si se usa JS puro */
}

/* Smooth Scroll */
html {
    scroll-behavior: smooth;
}