/* --- COREOPS ELITE DESIGN SYSTEM V3.0 REFINED --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

:root {
    --primary: #020617;        
    --card-bg: rgba(15, 23, 42, 0.4); 
    --accent: #00d4ff;         
    --accent-glow: rgba(0, 212, 255, 0.5);
    --white: #f8fafc;
    --text-dim: #94a3b8;
    --glass: rgba(2, 6, 23, 0.75);
    --border: rgba(255, 255, 255, 0.08); 
    --grad: linear-gradient(135deg, #00d4ff 0%, #0081ff 100%);
    --transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1); 
}

/* --- ANIMACIONES (EXISTENTES Y NUEVAS) --- */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(40px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes float {
    0% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-12px) rotate(2deg); }
    100% { transform: translateY(0px) rotate(0deg); }
}

@keyframes chatEntrance {
    0% { opacity: 0; transform: translateY(50px) scale(0.8) rotateX(-20deg); }
    100% { opacity: 1; transform: translateY(0) scale(1) rotateX(0deg); }
}

/* NUEVA ANIMACIÓN DE SALIDA PARA EL CHAT */
@keyframes chatExit {
    0% { opacity: 1; transform: translateY(0) scale(1) rotateX(0deg); }
    100% { opacity: 0; transform: translateY(50px) scale(0.8) rotateX(-20deg); }
}

@keyframes pulseStatus {
    0% { box-shadow: 0 0 0 0 rgba(0, 212, 255, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(0, 212, 255, 0); }
    100% { box-shadow: 0 0 0 0 rgba(0, 212, 255, 0); }
}

@keyframes typing {
    0%, 100% { transform: translateY(0); opacity: 0.5; }
    50% { transform: translateY(-5px); opacity: 1; }
}

/* --- NUEVAS ANIMACIONES LLAMATIVAS --- */
@keyframes shine {
    100% { left: 125%; }
}

@keyframes reveal {
    from { clip-path: inset(0 100% 0 0); }
    to { clip-path: inset(0 0 0 0); }
}

/* --- APLICACIÓN DE ANIMACIONES --- */
.hero-section h1 {
    animation: fadeInUp 1.2s cubic-bezier(0.23, 1, 0.32, 1);
}

.hero-tag {
    animation: reveal 1.5s cubic-bezier(0.77, 0, 0.175, 1);
}

.card-service {
    animation: fadeInUp 0.8s ease-out backwards;
}

/* Efecto Brillo (Shine) al pasar el mouse por las cards */
.card-service::before, .card-form::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(
        to right,
        transparent,
        rgba(255, 255, 255, 0.05),
        transparent
    );
    transform: skewX(-25deg);
    transition: 0.7s;
}

.card-service:hover::before, .card-form:hover::before {
    animation: shine 0.75s forwards;
}

/* --- BASE --- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
::selection { background: var(--accent); color: var(--primary); }

body {
    background-color: var(--primary);
    background-image: 
        radial-gradient(circle at 15% 15%, rgba(0, 212, 255, 0.12) 0%, transparent 45%),
        radial-gradient(circle at 85% 85%, rgba(0, 129, 255, 0.08) 0%, transparent 45%);
    color: var(--white);
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}

/* --- LAYOUT --- */
section { padding: 140px 0; position: relative; }
.container { max-width: 1240px; margin: 0 auto; padding: 0 30px; }

/* --- NAVEGACIÓN --- */
.wp-header {
    background: var(--glass);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border-bottom: 1px solid var(--border);
    padding: 18px 0;
    position: fixed;
    width: 100%; top: 0; z-index: 1000;
    transition: var(--transition);
}
.header-flex { display: flex; justify-content: space-between; align-items: center; }
.logo { font-size: 1.6rem; font-weight: 900; letter-spacing: -1.5px; color: white; text-decoration: none; }
.logo span { color: var(--accent); text-shadow: 0 0 15px var(--accent-glow); }

.main-nav ul { display: flex; list-style: none; gap: 2.5rem; }
.main-nav a { 
    color: var(--text-dim); 
    text-decoration: none; 
    font-size: 0.95rem; 
    font-weight: 500;
    position: relative;
    transition: var(--transition); 
}
.main-nav a::after {
    content: ''; position: absolute; bottom: -5px; left: 0; width: 0; height: 2px;
    background: var(--grad); transition: var(--transition);
}
.main-nav a:hover { color: var(--white); }
.main-nav a:hover::after { width: 100%; }

/* --- HERO SECTION --- */
.hero-section { 
    min-height: 95vh; 
    display: flex; 
    align-items: center; 
    text-align: center;
}
.hero-tag {
    display: inline-flex;
    align-items: center;
    padding: 6px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 100px;
    color: var(--accent);
    font-size: 0.75rem;
    font-weight: 700;
    margin-bottom: 30px;
    text-transform: uppercase;
    letter-spacing: 2.5px;
    transition: var(--transition);
}
.hero-section h1 {
    font-size: clamp(3rem, 9vw, 5.5rem);
    font-weight: 900; line-height: 0.95; margin-bottom: 35px;
    letter-spacing: -3px;
    background: linear-gradient(180deg, #fff 50%, rgba(255,255,255,0.5));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.hero-subtitle {
    font-size: 1.25rem; color: var(--text-dim);
    max-width: 650px; margin: 0 auto 50px;
}

/* --- RECLUTAMIENTO: BURBUJA ELITE --- */
.card-form-wrapper {
    display: flex; justify-content: center;
    align-items: center; perspective: 1000px;
}

.card-form {
    background: var(--glass);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border: 1px solid var(--border);
    padding: 60px 50px;
    border-radius: 40px; 
    width: 100%; max-width: 550px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
    transition: var(--transition);
    animation: fadeInUp 1s ease-out;
    overflow: hidden;
    position: relative;
}

.card-form:hover {
    transform: translateY(-10px) rotateX(2deg);
    border-color: var(--accent);
    box-shadow: 0 40px 80px rgba(0, 212, 255, 0.15);
}

.recruitment-form input, 
.recruitment-form select {
    width: 100%; background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    padding: 18px 25px; border-radius: 16px;
    color: var(--white); font-size: 1rem;
    margin-bottom: 20px; transition: var(--transition);
}

.recruitment-form input:focus {
    outline: none; border-color: var(--accent);
    background: rgba(255, 255, 255, 0.07);
    box-shadow: 0 0 20px var(--accent-glow);
    transform: scale(1.02);
}

.full-width { width: 100%; margin-top: 10px; }

/* --- SERVICES GRID --- */
.grid-services {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 35px; margin-top: 80px;
}
.card-service {
    background: var(--card-bg);
    border: 1px solid var(--border);
    padding: 60px 45px; border-radius: 30px;
    transition: var(--transition);
    backdrop-filter: blur(15px);
    position: relative; overflow: hidden;
}
.card-service:hover { 
    background: rgba(15, 23, 42, 0.8);
    border-color: var(--accent); 
    transform: translateY(-15px) scale(1.02);
}

/* --- FOOTER: REFINED VERSION --- */
.wp-footer {
    padding: 100px 0 60px;
    background: linear-gradient(to top, rgba(2, 6, 23, 1), transparent);
    border-top: 1px solid var(--border);
    margin-top: 100px;
}

.footer-content {
    display: flex; flex-direction: column;
    align-items: center; gap: 40px;
}

.footer-logo {
    font-size: 2rem; font-weight: 900;
    text-decoration: none; color: var(--white);
    transition: var(--transition);
}

.footer-logo span { color: var(--accent); }

.wp-footer p {
    color: var(--text-dim); font-size: 0.85rem;
    letter-spacing: 2px; text-transform: uppercase;
}

.wp-footer strong { color: var(--accent); }

/* --- CHATBOT WIDGET & BUBBLE (MEJORADO) --- */
#chat-bubble {
    position: fixed; bottom: 40px; right: 40px;
    width: 70px; height: 70px; background: var(--grad);
    border-radius: 22px; display: flex; align-items: center; justify-content: center;
    cursor: pointer; z-index: 2000;
    box-shadow: 0 15px 35px rgba(0, 212, 255, 0.4);
    animation: float 4s ease-in-out infinite;
    transition: var(--transition);
}

#chat-bubble:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 20px 45px var(--accent-glow);
}

#chat-bubble svg { width: 30px; fill: white; }

#chat-widget {
    position: fixed; bottom: 120px; right: 40px;
    width: 380px; height: 580px;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid var(--border);
    border-radius: 30px;
    display: none; flex-direction: column;
    z-index: 2000; overflow: hidden;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.6);
    perspective: 1000px;
}

/* Animación cuando el widget está activo y cuando se oculta */
#chat-widget.active {
    display: flex;
    animation: chatEntrance 0.7s cubic-bezier(0.23, 1, 0.32, 1) forwards;
}

#chat-widget.closing {
    animation: chatExit 0.5s cubic-bezier(0.23, 1, 0.32, 1) forwards;
}

/* Estilos internos del chat para que luzca "Elite" */
.chat-header {
    padding: 25px; background: rgba(255,255,255,0.03);
    border-bottom: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-between;
}

.status-dot {
    width: 10px; height: 10px; background: #00ff88;
    border-radius: 50%; display: inline-block;
    margin-right: 10px; animation: pulseStatus 2s infinite;
}

.chat-content {
    flex: 1; padding: 20px; overflow-y: auto;
    display: flex; flex-direction: column; gap: 15px;
}

.bot-msg {
    background: rgba(255,255,255,0.05);
    padding: 12px 18px; border-radius: 18px 18px 18px 4px;
    max-width: 85%; align-self: flex-start;
    border: 1px solid var(--border);
    font-size: 0.9rem; animation: fadeInUp 0.4s ease;
}

.user-msg {
    background: var(--grad);
    padding: 12px 18px; border-radius: 18px 18px 4px 18px;
    max-width: 85%; align-self: flex-end;
    font-size: 0.9rem; box-shadow: 0 10px 20px rgba(0, 212, 255, 0.2);
}

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
    section { padding: 100px 0; }
    .hero-section h1 { font-size: 3rem; }
    .card-form { padding: 40px 25px; border-radius: 30px; }
    
    #chat-widget { 
        width: calc(100% - 40px); 
        height: 70vh;
        right: 20px; 
        bottom: 100px; 
    }
    
    #chat-bubble {
        bottom: 20px; right: 20px;
        width: 60px; height: 60px;
    }
}

/* --- SECCIÓN EQUIPO E IMÁGENES --- */
.grid-team {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px; margin-top: 60px;
}

.team-member {
    background: var(--card-bg);
    border: 1px solid var(--border);
    padding: 50px 30px; border-radius: 35px;
    text-align: center; backdrop-filter: blur(15px);
    transition: var(--transition);
}

.avatar-container {
    width: 140px; height: 140px;
    margin: 0 auto 25px; border-radius: 50%;
    overflow: hidden; border: 2px solid var(--accent);
    box-shadow: 0 0 20px var(--accent-glow);
}

.expert-img {
    width: 100%; height: 100%;
    object-fit: cover; 
    display: block; transition: var(--transition);
}

.team-member:hover {
    transform: translateY(-10px);
}

.team-member:hover .expert-img { transform: scale(1.1); }

.avatar-placeholder {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    background: var(--grad); font-size: 2.5rem; font-weight: 800;
}